aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-03-17 12:53:49 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-03-17 12:53:49 +0000
commit4327d7cdf2c8abb5f61c5571c02bcc2a2ceed66c (patch)
tree4dd80261f9fab7ab699e567a7b81e0790f16356d /test-suite
parent5be8e3a83839b94ea3b7ba2015b9eb6d366bac4a (diff)
MAJ test complexité pour considérer le cas d'un temps avec un nombre
arbitraire de décimales git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9713 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rwxr-xr-xtest-suite/check13
1 files changed, 5 insertions, 8 deletions
diff --git a/test-suite/check b/test-suite/check
index 9b05556b8..19d77c9eb 100755
--- a/test-suite/check
+++ b/test-suite/check
@@ -115,18 +115,15 @@ test_complexity() {
for f in $1/*.v; do
nbtests=`expr $nbtests + 1`
printf " "$f"..."
- # 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`
+ # extract effective user time
+ res=`$command $f 2>&1 | sed -n -e "s/Finished transaction in .*(\([0-9]*\.[0-9]*\)u.*)/\1/p" | head -1`
if [ $? != 0 ]; then
echo "Error! (should be accepted)"
elif [ "$res" = "" ]; then
echo "Error! (couldn't find a time measure)"
- 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
+ else
+ # express effective time in centiseconds
+ res=`echo "$res"00 | sed -n -e "s/\([0-9]*\)\.\([0-9][0-9]\).*/\1\2/p"`
# 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 \)`