aboutsummaryrefslogtreecommitdiffstats
path: root/test/abi/Runtest
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2021-01-18 18:16:42 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2021-01-18 18:16:42 +0100
commitf3694c4ebb7155ef11730e757452498226caf423 (patch)
tree4db7fa3bad9a3154b833c3e3879b6958ec9429e1 /test/abi/Runtest
parent478ece46d8323ea182ded96a531309becf7445bb (diff)
downloadcompcert-kvx-f3694c4ebb7155ef11730e757452498226caf423.tar.gz
compcert-kvx-f3694c4ebb7155ef11730e757452498226caf423.zip
Testing calling conventions and interoperability with another C compiler
Using a combination of fixed and randomly-generated function signatures.
Diffstat (limited to 'test/abi/Runtest')
-rwxr-xr-xtest/abi/Runtest41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/abi/Runtest b/test/abi/Runtest
new file mode 100755
index 00000000..7ec63188
--- /dev/null
+++ b/test/abi/Runtest
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# The name of the test
+name="$1"
+
+# Skip the test if known to fail
+
+skip () {
+ echo "$name: skipped"
+ exit 0
+}
+
+case "$name" in
+ fixed.cc2compcert|fixed.compcert2cc)
+ if [ $ARCH = arm ] && [ $ABI = hardfloat ] ; then skip; fi
+ ;;
+ struct.cc2compcert|struct.compcert2cc)
+ if [ $ARCH = x86 ] && [ $MODEL = 32sse2 ] ; then
+ # works except on Cygwin
+ if [ $SYSTEM = cygwin ] ; then skip; fi
+ elif [ $ARCH = powerpc ] && [ $ABI = linux ] ; then
+ # works
+ :
+ else
+ skip
+ fi
+ ;;
+esac
+
+# Administer the test
+
+if $SIMU ./$name
+then
+ echo "$name: passed"
+ exit 0
+else
+ echo "$name: FAILED"
+ exit 2
+fi
+
+