X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fscripts%2Fdo_tests.sh;h=a195b9cf0ee4ba816e29bbe917e3d2101db7c8de;hb=52af0e3a6ab827464f33b90bf0d39e5df3169499;hp=3fd13e4cf418fafaa0eb2bca3194b436319f82f2;hpb=214e1cb977f880a0790465ff81dcea7c9f74d7d2;p=helm.git diff --git a/helm/matita/scripts/do_tests.sh b/helm/matita/scripts/do_tests.sh index 3fd13e4cf..a195b9cf0 100755 --- a/helm/matita/scripts/do_tests.sh +++ b/helm/matita/scripts/do_tests.sh @@ -15,14 +15,16 @@ fi COMPILER=$1 shift +CLEANER=$1 +shift LOGFILE=$1 shift TODO="$@" -if [ -z "$COMPILER" -o -z "$LOGFILE" -o -z "$TODO" ]; then +if [ -z "$COMPILER" -o -z "$CLEANER" -o -z "$LOGFILE" -o -z "$TODO" ]; then echo echo "usage: " - echo " do_tests.sh [-no-color] [-twice] ./compiler logfile tests.ma ..." + echo " do_tests.sh [-no-color] [-twice] ./compiler ./cleaner logfile tests.ma ..." echo echo "options: " echo " -no-color Do not use vt100 colors" @@ -38,15 +40,18 @@ TMP=.__temp.txt for T in $TODO; do printf "$COMPILER\t%-30s " $T if [ "$TWICE" = "1" ]; then + $CLEANER $T 1>/dev/null 2>/dev/null $COMPILER $T 1>/dev/null 2>/dev/null fi - ./matitaclean $T 1>/dev/null 2>/dev/null + $CLEANER $T 1>/dev/null 2>/dev/null /usr/bin/time --quiet -o $TMP -f "%E %U %S" $COMPILER $T >> $LOGFILE 2>&1 - if [ $? = 0 ]; then + RC=$?; + if [ $RC = 0 ]; then printf "$OK\t`cat $TMP`\t$DO_TESTS_EXTRA\n" + rm $TMP else - printf "$FAIL\t`cat $TMP`\t$DO_TESTS_EXTRA\n" + printf "$FAIL\t`cat $TMP`\t$DO_TESTS_EXTRA\n"; + rm $TMP + exit $RC fi done - -rm $TMP