X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=test%2FMakefile;h=2a97c6937e38bab5c8147ac326e354acff05d504;hb=5328c8da64ea724f8730b7a0bbd3214fde66fca1;hp=4245d3b50f228939ab3d99886420fff48e3db3ca;hpb=5a9d7c67d1ec1e4410995eae4b50f929396935f6;p=ric-plt%2Fxapp-frame-cpp.git diff --git a/test/Makefile b/test/Makefile index 4245d3b..2a97c69 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,26 +1,36 @@ coverage_opts = -ftest-coverage -fprofile-arcs -binaries = unit_test +binaries = unit_test jhash_test config_test metrics_test +include = -I ../src/xapp -I ../src/alarm -I ../src/messaging -I ../src/config -I ../ext/jsmn -I ../src/json -I ../src/metrics +ld_path = LD_LIBRARY_PATH=../src/.build -tests:: unit_test jhash_test +tests:: $(binaries) # RMR emulation rmr_em.o:: rmr_em.c cc -g rmr_em.c -c +# include the emulated rmr stuff, but we still need the rmr lib for symtab things which we cannot hope to +# emulate (and don't need to) +# unit_test:: unit_test.cpp rmr_em.o - # do NOT link the xapp lib; we include all modules in the test programme - g++ -g $(coverage_opts) -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o -lpthread + g++ -g $(coverage_opts) $(include) unit_test.cpp -o unit_test -L../.build -lricxfcpp rmr_em.o -lrmr_si -lpthread # build a special jwrapper object with coverage settings jwrapper_test.o:: ../src/json/jwrapper.c ../src/json/jwrapper.h - cc $(coverage_opts) -g -I ../src/json -I ../ext/jsmn ../src/json/jwrapper.c -c -o jwrapper_test.o + cc $(coverage_opts) -DDEBUG=0 -g -I ../src/json -I ../ext/jsmn ../src/json/jwrapper.c -c -o jwrapper_test.o jhash_test:: jwrapper_test.o jhash_test.cpp # do NOT link the xapp lib; we include all modules in the test programme g++ -g $(coverage_opts) -I ../src/json -I ../ext/jsmn jhash_test.cpp -o jhash_test jwrapper_test.o -lrmr_si -lpthread +metrics_test:: metrics_test.cpp rmr_em.o + g++ -g $(coverage_opts) $(include) metrics_test.cpp -o metrics_test -L../.build -lricxfcpp rmr_em.o -l rmr_si -lpthread + +config_test:: config_test.cpp jwrapper_test.o + g++ -g $(coverage_opts) $(include) config_test.cpp -o config_test jwrapper_test.o -lricxfcpp -lrmr_si -lpthread + # prune gcov files generated by system include files clean:: rm -f *.h.gcov *.c.gcov