From: David Schleef Date: Tue, 15 Jun 2010 01:22:14 +0000 (-0700) Subject: tests: scripts to build/run against old versions X-Git-Tag: orc-0.4.6~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ed79e1d08d9ffdcfbc81a44882952b9a50c53d8;p=platform%2Fupstream%2Forc.git tests: scripts to build/run against old versions --- 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 + +