smbd: ?True:False is pretty pointless :-)
[Samba.git] / lib / ldb / tests / test-tdb.sh
blob82eef69df81d8516fa67b473c53e461a9f17e149
1 #!/bin/sh
3 BINDIR=$1
5 if [ -n "$TEST_DATA_PREFIX" ]; then
6 LDB_URL="$TEST_DATA_PREFIX/tdbtest.ldb"
7 PYDESTDIR="$TEST_DATA_PREFIX"
8 else
9 LDB_URL="tdbtest.ldb"
10 PYDESTDIR="/tmp"
12 mkdir $PYDESTDIR/tmp
13 export LDB_URL
15 PATH=$BINDIR:$PATH
16 export PATH
18 if [ -z "$LDBDIR" ]; then
19 LDBDIR=`dirname $0`/..
20 export LDBDIR
23 cd $LDBDIR
25 rm -f $LDB_URL*
27 cat <<EOF | $VALGRIND ldbadd || exit 1
28 dn: @MODULES
29 @LIST: rdn_name
30 EOF
32 $VALGRIND ldbadd $LDBDIR/tests/init.ldif || exit 1
34 . $LDBDIR/tests/test-generic.sh
36 . $LDBDIR/tests/test-extended.sh
38 . $LDBDIR/tests/test-tdb-features.sh
40 . $LDBDIR/tests/test-controls.sh
42 which python >/dev/null 2>&1
43 if [ $? -eq 0 ]; then
44 SELFTEST_PREFIX=$PYDESTDIR PYTHONPATH=$BINDIR/python python $LDBDIR/tests/python/api.py