summaryrefslogtreecommitdiff
path: root/cpp/tests/run-unit-tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-03-28 19:57:28 +0000
committerAlan Conway <aconway@apache.org>2007-03-28 19:57:28 +0000
commitde9dbb7945596eeadc54995cb7b9e48339fa6731 (patch)
treecd0737c237d60848deb830907fb52c083f3a14d8 /cpp/tests/run-unit-tests
parentfce31ed61257d486e48f22c8229a8b22d88beddd (diff)
downloadqpid-python-de9dbb7945596eeadc54995cb7b9e48339fa6731.tar.gz
* 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
Diffstat (limited to 'cpp/tests/run-unit-tests')
-rwxr-xr-xcpp/tests/run-unit-tests13
1 files changed, 11 insertions, 2 deletions
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