autoconf: fix --with(out)-sendfile-support option handling
[Samba.git] / testprogs / blackbox / dbcheck-alpha13.sh
bloba028116075d0baebfdf7b312d01f4bb1ae5002ab
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: dbcheck.sh PREFIX
6 EOF
7 exit 1;
8 fi
10 PREFIX_ABS="$1"
11 shift 1
13 . `dirname $0`/subunit.sh
15 alpha13_dir=`dirname $0`/../../source4/selftest/provisions/alpha13
17 alpha13() {
18 if test -x $BINDIR/tdbrestore;
19 then
20 `dirname $0`/../../source4/selftest/provisions/undump.sh $alpha13_dir $PREFIX_ABS/alpha13 $BINDIR/tdbrestore
21 else
22 `dirname $0`/../../source4/selftest/provisions/undump.sh $alpha13_dir $PREFIX_ABS/alpha13
26 reindex() {
27 $BINDIR/samba-tool dbcheck --reindex -H tdb://$PREFIX_ABS/alpha13/private/sam.ldb $@
30 # This should 'fail', because it returns the number of modified records
31 dbcheck() {
32 $BINDIR/samba-tool dbcheck --cross-ncs --fix --yes -H tdb://$PREFIX_ABS/alpha13/private/sam.ldb $@
34 # But having fixed it all up, this should pass
35 dbcheck_clean() {
36 $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/alpha13/private/sam.ldb $@
39 if [ -d $alpha13_dir ]; then
40 testit "alpha13" alpha13
41 testit "reindex" reindex
42 testit_expect_failure "dbcheck" dbcheck
43 testit "dbcheck_clean" dbcheck_clean
44 else
45 subunit_start_test "alpha13"
46 subunit_skip_test "alpha13" <<EOF
47 no test provision
48 EOF
50 subunit_start_test "reindex"
51 subunit_skip_test "reindex" <<EOF
52 no test provision
53 EOF
54 subunit_start_test "dbcheck"
55 subunit_skip_test "dbcheck" <<EOF
56 no test provision
57 EOF
58 subunit_start_test "dbcheck_clean"
59 subunit_skip_test "dbcheck_clean" <<EOF
60 no test provision
61 EOF
64 exit $failed