6 if [ "$1" = "-no-color" ]; then
11 if [ "$1" = "-twice" ]; then
24 if [ -z "$COMPILER" -o -z "$CLEANER" -o -z "$LOGFILE" -o -z "$TODO" ]; then
27 echo " do_tests.sh [-no-color] [-twice] ./compiler ./cleaner logfile tests.ma ..."
30 echo " -no-color Do not use vt100 colors"
31 echo " -twice Run each test twice but show only the second run times"
33 echo "The value of the DO_TESTS_EXTRA evironment variable"
34 echo "will be appended to each line."
40 export TIMEFORMAT="%2lR %2lU %2lS"
42 printf "$COMPILER\t%-30s " $T
43 if [ "$TWICE" = "1" ]; then
44 $CLEANER $T 1>/dev/null 2>/dev/null
45 $COMPILER $T 1>/dev/null 2>/dev/null
47 $CLEANER $T 1>/dev/null 2>/dev/null
48 TIMES=`(time $COMPILER $T >> $LOGFILE 2>&1) 2>&1`
51 printf "$OK\t$TIMES\t$DO_TESTS_EXTRA\n"
53 printf "$FAIL\t$TIMES\t$DO_TESTS_EXTRA\n";