#!/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=. rm -f valgrind.out vg_log=--log-file-exactly=valgrind.out source $srcdir/setup for u in $* $UNIT_TESTS ; do case $u in :*) TEST="$u" ;; # A test path. *) TEST="$pwd/.libs/$u.so" # A test library. esac TESTS="$TESTS $TEST" ; done test -z "$TESTS" && TESTS="$pwd/.libs/*Test.so" fail=0 $vg DllPlugInTester -c -b $TESTS || fail=1 vg_check valgrind.out || fail=1 exit $fail