diff options
Diffstat (limited to 'cpp/src/tests/run_test')
| -rwxr-xr-x | cpp/src/tests/run_test | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cpp/src/tests/run_test b/cpp/src/tests/run_test index 130584ff9b..4b227621bc 100755 --- a/cpp/src/tests/run_test +++ b/cpp/src/tests/run_test @@ -32,7 +32,8 @@ # srcdir=`dirname $0` -. $srcdir/vg_check +source ./test_env.sh +source $srcdir/vg_check # Export variables from makefile. export srcdir @@ -59,9 +60,6 @@ VALGRIND_OPTS="$VALGRIND_OPTS --num-callers=25 --log-file=$VG_LOG -- " -# FIXME aconway 2008-07-16: removed --trace-children=yes, problems with cluster tests forking -# qpidd libtool script. Investigate & restore --trace-children if possible. - ERROR=0 if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then # This is a libtool "executable". Valgrind it if VALGRIND specified. @@ -69,9 +67,15 @@ if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then # Hide output unless there's an error. $LIBTOOL --mode=execute $VALGRIND "$@" 2>&1 || ERROR=1 test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; } -else +elif file $1 | grep -q text; then # This is a non-libtool shell script, just execute it. exec "$@" +else + # This is a real executable, valgrind it. + test -n "$VALGRIND" && VALGRIND="$VALGRIND $VALGRIND_OPTS" + # Hide output unless there's an error. + $VALGRIND "$@" 2>&1 || ERROR=1 + test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; } fi exit $ERROR |
