Code Review
/
ric-plt
/
xapp-frame-cpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add support for config file parsing and watching
[ric-plt/xapp-frame-cpp.git]
/
test
/
unit_test.sh
diff --git
a/test/unit_test.sh
b/test/unit_test.sh
index
3e06a53
..
c845553
100755
(executable)
--- a/
test/unit_test.sh
+++ b/
test/unit_test.sh
@@
-1,6
+1,5
@@
#!/usr/bin/env bash
# vim: ts=4 sw=4 noet:
#!/usr/bin/env bash
# vim: ts=4 sw=4 noet:
-
#==================================================================================
# Copyright (c) 2020 Nokia
# Copyright (c) 2020 AT&T Intellectual Property.
#==================================================================================
# Copyright (c) 2020 Nokia
# Copyright (c) 2020 AT&T Intellectual Property.
@@
-99,6
+98,8
@@
echo "## INFO ##"
export LD_LIBRARY_PATH=$build_dir:/usr/local/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=$build_dir:/usr/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$build_dir:/usr/local/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=$build_dir:/usr/local/lib:$LIBRARY_PATH
+cp config1.json config-file.json # ensure default named file is there too
+
make nuke >/dev/null
make tests >/tmp/PID$$.log 2>&1
abort_if_error $? "unable to make"
make nuke >/dev/null
make tests >/tmp/PID$$.log 2>&1
abort_if_error $? "unable to make"
@@
-106,10
+107,18
@@
echo "tests successfully built" >&2
spew="cat"
spew="cat"
-for x in unit_test jhash_test metrics_test
+#run everything, then generate coverage stats after all have run
+for x in metrics_test jhash_test config_test unit_test
do
./$x >/tmp/PID$$.log 2>&1
abort_if_error $? "test failed: $x"
do
./$x >/tmp/PID$$.log 2>&1
abort_if_error $? "test failed: $x"
+done
+
+# it seems that we loose coverage reporting if metrics_test's gcov file is generated
+# after unit test. Very strange. To be safe, run unit_test last.
+#
+for x in metrics_test jhash_test config_test unit_test
+do
gcov $x.c >/dev/null 2>&1
done
gcov $x.c >/dev/null 2>&1
done