mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
c44289ce1c
shfmt -w -p -i 0 -fn testprogs/blackbox/test_ldb_simple.sh Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
42 lines
618 B
Bash
Executable File
42 lines
618 B
Bash
Executable File
#!/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
|
|
|
|
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
|
|
}
|
|
|
|
export PATH="$BINDIR:$PATH"
|
|
|
|
ldbsearch="$VALGRIND ldbsearch"
|
|
|
|
check "currentTime" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER --scope=base currentTime || failed=$(expr $failed + 1)
|
|
|
|
exit $failed
|