From 7b46089ea755a5c67445a815c36207c895a06d87 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 15 Oct 2018 16:33:34 +0200 Subject: [PATCH] travis: Build tmp2-tss from sources --- scripts/test.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 6f97e2435..1f90b7d6d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -32,6 +32,28 @@ build_botan() cd - } +build_tss2() +{ + TSS2_REV=2.1.0 + 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 + + if test -d "$TSS2_DIR"; then + return + fi + + # the default version of libgcrypt in Ubuntu 14.04 is too old + sudo apt-get update -qq && \ + sudo apt-get install -qq libgcrypt20-dev && + curl -L $TSS2_SRC | tar xz -C $TRAVIS_BUILD_DIR/.. && + cd $TSS2_DIR && + ./configure && + sudo make -j4 install >/dev/null && + sudo ldconfig || exit $? + cd - +} + if test -z $TRAVIS_BUILD_DIR; then TRAVIS_BUILD_DIR=$PWD fi @@ -79,8 +101,6 @@ all|coverage|sonarcloud) --disable-systemd --disable-soup --disable-unwind-backtraces --disable-svc --disable-dbghelp-backtraces --disable-socket-win --disable-kernel-wfp --disable-kernel-iph --disable-winhttp" - # Ubuntu 14.04 does provide a too old libtss2-dev - CONFIG="$CONFIG --disable-tss-tss2" # Ubuntu 14.04 does not provide libnm CONFIG="$CONFIG --disable-nm" # not enabled on the build server @@ -98,6 +118,7 @@ all|coverage|sonarcloud) PYDEPS="pytest" if test "$1" = "deps"; then build_botan + build_tss2 fi ;; win*) -- 2.39.5