]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
travis: Add Botan build
authorTobias Brunner <tobias@strongswan.org>
Wed, 8 Aug 2018 09:35:46 +0000 (11:35 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Sep 2018 14:25:00 +0000 (16:25 +0200)
We build Botan directly from the master branch until 2.8.0 is released.

.travis.yml
scripts/test.sh

index 8e36f4ebe9ec97df52ce9d0ec67d10e7442ef615..d220950c714e512ef695ef56ef643caa88dd3834 100644 (file)
@@ -38,6 +38,8 @@ env:
     - TEST=default
     - TEST=default MONOLITHIC=yes
     - TEST=default LEAK_DETECTIVE=yes
+    - TEST=botan
+    - TEST=botan LEAK_DETECTIVE=yes
     - TEST=openssl
     - TEST=openssl LEAK_DETECTIVE=yes
     - TEST=gcrypt
index 58dc7307e492e20b6e4be4a7a2aeae961fe20e2f..a2ec74a4b96c5326bdc303b7f4bb3fd8cfdbe455 100755 (executable)
@@ -26,6 +26,32 @@ gcrypt)
        CONFIG="--disable-defaults --enable-pki --enable-gcrypt --enable-pkcs1"
        DEPS="libgcrypt11-dev"
        ;;
+botan)
+       CONFIG="--disable-defaults --enable-pki --enable-botan"
+       # we can't use the old package that comes with Ubuntu so we build from
+       # the current master until 2.8.0 is released and then probably switch to
+       # that unless we need newer features (at least 2.7.0 plus PKCS#1 patch is
+       # currently required)
+       DEPS=""
+       if test "$1" = "deps"; then
+               # if the leak detective is enabled we have to disable threading support
+               # (used for std::async) as that causes invalid frees somehow, the
+               # locking allocator causes a static leak via the first function that
+               # references it (e.g. crypter or hasher), so we disable that too
+               if test "$LEAK_DETECTIVE" = "yes"; then
+                       BOTAN_CONFIG="--without-os-features=threads
+                                                 --disable-modules=locking_allocator"
+               fi
+               # disable some larger modules we don't need for the tests
+               BOTAN_CONFIG="$BOTAN_CONFIG --disable-modules=pkcs11,tls,x509,xmss"
+               git clone --depth 1 https://github.com/randombit/botan.git botan &&
+               cd botan &&
+               python ./configure.py $BOTAN_CONFIG &&
+               make -j4 libs >/dev/null &&
+               sudo make install >/dev/null &&
+               sudo ldconfig || exit $?
+       fi
+       ;;
 printf-builtin)
        CONFIG="--with-printf-hooks=builtin"
        ;;
@@ -43,6 +69,8 @@ all|coverage|sonarcloud)
        CONFIG="$CONFIG --disable-nm"
        # not enabled on the build server
        CONFIG="$CONFIG --disable-af-alg"
+       # separate test case with external dependency
+       CONFIG="$CONFIG --disable-botan"
        if test "$TEST" != "coverage"; then
                CONFIG="$CONFIG --disable-coverage"
        else