summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-06-14 18:22:14 -0700
committerDavid Schleef <ds@schleef.org>2010-06-14 18:24:55 -0700
commit5ed79e1d08d9ffdcfbc81a44882952b9a50c53d8 (patch)
tree2e8d311460588e1e873c92dbc9b75a204688a2e8 /testsuite
parent732713efb3742feca0bab5b070c5850fa4b33b1e (diff)
tests: scripts to build/run against old versions
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/compatibility/build_compat_libs31
-rwxr-xr-xtestsuite/compatibility/check45
2 files changed, 76 insertions, 0 deletions
diff --git a/testsuite/compatibility/build_compat_libs b/testsuite/compatibility/build_compat_libs
new file mode 100755
index 0000000..ab64539
--- /dev/null
+++ b/testsuite/compatibility/build_compat_libs
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+set -x
+
+topdir=`pwd`
+builddir=${topdir}/build
+installdir=${topdir}/install
+
+#rm -rf ${builddir} ${installdir}
+mkdir -p ${builddir}
+mkdir -p ${installdir}
+
+for version in 0.4.0 0.4.1 0.4.2 0.4.3 0.4.4 0.4.5
+do
+
+ test -f orc-${version}.tar.gz || \
+ wget http://code.entropywave.com/download/orc/orc-${version}.tar.gz
+
+ tar -xzf orc-${version}.tar.gz --directory ${builddir}
+
+ cd ${builddir}/orc-${version}
+ ./configure --prefix=${topdir}/install/${version}
+ make
+ make install
+ cd ${topdir}
+
+done
+
+rm -rf ${builddir}
+
diff --git a/testsuite/compatibility/check b/testsuite/compatibility/check
new file mode 100755
index 0000000..462ff73
--- /dev/null
+++ b/testsuite/compatibility/check
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+topdir=`pwd`
+installdir=${topdir}/install
+
+testfile=../test.orc
+#testfile=../floatparam.orc
+
+../../tools/orcc -o impl.c --implementation ${testfile}
+../../tools/orcc -o test.c --test ${testfile}
+
+echo " compile run"
+echo " impl test test"
+for version in 0.4.0 0.4.1 0.4.2 0.4.3 0.4.4 0.4.5
+do
+ gcc -Wall -Werror -I${installdir}/${version}/include/orc-0.4/ -c -o impl.o impl.c &>/dev/null
+ res=$?
+ if [ "$res" = "0" ] ; then
+ result_impl="yes"
+ else
+ result_impl=" no"
+ fi
+
+ rm -f test
+ gcc -Wall -Werror -I${installdir}/${version}/include/orc-0.4/ -L${installdir}/${version}/lib -lorc-0.4 -lorc-test-0.4 -o test test.c &>/dev/null
+ res=$?
+ if [ "$res" = "0" ] ; then
+ result_test_compile="yes"
+ else
+ result_test_compile=" no"
+ fi
+
+ LD_LIBRARY_PATH=${installdir}/${version}/lib \
+ test -f ./test && ./test &>/dev/null
+ res=$?
+ if [ "$res" = "0" ] ; then
+ result_test_run="yes"
+ else
+ result_test_run=" no"
+ fi
+
+ echo "$version $result_impl $result_test_compile $result_test_run"
+done
+
+