Add support for config file parsing and watching
This change introduces the ability to load and parse
the json xapp descriptor (config) file. It also provides
the ability for the xAPP to register a callback function
which is executed when the descriptor is changed.
Issue-ID: RIC-428
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: I7a1147aa8055599ef4b36ab17960e32ccb5b741f
diff --git a/test/Makefile b/test/Makefile
index b7c843b..cc47990 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,11 +1,11 @@
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 metrics_test
-
-include_list = -I ../src/metrics -I ../src/alarm -I ../src/messaging
+tests:: $(binaries)
# RMR emulation
rmr_em.o:: rmr_em.c
@@ -15,7 +15,7 @@
# emulate (and don't need to)
#
unit_test:: unit_test.cpp rmr_em.o
- g++ -g $(coverage_opts) $(include_list) unit_test.cpp -o unit_test -L../.build -lricxfcpp rmr_em.o -lrmr_si -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
@@ -26,8 +26,10 @@
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
+ 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::