From eccdf14ada78e30dab6435d7d81e8f3c8e486973 Mon Sep 17 00:00:00 2001 From: Jerry Snitselaar Date: Tue, 31 May 2022 07:02:15 -0700 Subject: [PATCH] tpm2-tools: Use build source for tests Resolves: rhbz#2090748 Signed-off-by: Jerry Snitselaar --- tests/runtest.sh | 15 +++++---------- tests/tests.yml | 4 +++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/runtest.sh b/tests/runtest.sh index 8b4dfac..881aa73 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -17,7 +17,7 @@ pushd ibmtpm tar xf ../ibmtpm$IBMTPM_VERSION.tar.gz pushd src # fixup for openssl 3 -sed -i -e "s|OPENSSL_VERSION_NUMBER >= 0x10200000L|OPENSSL_VERSION_NUMBER > 0x30000000L|" TpmToOsslMath.h +sed -i -e "s|OPENSSL_VERSION_NUMBER >= 0x10200000L|OPENSSL_VERSION_NUMBER > 0x30000010L|" TpmToOsslMath.h sed -i -e "s|CCFLAGS = -Wall|CCFLAGS = -Wall -Wno-error=deprecated-declarations|" makefile make @@ -33,12 +33,8 @@ fi popd popd -# get tpm2-tools tests -TPM2_TOOLS_VERSION=5.0 -git clone https://github.com/01org/tpm2-tools.git -pushd tpm2-tools -git checkout -b test $TPM2_TOOLS_VERSION -pushd test/integration +# Update python command in tpm2-tools tests +pushd source/test/integration sed -i -e 's/python/python3/g' helpers.sh pushd tests sed -i -e 's/python/python3/g' *.sh @@ -46,15 +42,14 @@ sed -i -e 's/python/python3/g' *.sh chmod +x *.sh popd popd -popd TPM2_ABRMD=tpm2-abrmd TPM2_SIM=tpm_server -TPM2_TOOLS_TEST_FIXTURES=`pwd`/tpm2-tools/test/integration/fixtures +TPM2_TOOLS_TEST_FIXTURES=`pwd`/source/test/integration/fixtures PATH=`pwd`/ibmtpm/src/:.:$PATH export TPM2_ABRMD TPM2_SIM TPM2_TOOLS_TEST_FIXTURES PATH -pushd tpm2-tools/test/integration +pushd source/test/integration for t in `ls tests/*.sh` do f=`basename $t` diff --git a/tests/tests.yml b/tests/tests.yml index bef9263..18e8e09 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,5 +1,8 @@ - hosts: localhost roles: + - role: standard-test-source + tags: + - always - role: standard-test-basic tags: - classic @@ -17,7 +20,6 @@ - tpm2-abrmd - tpm2-abrmd-selinux - python3 - - git - vim-common - perl-Digest-SHA - dbus-daemon