CREATE TABLE bench (
mark VARCHAR(100) NOT NULL,
- time TIME NOT NULL,
- timeuser TIME NOT NULL,
+ time VARCHAR(8) NOT NULL,
+ timeuser VARCHAR(8) NOT NULL,
compilation ENUM('byte','opt') NOT NULL,
test VARCHAR(100) NOT NULL,
result ENUM('ok','fail') NOT NULL,
TMP=.__temp.txt
+export TIMEFORMAT="%2lR %2lU %2lS"
for T in $TODO; do
printf "$COMPILER\t%-30s " $T
if [ "$TWICE" = "1" ]; then
$COMPILER $T 1>/dev/null 2>/dev/null
fi
$CLEANER $T 1>/dev/null 2>/dev/null
- /usr/bin/time --quiet -o $TMP -f "%E %U %S" $COMPILER $T >> $LOGFILE 2>&1
+ TIMES=`(time $COMPILER $T >> $LOGFILE 2>&1) 2>&1`
RC=$?;
if [ $RC = 0 ]; then
- printf "$OK\t`cat $TMP`\t$DO_TESTS_EXTRA\n"
- rm $TMP
+ printf "$OK\t$TIMES\t$DO_TESTS_EXTRA\n"
else
- printf "$FAIL\t`cat $TMP`\t$DO_TESTS_EXTRA\n";
- rm $TMP
+ printf "$FAIL\t$TIMES\t$DO_TESTS_EXTRA\n";
exit $RC
fi
done