From de9dbb7945596eeadc54995cb7b9e48339fa6731 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 28 Mar 2007 19:57:28 +0000 Subject: * cpp/tests/setup,run-unit-tests: - make run-unit-tests work directly as ./run-unit-tests as well as via make. - run-unit-tests takes list of tests to run as args or in env UNIT_TESTS. * cpp/tests/.vg-supp: - Fixed bogus symbols produced by --gen-suppressions. See http://article.gmane.org/gmane.comp.debugging.valgrind/5939 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@523444 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/tests/run-unit-tests | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cpp/tests/run-unit-tests') diff --git a/cpp/tests/run-unit-tests b/cpp/tests/run-unit-tests index b0ef82e558..e97309a59f 100755 --- a/cpp/tests/run-unit-tests +++ b/cpp/tests/run-unit-tests @@ -1,9 +1,18 @@ #!/bin/sh +# +# Test library names (without .so) can be specified on the command +# line and/or in env var UNIT_TESTS. +# -. $srcdir/setup +# Default VALGRIND from the path unless we were called by make. +test -z "$VALGRIND" -a -z "$MAKEFLAGS" && VALGRIND=`which valgrind` 2>/dev/null +test -z "$srcdir" && srcdir=. +source $srcdir/setup +for u in $* $UNIT_TESTS ; do TESTLIBS="$TESTLIBS $pwd/.libs/$u.so" ; done +test -z "$TESTLIBS" && TESTLIBS="$pwd/.libs/*Test.so" fail=0 -LD_PRELOAD=$pwd/.libs/libdlclose_noop.so $vg DllPlugInTester -c -b $pwd/.libs/*Test.so 2> valgrind.out || fail=1 +$vg DllPlugInTester -c -b $TESTLIBS 2> valgrind.out || fail=1 vg_check valgrind.out || fail=1 exit $fail -- cgit v1.2.1