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
--- /dev/null
+#!/bin/sh
+
+BINDIR=$1
+
+. `dirname $0`/../../../testprogs/blackbox/subunit.sh
+
+testit "ldb" `dirname $0`/test-tdb.sh $BINDIR
#!/bin/sh
+BINDIR=$1
+
if [ -n "$TEST_DATA_PREFIX" ]; then
LDB_URL="$TEST_DATA_PREFIX/tdbtest.ldb"
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 <<EOF | $VALGRIND ldbadd || exit 1
dn: @MODULES
@LIST: rdn_name
shutil.rmtree(test_prefix, ignore_errors=True)
os.makedirs(test_prefix)
os.environ['TEST_DATA_PREFIX'] = test_prefix
- cmd = 'tests/test-tdb.sh'
+ cmd = 'tests/test-tdb.sh %s' % Utils.g_module.blddir
ret = samba_utils.RUN_COMMAND(cmd)
print("testsuite returned %d" % ret)
# FIXME: Run python testsuite
ldbdir = os.path.join(srcdir(), "lib/ldb")
# Don't run LDB tests when using system ldb, as we won't have ldbtest installed
if os.path.exists(os.path.join(samba4bindir, "ldbtest")):
- plantestsuite("ldb.base", "none", "%s/tests/test-tdb.sh" % ldbdir,
- allow_empty_output=True)
+ plantestsuite("ldb.base", "none", "%s/tests/test-tdb-subunit.sh %s" % (ldbdir, samba4bindir))
else:
skiptestsuite("ldb.base", "Using system LDB, ldbtest not available")