aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/test.sh
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-02-26 17:49:07 +0100
committerTobias Brunner <tobias@strongswan.org>2014-03-20 15:29:27 +0100
commitd151cd283e1f7368f4c9e92665b6aad6efbc38f1 (patch)
tree74277db234ea8c2a9d52f1e5348c97cb92edd8f0 /scripts/test.sh
parent0e6f3a380ae96877b46a9b420ecf70a6aa86f4c5 (diff)
downloadstrongswan-d151cd283e1f7368f4c9e92665b6aad6efbc38f1.tar.bz2
strongswan-d151cd283e1f7368f4c9e92665b6aad6efbc38f1.tar.xz
Add Travis CI config and build script
Diffstat (limited to 'scripts/test.sh')
-rwxr-xr-xscripts/test.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/test.sh b/scripts/test.sh
new file mode 100755
index 000000000..9b38c1136
--- /dev/null
+++ b/scripts/test.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Build script for Travis CI
+
+if test -z $TRAVIS_BUILD_DIR; then
+ TRAVIS_BUILD_DIR=$PWD
+fi
+
+cd $TRAVIS_BUILD_DIR
+
+TARGET=check
+
+case "$TEST" in
+default)
+ ;;
+openssl)
+ CONFIG="--disable-defaults --enable-tools --enable-openssl"
+ ;;
+gcrypt)
+ CONFIG="--disable-defaults --enable-tools --enable-gcrypt --enable-pkcs1"
+ ;;
+all)
+ CONFIG="--enable-all --disable-android-dns --disable-android-log
+ --disable-dumm --disable-kernel-pfroute --disable-keychain
+ --disable-lock-profiler --disable-maemo --disable-padlock
+ --disable-osx-attr --disable-tkm --disable-uci"
+ # not enabled on the build server
+ CONFIG="$CONFIG --disable-af-alg"
+ # TODO: add tests for different printf implementations?
+ CONFIG="$CONFIG --disable-vstr"
+ # TODO: enable? perhaps via coveralls.io (cpp-coveralls)?
+ CONFIG="$CONFIG --disable-coverage"
+ ;;
+dist)
+ TARGET=distcheck
+ ;;
+*)
+ echo "$0: unknown test $TEST" >&2
+ exit 1
+ ;;
+esac
+
+CONFIG="$CONFIG
+ --enable-silent-rules
+ --enable-test-vectors
+ --enable-monolithic=${MONOLITHIC-no}
+ --enable-leak-detective=${LEAK_DETECTIVE-no}"
+
+echo "$ ./configure $CONFIG && make $TARGET"
+./configure $CONFIG && make $TARGET