3 TOTAL_TESTS
=`echo $TEST_FILES | wc -w`
5 # Server parameters file
13 # Should we stop at the first error? (yes | no)
16 # httest error code for 'Connection refused'
19 # Enable colors in output :) (yes | no)
29 for test_file
in $TEST_FILES; do
30 # echo -ne "[TEST $NTEST/$TOTAL_TESTS]\t""case: $test_file\t\t"
31 printf "[%3d/%d] %-32s " $NTEST $TOTAL_TESTS "$test_file"
33 OUTPUT
=`$HTTEST_CMD "$test_file" 2>&1`
38 TESTS_OK
=$
((TESTS_OK
+1))
39 [ $WITH_COLOR = yes ] && echo -n "\e[1;32m"
41 [ $WITH_COLOR = yes ] && echo -n "\e[m"
46 echo "Connection refused... (Is monkey running?)" >&2
51 TESTS_FAILED
=$
((TESTS_FAILED
+1))
52 [ $WITH_COLOR = yes ] && echo -n "\e[1;31m"
54 [ $WITH_COLOR = yes ] && echo -n "\e[m"
56 perl
-e 'print "-" x 78, "\n"' >>"$LOGFILE"
57 echo "$OUTPUT" >>"$LOGFILE"
58 perl
-e 'print "-" x 78, "\n"' >>"$LOGFILE"
60 [ $STOP_AT_ERRORS = yes ] && exit 1
66 echo -e "\n$TESTS_OK test(s) succeeded, $TESTS_FAILED test(s) failed."