summaryrefslogtreecommitdiff
path: root/cpp/tests/run-unit-tests
blob: e97309a59fbca3e24705eea73e7e3b345f79ccd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
# Test library names (without .so) can be specified on the command
# line and/or in env var UNIT_TESTS.
#

# 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
$vg DllPlugInTester -c -b $TESTLIBS 2> valgrind.out || fail=1
vg_check valgrind.out || fail=1

exit $fail