From: Enrico Tassi Date: Mon, 27 Jun 2005 08:15:55 +0000 (+0000) Subject: minor fixes X-Git-Tag: INDEXING_NO_PROOFS~61 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=244b44d6490eeb5f7cb89e83cfb6e22e9394ba11;p=helm.git minor fixes --- diff --git a/helm/matita/scripts/do_tests.sh b/helm/matita/scripts/do_tests.sh index 737ea7c5e..080ff2ada 100755 --- a/helm/matita/scripts/do_tests.sh +++ b/helm/matita/scripts/do_tests.sh @@ -8,6 +8,10 @@ if [ "$1" = "-no-color" ]; then OK="OK" FAIL="FAIL" fi +if [ "$1" = "-twice" ]; then + shift + TWICE=1 +fi COMPILER=$1 shift @@ -18,7 +22,11 @@ TODO="$@" if [ -z "$COMPILER" -o -z "$LOGFILE" -o -z "$TODO" ]; then echo echo "usage: " - echo " do_tests.sh [-no-color] ./compiler logfile tests.ma ..." + echo " do_tests.sh [-no-color] [-twice] ./compiler logfile tests.ma ..." + echo + echo "options: " + echo " -no-color Do not use vt100 colors" + echo " -twice Run each test twice but show only the second run times" echo echo "The value of the DO_TESTS_EXTRA evironment variable" echo "will be appended to each line." @@ -29,6 +37,9 @@ TMP=.__temp.txt for T in $TODO; do echo -en "$COMPILER\t$T\t" + if [ "$TWICE" = "1" ]; then + $COMPILER $T 1>/dev/null 2>/dev/null + fi /usr/bin/time --quiet -o $TMP -f "%E\t%U\t%S" $COMPILER $T >> $LOGFILE 2>&1 if [ $? = 0 ]; then echo -e "$OK\t`cat $TMP`\t$DO_TESTS_EXTRA" diff --git a/helm/matita/scripts/profile_cvs.sh b/helm/matita/scripts/profile_cvs.sh index 384f64260..c3f19c03f 100755 --- a/helm/matita/scripts/profile_cvs.sh +++ b/helm/matita/scripts/profile_cvs.sh @@ -8,8 +8,8 @@ function testit { LOGTOOPT=/dev/null LOGTOBYTE=/dev/null export DO_TESTS_EXTRA="$MARK\t$@" - scripts/do_tests.sh -no-color ./matitac.opt $LOGTOOPT tests/*.ma - scripts/do_tests.sh -no-color ./matitac $LOGTOBYTE tests/*.ma + scripts/do_tests.sh -no-color -twice ./matitac.opt $LOGTOOPT tests/*.ma + scripts/do_tests.sh -no-color -twice ./matitac $LOGTOBYTE tests/*.ma } function compile { @@ -31,10 +31,8 @@ function run_tests { OLD=$PWD cd $1 export OCAMLRUNPARAM='o=1000000' - testit "gc-off" 1>/dev/null 2>/dev/null testit "gc-off" export OCAMLRUNPARAM='' - testit "gc-on" 1>/dev/null 2>/dev/null testit "gc-on" cd $OLD } @@ -46,7 +44,7 @@ cd $TMPDIRNAME cvs -d $CVSROOT co helm/ocaml 1>/dev/null 2>/dev/null cvs -d $CVSROOT co helm/matita 1>/dev/null 2>/dev/null compile $PWD/helm/ocaml $PWD/helm/matita -run_tests $PWD/helm/matita > LOG +run_tests $PWD/helm/matita > LOG 2>/dev/null cat LOG | awk -f $PWD/helm/matita/scripts/insert.awk > INSERT.sql cat INSERT.sql | mysql -u helm -h mowgli.cs.unibo.it matita cd $OLD