diff mbox series

[ima-evm-utils:,2/5] ima-evm-utils: travis: download, compile, and install a swTPM

Message ID 20200731182408.696931-3-zohar@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series initial travis support | expand

Commit Message

Mimi Zohar July 31, 2020, 6:24 p.m. UTC
Verifying the "boot_aggregate" requires reading the TPM PCRs for each of
the TPM banks.  In test environments without a physical TPM, a software
TPM may be used.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
 .travis.yml            |  2 ++
 tests/install-swtpm.sh | 11 +++++++++++
 2 files changed, 13 insertions(+)
 create mode 100755 tests/install-swtpm.sh
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index bf287898221e..fa2a37625d52 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,8 @@  addons:
    - xsltproc
    - docbook-xsl
    - docbook-xml
+install:
+   - ./tests/install-swtpm.sh
 script:
    - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check TESTS="ima_hash.test sign_verify.test";
 
diff --git a/tests/install-swtpm.sh b/tests/install-swtpm.sh
new file mode 100755
index 000000000000..071e9c9ae442
--- /dev/null
+++ b/tests/install-swtpm.sh
@@ -0,0 +1,11 @@ 
+#!/bin/sh
+
+set -ex
+wget https://sourceforge.net/projects/ibmswtpm2/files/ibmtpm1332.tar.gz/download
+mkdir ibmtpm1332
+cd ibmtpm1332
+tar -xvzf ../download
+cd src
+make -j$(nproc)
+sudo cp tpm_server /usr/local/bin/
+cd ../..