summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-09 09:32:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:52 -0500
commit035faf4405eee7f404a023d984b064cccb0cc4c9 (patch)
treec3a183436a497bc06d4e8d2adcc84968a25e6b48
parent34f48e0e095dd6e3459984a4131b433177319abb (diff)
downloadsamba-035faf4405eee7f404a023d984b064cccb0cc4c9.tar.gz
samba-035faf4405eee7f404a023d984b064cccb0cc4c9.tar.bz2
samba-035faf4405eee7f404a023d984b064cccb0cc4c9.zip
r7432: export SMBD_TEST_FIFO
we can later check if this file exists, in the testit function, and only run the tests if smbd is still up metze (This used to be commit e0b17129f837bef1bca25b77107c65cbaadf13f3)
-rwxr-xr-xsource4/script/tests/selftest.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index dedf40e407..69c4bb7f83 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -49,9 +49,19 @@ if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
ADDARGS="$ADDARGS --option=\"torture:progress=no\""
fi
-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 &
+SMBD_TEST_FIFO="$PREFIX/smbd_test.fifo"
+export SMBD_TEST_FIFO
+
+rm -f $SMBD_TEST_FIFO
+mkfifo $SMBD_TEST_FIFO
+
+($SRCDIR/bin/smbd -d1 -s $CONFFILE -M single -i < $SMBD_TEST_FIFO;
+ ret=$?;
+ rm -f $SMBD_TEST_FIFO;
+ echo "smbd exists with status $ret";
+ exit $ret;
+)||exit $? &
+
sleep 2
START=`date`
(
@@ -62,7 +72,7 @@ START=`date`
$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
+) 9>$SMBD_TEST_FIFO
failed=$?
END=`date`