aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/ci/travis/install.sh
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-14 13:21:26 -0400
committerJack Lloyd <[email protected]>2016-10-24 21:07:01 -0400
commitd78a540dd0145665805e9804d8f20a71c39b0bf8 (patch)
tree4536cf911e8744a61756312a62f9ad51cb4041f1 /src/scripts/ci/travis/install.sh
parent36e0ea1e407027ac48e82b56016a6813ff6a1082 (diff)
Add TPM and PKCS #11 to coverage build
SoftHSMv1 included in 14.04 is too old and many tests fail, so grabs prebuilt SoftHSMv2 binaries from www.randombit.net. This can change to use the packaged SoftHSM in 16.04, whenever Travis makes that available.
Diffstat (limited to 'src/scripts/ci/travis/install.sh')
-rwxr-xr-xsrc/scripts/ci/travis/install.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/scripts/ci/travis/install.sh b/src/scripts/ci/travis/install.sh
index 30c54fdbe..c3e4ee834 100755
--- a/src/scripts/ci/travis/install.sh
+++ b/src/scripts/ci/travis/install.sh
@@ -28,8 +28,17 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo pip install sphinx
fi
- if [ "$BUILD_MODE" = "valgrind" ] || [ "${BUILD_MODE:0:5}" = "cross" ]; then
+ if [ "$BUILD_MODE" = "coverage" ]; then
+ sudo apt-get install trousers libtspi-dev
+
+ # SoftHSMv1 in 14.04 does not work
+ # Installs prebuilt SoftHSMv2 binaries into /tmp
+ wget https://www.randombit.net/softhsm2-trusty-bin.tar.bz2
+ tar -C / -xvjf softhsm2-trusty-bin.tar.bz2
+ /tmp/softhsm/bin/softhsm2-util --init-token --free --label test --pin 123456 --so-pin 12345678
+ fi
+ if [ "$BUILD_MODE" = "valgrind" ] || [ "${BUILD_MODE:0:5}" = "cross" ]; then
if [ "$BUILD_MODE" = "valgrind" ]; then
sudo apt-get install valgrind
elif [ "$BUILD_MODE" = "cross-win32" ]; then