diff options
| -rwxr-xr-x | test-suite/check | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test-suite/check b/test-suite/check index 9b05556b8d..19d77c9ebd 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 \)` |
