diff options
| author | Alan Conway <aconway@apache.org> | 2009-11-30 19:34:36 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-11-30 19:34:36 +0000 |
| commit | 6bb0134ca322b6e50e6ec76a242f89259cd12274 (patch) | |
| tree | 74ab33d008364a6b72fd879a0ad99693c42da33c /qpid/cpp/src/tests/run_test | |
| parent | f4b13c8d16754f29a331fe7ec2c7e1bc7995c524 (diff) | |
| download | qpid-python-6bb0134ca322b6e50e6ec76a242f89259cd12274.tar.gz | |
Clean up test environment variables, prepare for running more tests in cmake.
- consolidate test env vars in test_env.sh, also useful from command line.
- generate test_env.sh with autoconf/cmake to cover library location differences.
- Remove explicit mention of .libs, use $QPID_MODULE_DIR to load modules.
- Fix run_test to run valgrind under cmake
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@885557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/run_test')
| -rwxr-xr-x | qpid/cpp/src/tests/run_test | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/run_test b/qpid/cpp/src/tests/run_test index 130584ff9b..4b227621bc 100755 --- a/qpid/cpp/src/tests/run_test +++ b/qpid/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 |
