diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-02-04 20:55:43 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-02-04 20:55:43 +0000 |
commit | 52a25237d894fd5736a90f11df2c5c9391d13fd5 (patch) | |
tree | 2b0e65b1e1de52b56aaa9b04999fe6223d1a7b0f /polly/lib/External/isl/imath/tests/test.sh | |
parent | b6472fe3da9a20bcceb7b24af4ce9f0c4e79b254 (diff) | |
download | bcm5719-llvm-52a25237d894fd5736a90f11df2c5c9391d13fd5.tar.gz bcm5719-llvm-52a25237d894fd5736a90f11df2c5c9391d13fd5.zip |
Import isl(+imath) as an external library into Polly
With this patch Polly is always GPL-free (no dependency on GMP any more). As a
result, building and distributing Polly will be easier. Furthermore, there is no
need to tightly coordinate isl and Polly releases anymore.
We import isl b3e0fa7a05d as well as imath 4d707e5ef2. These are the git
versions Polly currently was tested with when using utils/checkout_isl.sh. The
imported libraries are both MIT-style licensed.
We build isl and imath with -fvisibility=hidden to avoid clashes in case other
projects (such as gcc) use conflicting versions of isl. The use of imath can
temporarily reduce compile-time performance of Polly. We will work on
performance tuning in tree.
Patches to isl should be contributed first to the main isl repository and can
then later be reimported to Polly.
This patch is also a prerequisite for the upcoming isl C++ interface.
llvm-svn: 228193
Diffstat (limited to 'polly/lib/External/isl/imath/tests/test.sh')
-rwxr-xr-x | polly/lib/External/isl/imath/tests/test.sh | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/polly/lib/External/isl/imath/tests/test.sh b/polly/lib/External/isl/imath/tests/test.sh new file mode 100755 index 00000000000..d1ced881e34 --- /dev/null +++ b/polly/lib/External/isl/imath/tests/test.sh @@ -0,0 +1,77 @@ +#!/bin/sh +## +## Name: test.sh +## Purpose: Run test suites for IMath library. +## Author: M. J. Fromberger <http://spinning-yarns.org/michael/> +## + +if [ ! -f ../imtest ] ; then + echo "I can't find the imath test driver 'imtest', did you build it?" + echo "I can't proceed with the unit tests until you do so, sorry." + exit 1 +fi + +echo "-- Running all available unit tests" +../imtest *.t | grep -v OK + +echo "" +echo "-- Running test to compute 1024 decimal digits of pi" +if [ ! -f ../pi ] ; then + echo "I can't find the pi computing program, did you build it?" + echo "I can't proceed with the pi test until you do so, sorry." + exit 1 +fi + +tempfile="/tmp/pi.1024.$$" + +../pi 1024 | tr -d '\r\n' > ${tempfile} +if cmp -s ${tempfile} ./pi1024.txt ; then + echo " PASSED 1024 digits" +else + echo " FAILED" + echo "Obtained:" + cat ${tempfile} + echo "Expected:" + cat ./pi1024.txt +fi +rm -f ${tempfile} + +tempfile="/tmp/pi.1698.$$" + +echo "-- Running test to compute 1698 hexadecimal digits of pi" + +../pi 1698 16 | tr -d '\r\n' > ${tempfile} +if cmp -s ${tempfile} ./pi1698-16.txt ; then + echo " PASSED 1698 digits" +else + echo " FAILED" + echo "Obtained:" + cat ${tempfile} + echo "Expected:" + cat ./pi1698-16.txt +fi +rm -f ${tempfile} + +tempfile="/tmp/pi.1500.$$" + +echo "-- Running test to compute 1500 decimal digits of pi" + +../pi 1500 10 | tr -d '\r\n' > ${tempfile} +if cmp -s ${tempfile} ./pi1500-10.txt ; then + echo " PASSED 1500 digits" +else + echo " FAILED" + echo "Obtained:" + cat ${tempfile} + echo "Expected:" + cat ./pi1500-10.txt +fi +rm -f ${tempfile} + +echo "-- Running regression tests" + +for bug in bug-swap ; do + ../${bug} +done + +exit 0 |