r7432: export SMBD_TEST_FIFO
authorStefan Metzmacher <metze@samba.org>
Thu, 9 Jun 2005 09:32:07 +0000 (09:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:17:52 +0000 (13:17 -0500)
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)

source4/script/tests/selftest.sh

index dedf40e4076d8370a1588193424dead9280e36b7..69c4bb7f83b84832e27c491492017881587fc995 100755 (executable)
@@ -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`