summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-02-09 15:46:15 +0100
committerDan Williams <dcbw@redhat.com>2015-02-10 14:09:22 +0100
commit84ba14f8debf80a6f3095baeed34c393d78bcfb6 (patch)
treecc4334d71de121286bd4af821499152f6e7032d3
parente9d5599b74c087374a7557ad3a32a9c8bda14692 (diff)
downloadNetworkManager-84ba14f8debf80a6f3095baeed34c393d78bcfb6.tar.gz
tests: allow running tests without valgrind by setting NMTST_NO_VALGRIND
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. (cherry picked from commit 95a750e4fa0ca8148b1bf4ec3319f62d00318abe)
-rwxr-xr-xtools/run-test-valgrind.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/run-test-valgrind.sh b/tools/run-test-valgrind.sh
index fb8cb1482e..200a27d13c 100755
--- a/tools/run-test-valgrind.sh
+++ b/tools/run-test-valgrind.sh
@@ -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