tpm2-tools: Use build source for tests

Resolves: rhbz#2090748

Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
This commit is contained in:
Jerry Snitselaar 2022-05-31 07:02:15 -07:00
parent 1ec5ef1702
commit eccdf14ada
2 changed files with 8 additions and 11 deletions

View File

@ -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`

View File

@ -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