diff options
Diffstat (limited to 'source3/script')
-rw-r--r-- | source3/script/tests/test_functions.sh | 132 |
1 files changed, 0 insertions, 132 deletions
diff --git a/source3/script/tests/test_functions.sh b/source3/script/tests/test_functions.sh index bddae18c10..4e80266943 100644 --- a/source3/script/tests/test_functions.sh +++ b/source3/script/tests/test_functions.sh @@ -21,126 +21,6 @@ samba3_stop_sig_kill() { return 0; } -samba3_check_or_start() { - if [ -n "$SERVER_TEST_FIFO" ];then - - trap samba3_stop_sig_kill INT QUIT - trap samba3_stop_sig_kill TERM - - if [ -p "$SERVER_TEST_FIFO" ];then - return 0; - fi - - if [ -n "$SOCKET_WRAPPER_DIR" ];then - if [ -d "$SOCKET_WRAPPER_DIR" ]; then - rm -f $SOCKET_WRAPPER_DIR/* - else - mkdir -p $SOCKET_WRAPPER_DIR - fi - fi - - rm -f $SERVER_TEST_FIFO - mkfifo $SERVER_TEST_FIFO - - rm -f $NMBD_TEST_LOG - printf "%s" "STARTING NMBD..." - (( - if test x"$NMBD_MAXTIME" = x; then - NMBD_MAXTIME=2700 - fi - MAKE_TEST_BINARY=$BINDIR/nmbd - export MAKE_TEST_BINARY - timelimit $NMBD_MAXTIME $NMBD_VALGRIND $BINDIR/nmbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $NMBD_TEST_LOG 2>&1 & - TIMELIMIT_NMBD_PID=$! - MAKE_TEST_BINARY= - echo $TIMELIMIT_NMBD_PID > $PIDDIR/timelimit.nmbd.pid - wait $TIMELIMIT_NMBD_PID - ret=$?; - rm -f $SERVER_TEST_FIFO - if [ -n "$SOCKET_WRAPPER_DIR" -a -d "$SOCKET_WRAPPER_DIR" ]; then - rm -f $SOCKET_WRAPPER_DIR/* - fi - if [ x"$ret" = x"0" ];then - echo "nmbd exits with status $ret"; - echo "nmbd exits with status $ret" >>$NMBD_TEST_LOG; - elif [ x"$ret" = x"137" ];then - echo "nmbd got SIGXCPU and exits with status $ret!" - echo "nmbd got SIGXCPU and exits with status $ret!">>$NMBD_TEST_LOG; - else - echo "nmbd failed with status $ret!" - echo "nmbd failed with status $ret!">>$NMBD_TEST_LOG; - fi - exit $ret; - ) || exit $? &) 2>/dev/null || exit $? - echo "DONE" - - rm -f $WINBINDD_TEST_LOG - printf "%s" "STARTING WINBINDD..." - (( - if test x"$WINBINDD_MAXTIME" = x; then - WINBINDD_MAXTIME=2700 - fi - MAKE_TEST_BINARY=$BINDIR/winbindd - export MAKE_TEST_BINARY - timelimit $WINBINDD_MAXTIME $WINBINDD_VALGRIND $BINDIR/winbindd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $WINBINDD_TEST_LOG 2>&1 & - TIMELIMIT_WINBINDD_PID=$! - MAKE_TEST_BINARY= - echo $TIMELIMIT_WINBINDD_PID > $PIDDIR/timelimit.winbindd.pid - wait $TIMELIMIT_WINBINDD_PID - ret=$?; - rm -f $SERVER_TEST_FIFO - if [ -n "$SOCKET_WRAPPER_DIR" -a -d "$SOCKET_WRAPPER_DIR" ]; then - rm -f $SOCKET_WRAPPER_DIR/* - fi - if [ x"$ret" = x"0" ];then - echo "winbindd exits with status $ret"; - echo "winbindd exits with status $ret" >>$WINBINDD_TEST_LOG; - elif [ x"$ret" = x"137" ];then - echo "winbindd got SIGXCPU and exits with status $ret!" - echo "winbindd got SIGXCPU and exits with status $ret!">>$WINBINDD_TEST_LOG; - else - echo "winbindd failed with status $ret!" - echo "winbindd failed with status $ret!">>$WINBINDD_TEST_LOG; - fi - exit $ret; - ) || exit $? &) 2>/dev/null || exit $? - echo "DONE" - - rm -f $SMBD_TEST_LOG - printf "%s" "STARTING SMBD..." - (( - if test x"$SMBD_MAXTIME" = x; then - SMBD_MAXTIME=2700 - fi - MAKE_TEST_BINARY=$BINDIR/smbd - export MAKE_TEST_BINARY - timelimit $SMBD_MAXTIME $SMBD_VALGRIND $BINDIR/smbd -F -S --no-process-group -d0 -s $SERVERCONFFILE > $SMBD_TEST_LOG 2>&1 & - TIMELIMIT_SMBD_PID=$! - MAKE_TEST_BINARY= - echo $TIMELIMIT_SMBD_PID > $PIDDIR/timelimit.smbd.pid - wait $TIMELIMIT_SMBD_PID - ret=$?; - rm -f $SERVER_TEST_FIFO - if [ -n "$SOCKET_WRAPPER_DIR" -a -d "$SOCKET_WRAPPER_DIR" ]; then - rm -f $SOCKET_WRAPPER_DIR/* - fi - if [ x"$ret" = x"0" ];then - echo "smbd exits with status $ret"; - echo "smbd exits with status $ret" >>$SMBD_TEST_LOG; - elif [ x"$ret" = x"137" ];then - echo "smbd got SIGXCPU and exits with status $ret!" - echo "smbd got SIGXCPU and exits with status $ret!">>$SMBD_TEST_LOG; - else - echo "smbd failed with status $ret!" - echo "smbd failed with status $ret!">>$SMBD_TEST_LOG; - fi - exit $ret; - ) || exit $? &) 2>/dev/null || exit $? - echo "DONE" - fi - return 0; -} - samba3_nmbd_test_log() { if [ -n "$NMBD_TEST_LOG" ];then if [ -r "$NMBD_TEST_LOG" ];then @@ -315,18 +195,6 @@ testok() { exit $failed } -teststatus() { - name=`basename $1` - failed=$2 - - if [ x"$failed" = x"0" ];then - echo "TEST STATUS: $failed"; - else - echo "TEST STATUS: $failed"; - fi - exit $failed -} - if [ -z "$VALGRIND" ]; then MALLOC_CHECK_=2 export MALLOC_CHECK_ |