aboutsummaryrefslogtreecommitdiffstats
path: root/coverage
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-02-14 11:41:21 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-03-22 12:18:29 +0100
commit4122bb2ac2ce5966c53baee66b4649d369fdeea3 (patch)
treef25b79e2adb9adf12159d8c94b34baba6b5866f4 /coverage
parent6f192ac5b7aeca2070a02e74397a2c97977147ca (diff)
coverage: Allow removal of valgrind
It can be usefull for debugging with gdb to avoid the use of valgrind in the test. This can be done by setting the environment NOVALGRIND to any not empty value. Also add more temporary files to ignore. Change-Id: I853eb566607aa7ec87c356ee3acd9b1fa658b659 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'coverage')
-rw-r--r--coverage/.gitignore2
-rwxr-xr-xcoverage/scripts/run-test.sh16
2 files changed, 17 insertions, 1 deletions
diff --git a/coverage/.gitignore b/coverage/.gitignore
index 531f1a98..a5854309 100644
--- a/coverage/.gitignore
+++ b/coverage/.gitignore
@@ -12,3 +12,5 @@ bin/*.o
bin/*.so
bin/*.gcda
bin/*.gcno
+bin/*.c.gcov
+*.info
diff --git a/coverage/scripts/run-test.sh b/coverage/scripts/run-test.sh
index be083654..ee0fb00a 100755
--- a/coverage/scripts/run-test.sh
+++ b/coverage/scripts/run-test.sh
@@ -7,6 +7,20 @@ cd $R/bin
lcov -c -i -d $R/bin -o $R/lcov-out.info
+vg() {
+ if [[ -z "$NOVALGRIND" ]]; then
+ valgrind "$@"
+ else
+ while :; do
+ case "$1" in
+ --*) shift;;
+ *) break;;
+ esac
+ done
+ "$@"
+ fi
+}
+
mk() {
echo
echo "*******************************************************************"
@@ -78,7 +92,7 @@ mk $R/bin/test-wrap-json
# true life test
##########################################################
mk \
-valgrind \
+vg \
--log-file=$R/valgrind.out \
--trace-children=no \
--track-fds=yes \