diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-09-12 22:24:51 +0100 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-09-13 15:51:47 +0100 |
commit | 6c8ebf37eb0555242df765d1fed20f631d049d8e (patch) | |
tree | 2718fabdfb74d93e679e3415a7c01c2453947dd3 /.travis/testing-utils.sh | |
parent | 64aaf2ff840d205a878012bf88bd8e884165d57f (diff) | |
download | klee-6c8ebf37eb0555242df765d1fed20f631d049d8e.tar.gz |
Add TravisCI testing infrastructure files.
Diffstat (limited to '.travis/testing-utils.sh')
-rwxr-xr-x | .travis/testing-utils.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.travis/testing-utils.sh b/.travis/testing-utils.sh new file mode 100755 index 00000000..27bd420d --- /dev/null +++ b/.travis/testing-utils.sh @@ -0,0 +1,40 @@ +#!/bin/bash -x +# Make sure we exit if there is a failure +set -e + +if [ "${LLVM_VERSION}" != "2.9" ]; then + # Using LLVM3.4 all we need is vanilla GoogleTest :) + wget https://googletest.googlecode.com/files/gtest-1.7.0.zip + unzip gtest-1.7.0.zip + cd gtest-1.7.0/ + cmake . + make + # Normally I wouldn't do something like this but hey we're running on a temporary virtual machine, so who cares? + sudo cp lib* /usr/lib/ + sudo cp -r include/gtest /usr/include +else + # LLVM2.9 on the other hand is a pain + + # We need the version of GoogleTest used in LLVM2.9 + # This is a hack + old_dir=`pwd` + cd "${KLEE_SRC}" + cd tools/ + svn export http://llvm.org/svn/llvm-project/llvm/branches/release_29/utils/unittest unittest + + # Now put the header files in the search path so building will succeed + sudo cp -r unittest/googletest/include/gtest /usr/include/ + + # We need the FileCheck and not utilites as well because they aren't in the llvm-2.9-dev package + for tool in FileCheck not; do + svn export http://llvm.org/svn/llvm-project/llvm/branches/release_29/utils/${tool} ${tool} + # Patch the Makefile so it will work in KLEE's build system + sed -i 's/^USEDLIBS.*$/LINK_COMPONENTS = support/' ${tool}/Makefile + done + + # Now hack the make file to build the unittest library and the FileCheck and not tools + sed -i '0,/^PARALLEL_DIRS/a PARALLEL_DIRS += unittest FileCheck not' Makefile + + cd "${old_dir}" +fi + |