summaryrefslogtreecommitdiffstats
path: root/testprogs/blackbox/test_ldb_simple.sh
blob: 5f5f9b8018f3dae29f3f911d3189b47c6308c0c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh

if [ $# -lt 2 ]; then
	cat <<EOF
Usage: test_ldb_simple.sh PROTOCOL SERVER [OPTIONS]
EOF
	exit 1
fi

p=$1
SERVER=$2
PREFIX=$3
shift 2
options="$*"

. $(dirname $0)/subunit.sh
. "$(dirname "${0}")/common_test_fns.inc"

check()
{
	name="$1"
	shift
	cmdline="$*"
	echo "test: $name"
	$cmdline
	status=$?
	if [ x$status = x0 ]; then
		echo "success: $name"
	else
		echo "failure: $name"
		failed=$(expr $failed + 1)
	fi
	return $status
}

ldbsearch="${VALGRIND} $(system_or_builddir_binary ldbsearch "${BINDIR}")"

check "currentTime" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER --scope=base currentTime || failed=$(expr $failed + 1)

exit $failed