X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2FMakefile;h=b7c843b86b93bd6ef6c8899147432b88344adff4;hb=ef3620529c936a8790d6970c57198b4caee09c0d;hp=691f36589f06156d52533d70517921d947635261;hpb=6ef23e1d7f7f47ccab5be6ff1b68e5cfdda80ad2;p=ric-plt%2Fxapp-frame-cpp.git diff --git a/test/Makefile b/test/Makefile index 691f365..b7c843b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -3,15 +3,19 @@ coverage_opts = -ftest-coverage -fprofile-arcs binaries = unit_test -tests:: unit_test jhash_test +tests:: unit_test jhash_test metrics_test + +include_list = -I ../src/metrics -I ../src/alarm -I ../src/messaging # 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/alarm -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o -lpthread + g++ -g $(coverage_opts) $(include_list) 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 @@ -21,6 +25,10 @@ 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 + # do NOT link the xapp lib; we include all modules in the test programme + g++ -g $(coverage_opts) $(include_list) metrics_test.cpp -o metrics_test -L../.build -lricxfcpp rmr_em.o -l rmr_si -lpthread + # prune gcov files generated by system include files clean:: rm -f *.h.gcov *.c.gcov