]> git.ipfire.org Git - people/ms/strongswan.git/blobdiff - scripts/test.sh
Use Botan 2.13.0 for tests
[people/ms/strongswan.git] / scripts / test.sh
index 254cf64bd678124addf76556ed1abd12a18f9784..5ed4a1570ec1415270a9ff107fc82df21ac89eec 100755 (executable)
@@ -4,7 +4,7 @@
 build_botan()
 {
        # same revision used in the build recipe of the testing environment
-       BOTAN_REV=2.11.0
+       BOTAN_REV=2.13.0
        BOTAN_DIR=$TRAVIS_BUILD_DIR/../botan
 
        if test -d "$BOTAN_DIR"; then
@@ -36,7 +36,7 @@ build_botan()
 
 build_wolfssl()
 {
-       WOLFSSL_REV=v4.1.0-stable
+       WOLFSSL_REV=v4.3.0-stable
        WOLFSSL_DIR=$TRAVIS_BUILD_DIR/../wolfssl
 
        if test -d "$WOLFSSL_DIR"; then
@@ -63,7 +63,7 @@ build_wolfssl()
 
 build_tss2()
 {
-       TSS2_REV=2.1.0
+       TSS2_REV=2.3.1
        TSS2_PKG=tpm2-tss-$TSS2_REV
        TSS2_DIR=$TRAVIS_BUILD_DIR/../$TSS2_PKG
        TSS2_SRC=https://github.com/tpm2-software/tpm2-tss/releases/download/$TSS2_REV/$TSS2_PKG.tar.gz
@@ -79,50 +79,13 @@ build_tss2()
        sudo apt-get install -qq libgcrypt20-dev &&
        curl -L $TSS2_SRC | tar xz -C $TRAVIS_BUILD_DIR/.. &&
        cd $TSS2_DIR &&
-       ./configure &&
+       ./configure --disable-doxygen-doc &&
        make -j4 >/dev/null &&
        sudo make install >/dev/null &&
        sudo ldconfig || exit $?
        cd -
 }
 
-build_openssl()
-{
-       SSL_REV=1.1.1c
-       SSL_PKG=openssl-$SSL_REV
-       SSL_DIR=$TRAVIS_BUILD_DIR/../$SSL_PKG
-       SSL_SRC=https://www.openssl.org/source/$SSL_PKG.tar.gz
-       SSL_INS=/usr/local/ssl
-       SSL_OPT="shared no-tls no-dtls no-ssl3 no-zlib no-comp no-idea no-psk no-srp
-                        no-stdio no-tests enable-rfc3779 enable-ec_nistp_64_gcc_128
-                        --api=1.1.0"
-
-       if test -d "$SSL_DIR"; then
-               return
-       fi
-
-       echo "$ build_openssl()"
-
-       curl -L $SSL_SRC | tar xz -C $TRAVIS_BUILD_DIR/.. &&
-       cd $SSL_DIR &&
-       ./config --prefix=$SSL_INS --openssldir=$SSL_INS $SSL_OPT &&
-       make -j4 >/dev/null &&
-       sudo make install_sw >/dev/null &&
-       echo $SSL_INS/lib | sudo tee /etc/ld.so.conf.d/openssl-$SSL_REV.conf >/dev/null &&
-       sudo ldconfig || exit $?
-       cd -
-}
-
-use_custom_openssl()
-{
-       CFLAGS="$CFLAGS -I/usr/local/ssl/include"
-       LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib"
-       export LDFLAGS
-       if test "$1" = "deps"; then
-               build_openssl
-       fi
-}
-
 if test -z $TRAVIS_BUILD_DIR; then
        TRAVIS_BUILD_DIR=$PWD
 fi
@@ -144,10 +107,6 @@ openssl*)
        CONFIG="--disable-defaults --enable-pki --enable-openssl --enable-pem"
        export TESTS_PLUGINS="test-vectors pem openssl!"
        DEPS="libssl-dev"
-       if test "$TEST" != "openssl-1.0"; then
-               DEPS=""
-               use_custom_openssl $1
-       fi
        ;;
 gcrypt)
        CONFIG="--disable-defaults --enable-pki --enable-gcrypt --enable-pkcs1"
@@ -197,14 +156,13 @@ all|coverage|sonarcloud)
        DEPS="$DEPS libcurl4-gnutls-dev libsoup2.4-dev libunbound-dev libldns-dev
                  libmysqlclient-dev libsqlite3-dev clearsilver-dev libfcgi-dev
                  libpcsclite-dev libpam0g-dev binutils-dev libunwind8-dev libnm-dev
-                 libjson0-dev iptables-dev python-pip libtspi-dev libsystemd-dev"
-       PYDEPS="pytest"
+                 libjson-c-dev iptables-dev python-pip libtspi-dev libsystemd-dev"
+       PYDEPS="tox"
        if test "$1" = "deps"; then
                build_botan
                build_wolfssl
                build_tss2
        fi
-       use_custom_openssl $1
        ;;
 win*)
        CONFIG="--disable-defaults --enable-svc --enable-ikev2
@@ -334,8 +292,6 @@ if test "$1" = "deps"; then
                ;;
        osx)
                brew update && \
-               # workaround for issue #6352
-               brew uninstall --force libtool && brew install libtool && \
                brew install $DEPS
                ;;
        freebsd)
@@ -374,6 +330,12 @@ esac
 echo "$ make $TARGET"
 case "$TEST" in
 sonarcloud)
+       # there is an issue with the platform detection that causes sonarqube to
+       # fail on bionic with "ERROR: ld.so: object '...libinterceptor-${PLATFORM}.so'
+       # from LD_PRELOAD cannot be preloaded (cannot open shared object file)"
+       # https://jira.sonarsource.com/browse/CPP-2027
+       BW_PATH=$(dirname $(which build-wrapper-linux-x86-64))
+       cp $BW_PATH/libinterceptor-x86_64.so $BW_PATH/libinterceptor-haswell.so
        # without target, coverage is currently not supported anyway because
        # sonarqube only supports gcov, not lcov
        build-wrapper-linux-x86-64 --out-dir bw-output make -j4 || exit $?