summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-08 14:45:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:50 -0500
commit729c7528e63a68226c16f23e73d2a31c3d1815f4 (patch)
tree27eaccceb2fa78232cfaa5e8b9ef42243310c61b /source4/script
parent070a0631e1dc1c25034a3ff9080465fa0d6f0c5c (diff)
downloadsamba-729c7528e63a68226c16f23e73d2a31c3d1815f4.tar.gz
samba-729c7528e63a68226c16f23e73d2a31c3d1815f4.tar.bz2
samba-729c7528e63a68226c16f23e73d2a31c3d1815f4.zip
r7397: - don't exit when one test fails
- some other cleanups metze (This used to be commit d8490399d91007dfcbada15f917ce56ab88370fc)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/tests/selftest.sh27
1 files changed, 21 insertions, 6 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index 12f27dbff9..e2adb887af 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -20,8 +20,8 @@ PRIVATEDIR=$PREFIX/private
NCALRPCDIR=$PREFIX/ncalrpc
LOCKDIR=$PREFIX/lockdir
+rm -rf $PREFIX/*
mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $NCALRPCDIR $LOCKDIR $TMPDIR
-rm -f $PRIVATEDIR/*
./setup/provision.pl --quiet --outputdir $PRIVATEDIR --domain $DOMAIN --realm $REALM --adminpass $PASSWORD
cat >$CONFFILE<<EOF
@@ -46,10 +46,25 @@ rm -f $PREFIX/smbd_test.fifo
mkfifo $PREFIX/smbd_test.fifo
$SRCDIR/bin/smbd -d1 -s $CONFFILE -M single -i < $PREFIX/smbd_test.fifo || exit 1 &
sleep 2
+START=`date`
(
- $SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || exit 1
- $SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || exit 1
- $SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || exit 1
- $SRCDIR/script/tests/test_posix.sh //localhost/tmp $USERNAME $PASSWORD "" $ADDARG || exit 1
- $SRCDIR/bin/smbtorture $ADDARG ncalrpc: LOCAL-* || exit 1
+ failed=0
+ $SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_posix.sh //localhost/tmp $USERNAME $PASSWORD "" $ADDARG || failed=`expr $failed + $?`
+ $SRCDIR/bin/smbtorture $ADDARG ncalrpc: LOCAL-* || failed=`expr $failed + 1`
+ exit $failed
) 9>$PREFIX/smbd_test.fifo
+failed=$?
+
+END=`date`
+echo "START: $START ($0)";
+echo "END: $END ($0)";
+
+if [ x"$failed" = x"0" ];then
+ echo "ALL OK ($0)";
+else
+ echo "$failed TESTS FAILED ($0)";
+fi
+exit $failed