From 3ad9c52b1471da7192aa39f878d3ec22ea52d665 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 3 Sep 2012 18:42:55 +1000 Subject: selftest: skip tests if the tarball did not include the alpha13 provision --- testprogs/blackbox/dbcheck-alpha13.sh | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'testprogs') diff --git a/testprogs/blackbox/dbcheck-alpha13.sh b/testprogs/blackbox/dbcheck-alpha13.sh index 00cb97a48f..a028116075 100755 --- a/testprogs/blackbox/dbcheck-alpha13.sh +++ b/testprogs/blackbox/dbcheck-alpha13.sh @@ -12,12 +12,14 @@ shift 1 . `dirname $0`/subunit.sh +alpha13_dir=`dirname $0`/../../source4/selftest/provisions/alpha13 + alpha13() { if test -x $BINDIR/tdbrestore; then - `dirname $0`/../../source4/selftest/provisions/undump.sh `dirname $0`/../../source4/selftest/provisions/alpha13 $PREFIX_ABS/alpha13 $BINDIR/tdbrestore + `dirname $0`/../../source4/selftest/provisions/undump.sh $alpha13_dir $PREFIX_ABS/alpha13 $BINDIR/tdbrestore else - `dirname $0`/../../source4/selftest/provisions/undump.sh `dirname $0`/../../source4/selftest/provisions/alpha13 $PREFIX_ABS/alpha13 + `dirname $0`/../../source4/selftest/provisions/undump.sh $alpha13_dir $PREFIX_ABS/alpha13 fi } @@ -34,9 +36,29 @@ dbcheck_clean() { $BINDIR/samba-tool dbcheck --cross-ncs -H tdb://$PREFIX_ABS/alpha13/private/sam.ldb $@ } -testit "alpha13" alpha13 -testit "reindex" reindex -testit_expect_failure "dbcheck" dbcheck -testit "dbcheck_clean" dbcheck_clean +if [ -d $alpha13_dir ]; then + testit "alpha13" alpha13 + testit "reindex" reindex + testit_expect_failure "dbcheck" dbcheck + testit "dbcheck_clean" dbcheck_clean +else + subunit_start_test "alpha13" + subunit_skip_test "alpha13" <