Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 71b9d7e

Browse files
committed
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 <patrick.mccarty@intel.com>
1 parent b46a4e2 commit 71b9d7e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/run.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ testnum=0
88

99
sudo rm -f *.diff *.out
1010

11+
VALGRIND="valgrind -q"
12+
if [ -n "$SKIP_VALGRIND" ]; then
13+
VALGRIND=""
14+
fi
15+
1116
libdir="$abs_builddir/.libs"
1217
ldpath="LD_LIBRARY_PATH=$libdir"
13-
BSDIFF="sudo $ldpath valgrind -q $libdir/bsdiff"
14-
BSPATCH="sudo $ldpath valgrind -q $libdir/bspatch"
18+
BSDIFF="sudo $ldpath $VALGRIND $libdir/bsdiff"
19+
BSPATCH="sudo $ldpath $VALGRIND $libdir/bspatch"
1520

1621
# If exit status is 0, the test succeeded. Else it failed.
1722
check_success() {

0 commit comments

Comments
 (0)