tests/krb5: Add PK-INIT testing framework
[Samba.git] / testprogs / blackbox / test_ldb_simple.sh
blob5f5f9b8018f3dae29f3f911d3189b47c6308c0c7
1 #!/bin/sh
3 if [ $# -lt 2 ]; then
4 cat <<EOF
5 Usage: test_ldb_simple.sh PROTOCOL SERVER [OPTIONS]
6 EOF
7 exit 1
8 fi
10 p=$1
11 SERVER=$2
12 PREFIX=$3
13 shift 2
14 options="$*"
16 . $(dirname $0)/subunit.sh
17 . "$(dirname "${0}")/common_test_fns.inc"
19 check()
21 name="$1"
22 shift
23 cmdline="$*"
24 echo "test: $name"
25 $cmdline
26 status=$?
27 if [ x$status = x0 ]; then
28 echo "success: $name"
29 else
30 echo "failure: $name"
31 failed=$(expr $failed + 1)
33 return $status
36 ldbsearch="${VALGRIND} $(system_or_builddir_binary ldbsearch "${BINDIR}")"
38 check "currentTime" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER --scope=base currentTime || failed=$(expr $failed + 1)
40 exit $failed