From 71b9d7e78ab3e26426b1af47ee16c7742b0f5aec Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Tue, 13 Dec 2016 10:05:06 -0800 Subject: [PATCH] Allow for skipping valgrind use in tests In case the system valgrind is not functioning properly, allow the test suite to run without using the tool by setting SKIP_VALGRIND=1 for `make check`. Signed-off-by: Patrick McCarty --- test/run.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/run.sh b/test/run.sh index ef2b284..ea9c64b 100755 --- a/test/run.sh +++ b/test/run.sh @@ -8,10 +8,15 @@ testnum=0 sudo rm -f *.diff *.out +VALGRIND="valgrind -q" +if [ -n "$SKIP_VALGRIND" ]; then + VALGRIND="" +fi + libdir="$abs_builddir/.libs" ldpath="LD_LIBRARY_PATH=$libdir" -BSDIFF="sudo $ldpath valgrind -q $libdir/bsdiff" -BSPATCH="sudo $ldpath valgrind -q $libdir/bspatch" +BSDIFF="sudo $ldpath $VALGRIND $libdir/bsdiff" +BSPATCH="sudo $ldpath $VALGRIND $libdir/bspatch" # If exit status is 0, the test succeeded. Else it failed. check_success() {