From d8a8a836449e8acd2a309cdadbe84a2de49a54be Mon Sep 17 00:00:00 2001 From: Matt McCutchen Date: Wed, 16 Jul 2008 16:11:12 -0400 Subject: [PATCH] Make run-testsuite recognize NO_VALGRIND environment variable to work around a Valgrind bug: https://bugzilla.redhat.com/show_bug.cgi?id=455644 --- run-testsuite | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/run-testsuite b/run-testsuite index 0c563c2..116d2c9 100755 --- a/run-testsuite +++ b/run-testsuite @@ -2,9 +2,15 @@ bad= +if [ "$NO_VALGRIND" ]; then + cmd=(./testsuite) +else + cmd=(valgrind --error-exitcode=1 --leak-check=full ./testsuite) +fi + set -o pipefail -if ! valgrind --error-exitcode=1 --leak-check=full \ - ./testsuite 2>&1 >testsuite.out | tee testsuite.err; then +# Stdout goes directly to testsuite.out; stderr goes down the pipe. +if ! "${cmd[@]}" 2>&1 >testsuite.out | tee testsuite.err; then echo >&2 'Memory errors!' bad=1 fi -- 2.34.1