aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/check
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-11-13 09:33:55 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-11-13 09:33:55 +0000
commit15d3268c64af8acbd7b430bfa74626cfdeb2c1ef (patch)
tree21f1a7c5e076955a388a4fe4a085a27ab3626a6e /test-suite/check
parent1a5e027ff4a34a6a66478799c675ce422092f786 (diff)
Corrige un bug de calcul du temps effectif cquand la dernière décimale est 0
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9371 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/check')
-rwxr-xr-xtest-suite/check13
1 files changed, 9 insertions, 4 deletions
diff --git a/test-suite/check b/test-suite/check
index fcb29a8d6..2f6738a0f 100755
--- a/test-suite/check
+++ b/test-suite/check
@@ -115,15 +115,20 @@ test_complexity() {
for f in $1/*.v; do
nbtests=`expr $nbtests + 1`
printf " "$f"..."
- # compute effective user time * 100
- res=`$command $f 2>&1 | sed -n -e "s/Finished transaction in .*(\([0-9]*\)\.\([0-9][0-9]\).*/\1\2/p" | head -1`
+ # compute effective user time (get X seconds, or XX ds, or XXX cs)
+ res=`$command $f 2>&1 | sed -n -e "s/Finished transaction in .*(\([0-9]\)\.\([0-9]*\)u.*)/\1\2/p" | head -1`
if [ $? != 0 ]; then
echo "Error! (should be accepted)"
- else
+ else
+ # express effective time in cenths of seconds
+ n=`echo -n $res | wc -c`
+ if [ $n = 2 ]; then res="$res"0;
+ else if [ $n = 1 ]; then res="$res"00; fi
+ fi
# find expected time * 100
exp=`sed -n -e "s/(\*.*Expected time < \([0-9]\).\([0-9][0-9]\)s.*\*)/\1\2/p" $f`
ok=`expr \( $res \* $bogomips \) "<" \( $exp \* 6120 \)`
- if [ $ok = 1 ]; then
+ if [ "$ok" = 1 ]; then
echo "Ok"
nbtestsok=`expr $nbtestsok + 1`
else