X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2FMakefile;h=691f36589f06156d52533d70517921d947635261;hb=6ef23e1d7f7f47ccab5be6ff1b68e5cfdda80ad2;hp=fcbf3619bdda8d9fe1094a027bd97eb73f7c5aee;hpb=4e4fb5021cc9aa67390f6641a060b85c077a1880;p=ric-plt%2Fxapp-frame-cpp.git diff --git a/test/Makefile b/test/Makefile index fcbf361..691f365 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,9 @@ coverage_opts = -ftest-coverage -fprofile-arcs -binaries = unit_test +binaries = unit_test + +tests:: unit_test jhash_test # RMR emulation rmr_em.o:: rmr_em.c @@ -9,7 +11,15 @@ rmr_em.o:: rmr_em.c 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) -I ../src/alarm -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o -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 + +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 # prune gcov files generated by system include files clean::