summaryrefslogtreecommitdiff
path: root/cpp/src/tests/run_test
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-26 14:55:48 +0000
committerAlan Conway <aconway@apache.org>2008-06-26 14:55:48 +0000
commit9ca5eeb1dd5dc4b97f5384439b890db938d83c53 (patch)
treee48575a82516337d8e6be6d8c676b270b1fde28c /cpp/src/tests/run_test
parentbe611b9882ba32bf16090b5a38f474c14bb5ec72 (diff)
downloadqpid-python-9ca5eeb1dd5dc4b97f5384439b890db938d83c53.tar.gz
Use run_test to run valgrind for start_broker consistently with other tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@671916 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/run_test')
-rwxr-xr-xcpp/src/tests/run_test15
1 files changed, 5 insertions, 10 deletions
diff --git a/cpp/src/tests/run_test b/cpp/src/tests/run_test
index 06e919c394..b87e4fccbd 100755
--- a/cpp/src/tests/run_test
+++ b/cpp/src/tests/run_test
@@ -29,7 +29,7 @@ test -z "$LC_COLLATE" && LC_COLLATE=
test -z "$LC_MESSAGES" && LC_MESSAGES=
export LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-VG_LOG="$1.vglog"
+VG_LOG="`basename $1`.vglog"
rm -f $VG_LOG*
VALGRIND_OPTS="
@@ -46,17 +46,12 @@ if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then
# This is a libtool "executable". Valgrind it if VALGRIND specified.
test -n "$VALGRIND" && VALGRIND="$VALGRIND $VALGRIND_OPTS"
# Hide output unless there's an error.
- libtool --mode=execute $VALGRIND "$@" 2>&1 || ERROR=$?
- test -n "$VALGRIND" && vg_check $VG_LOG*
+ libtool --mode=execute $VALGRIND "$@" 2>&1 || ERROR=1
+ test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; }
else
# This is a non-libtool shell script, just execute it.
exec "$@"
fi
-if test -z "$ERROR"; then
- # Clean up logs if there was no error.
- rm -f $VG_LOG*
- exit 0
-else
- exit $ERROR
-fi
+exit $ERROR
+