Add API allowing xAPPs to send alarm messages
[ric-plt/xapp-frame-cpp.git] / test / Makefile
index fcbf361..691f365 100644 (file)
@@ -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::