OK="OK"
FAIL="FAIL"
fi
+if [ "$1" = "-twice" ]; then
+ shift
+ TWICE=1
+fi
COMPILER=$1
shift
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."
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"