From c484f259c66ffcf0649dd5ab0d7c86e5c70d31af Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 4 Apr 2012 18:52:25 +1000 Subject: ldb: Detect failures in ldb.base again We need to wrap the ldb tests in the subunit blackbox helpers. We also needed to change to the right directory, or else the :< file:// syntax check does not work, as samba4.png is not found. Andrew Bartlett --- lib/ldb/tests/test-tdb-subunit.sh | 7 +++++++ lib/ldb/tests/test-tdb.sh | 10 +++++++--- lib/ldb/wscript | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 lib/ldb/tests/test-tdb-subunit.sh (limited to 'lib/ldb') diff --git a/lib/ldb/tests/test-tdb-subunit.sh b/lib/ldb/tests/test-tdb-subunit.sh new file mode 100755 index 0000000000..7dab79f7ba --- /dev/null +++ b/lib/ldb/tests/test-tdb-subunit.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +BINDIR=$1 + +. `dirname $0`/../../../testprogs/blackbox/subunit.sh + +testit "ldb" `dirname $0`/test-tdb.sh $BINDIR diff --git a/lib/ldb/tests/test-tdb.sh b/lib/ldb/tests/test-tdb.sh index c2285a93f1..3310c81392 100755 --- a/lib/ldb/tests/test-tdb.sh +++ b/lib/ldb/tests/test-tdb.sh @@ -1,5 +1,7 @@ #!/bin/sh +BINDIR=$1 + if [ -n "$TEST_DATA_PREFIX" ]; then LDB_URL="$TEST_DATA_PREFIX/tdbtest.ldb" else @@ -7,16 +9,18 @@ else fi export LDB_URL -PATH=bin:$PATH +PATH=$BINDIR:$PATH export PATH -rm -f $LDB_URL* - if [ -z "$LDBDIR" ]; then LDBDIR=`dirname $0`/.. export LDBDIR fi +cd $LDBDIR + +rm -f $LDB_URL* + cat <