aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/pbcompare.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/c/pbcompare.sh')
-rwxr-xr-xtest/c/pbcompare.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/c/pbcompare.sh b/test/c/pbcompare.sh
new file mode 100755
index 00000000..b47c83c4
--- /dev/null
+++ b/test/c/pbcompare.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+CCREF="/home/yuki/Work/VERIMAG/Compcert_riscv_bis/ccomp -static -S -stdlib /home/yuki/Work/VERIMAG/Compcert_riscv_bis/runtime -fno-expanse-rtlcond -fno-expanse-others"
+CCTEST="/home/yuki/Work/VERIMAG/Compcert_riscv_third/ccomp -static -S -stdlib /home/yuki/Work/VERIMAG/Compcert_riscv_third/runtime -fno-expanse-rtlcond -fno-expanse-others"
+
+for prog in *.c; do
+ $CCREF $prog > refout 2>&1
+ $CCTEST $prog > testout 2>&1
+ sort -k1 -n -t, refout -o refout
+ sort -k1 -n -t, testout -o testout
+ if cmp -s refout testout; then
+ echo "$prog passed"
+ else
+ echo "$prog failed"
+ diff -y refout testout
+ exit 1
+ fi
+done