diff options
Diffstat (limited to 'cpp/src/tests/run_test')
-rwxr-xr-x | cpp/src/tests/run_test | 15 |
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 + |