tests: allow running tests without valgrind by setting NMTST_NO_VALGRIND
authorThomas Haller <thaller@redhat.com>
Mon, 9 Feb 2015 14:46:15 +0000 (15:46 +0100)
committerThomas Haller <thaller@redhat.com>
Mon, 9 Feb 2015 14:49:58 +0000 (15:49 +0100)
When configuring with --with-valgrind, tests will be invoked
via valgrind. That significantly slows down the tests. Allow
user to set the environment variable NMTST_NO_VALGRIND to invoke
tests directly, even when valgrind was enabled at configure time.

tools/run-test-valgrind.sh

index fb8cb14..200a27d 100755 (executable)
@@ -13,6 +13,11 @@ if [ "$1" = "--launch-dbus" ]; then
 fi
 TEST="$1"; shift
 
+if [ "$NMTST_NO_VALGRIND" != "" ]; then
+       "$TEST"
+       exit $?
+fi
+
 LOGFILE="valgrind-`echo "$TEST" | tr -cd '[:alpha:]-'`.log"
 
 export G_SLICE=always-malloc