diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2007-03-19 14:49:56 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2007-03-19 14:49:56 +0000 |
commit | 293675b06262698ba3b1ba30db8595bedd5c55ae (patch) | |
tree | caf6b0d174fa4f4e1f65d7c7feb15bead1512a13 /test-suite/check | |
parent | 4327d7cdf2c8abb5f61c5571c02bcc2a2ceed66c (diff) |
Un chouia de portabilité en plus et pas de test si pas de bogomips
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9714 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/check')
-rwxr-xr-x | test-suite/check | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/test-suite/check b/test-suite/check index 19d77c9eb..504e96cc2 100755 --- a/test-suite/check +++ b/test-suite/check @@ -108,22 +108,29 @@ test_interactive() { # with exactly two digits after the dot test_complexity() { if [ -f /proc/cpuinfo ]; then - bogomips=`sed -n -e "s/bogomips.*: \([0-9]*\).*/\1/p" /proc/cpuinfo | head -1` - else - bogomips=6120 # assume a i386 3Gz + if grep -q bogomips /proc/cpuinfo; then # i386, ppc + bogomips=`sed -n -e "s/bogomips.*: \([0-9]*\).*/\1/p" /proc/cpuinfo | head -1` + elif grep -q Cpu0Bogo /proc/cpuinfo; then # sparc + bogomips=`sed -n -e "s/Cpu0Bogo.*: \([0-9]*\).*/\1/p" /proc/cpuinfo | head -1` + elif grep -q BogoMIPS /proc/cpuinfo; then # alpha + bogomips=`sed -n -e "s/BogoMIPS.*: \([0-9]*\).*/\1/p" /proc/cpuinfo | head -1` + fi fi - for f in $1/*.v; do - nbtests=`expr $nbtests + 1` - printf " "$f"..." + if [ "$bogomips" = "" ]; then + echo " cannot run complexity tests (no bogomips found)" + else + for f in $1/*.v; do + nbtests=`expr $nbtests + 1` + printf " "$f"..." # 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 + 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 centiseconds - res=`echo "$res"00 | sed -n -e "s/\([0-9]*\)\.\([0-9][0-9]\).*/\1\2/p"` + 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 \)` @@ -134,7 +141,8 @@ test_complexity() { echo "Error! (should run faster)" fi fi - done + done + fi } # Programme principal |