aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/power/testit
diff options
context:
space:
mode:
authorblazy <blazy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-20 12:37:13 +0000
committerblazy <blazy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-10-20 12:37:13 +0000
commitca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e (patch)
tree50a139db8e2ac51c6ff41f3790ff72aa417ed3be /test/ccured_olden/power/testit
parent43668d9109b1f36329646fd07324d435be6f0050 (diff)
downloadcompcert-ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e.tar.gz
compcert-ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e.zip
Ajout du banc de tests de CCured (Olden benchmark suite, cf.
CCured: type-safe retrofitting of legacy code, G.Necula et al.) rapportCompcert_all.txt liste les erreurs produites par ccomp. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@121 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/ccured_olden/power/testit')
-rwxr-xr-xtest/ccured_olden/power/testit26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/ccured_olden/power/testit b/test/ccured_olden/power/testit
new file mode 100755
index 00000000..b5132dd7
--- /dev/null
+++ b/test/ccured_olden/power/testit
@@ -0,0 +1,26 @@
+#!/bin/sh
+# test a power binary
+
+if [ "$1" = "" ]; then
+ echo "usage: $0 ./power.exe"
+ exit
+fi
+
+# all of power's output is to stdout
+echo "running: $1 >output"
+if ! $1 >output; then
+ echo "$1 failed directly"
+ exit 2
+fi
+
+# must strip elapsed time
+# must truncate precision to only 5 decimal places, because gcc's optimizer
+# (even with -ffloat-store) seems to change the answer under boxing
+if ! grep -v "Elapsed time" <output | \
+ sed 's/\(\.[0-9]\{5\}\)[0-9]*/\1/g' | diff out.orig - >/dev/null; then
+ echo "$1 got the wrong answer"
+ exit 4
+else
+ echo "$1 seems to work"
+fi
+ \ No newline at end of file