Update tests to tmt

Resolves: RHEL-94933

Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
This commit is contained in:
Štěpán Horáček 2025-09-30 19:21:41 +02:00
parent e35286de81
commit 34275d24df
5 changed files with 35 additions and 34 deletions

2
.fmf/version Normal file
View File

@ -0,0 +1,2 @@
1

24
plan.fmf Normal file
View File

@ -0,0 +1,24 @@
summary: running tpm2-tools tests
prepare:
how: install
package:
- git
- automake
- openssl
- openssl-devel
- sed
- tpm2-tss
- tpm2-tss-devel
- tpm2-tools
- tpm2-abrmd
- tpm2-abrmd-selinux
- swtpm
- python3
- vim-common
- perl-Digest-SHA
- dbus-daemon
discover:
how: fmf
dist-git-source: true
execute:
how: tmt

View File

@ -1,7 +1,9 @@
#!/bin/bash
cd ../..
# Update python command in tpm2-tools tests
pushd source/test/integration
pushd source/tpm2-tools-5.2/test/integration
sed -i -e 's/python/python3/g' helpers.sh
pushd tests
sed -i -e 's/python/python3/g' *.sh
@ -12,14 +14,14 @@ popd
TPM2_ABRMD=tpm2-abrmd
TPM2_SIM=swtpm
TPM2_TOOLS_TEST_FIXTURES=`pwd`/source/test/integration/fixtures
TPM2_TOOLS_TEST_FIXTURES=`pwd`/source/tpm2-tools-5.2/test/integration/fixtures
PATH=.:$PATH
abs_srcdir=`pwd`/source
abs_srcdir=`pwd`/source/tpm2-tools-5.2
srcdir=$abs_srcdir
test_drv=`rpm -ql automake | grep test-driver`
export TPM2_ABRMD TPM2_SIM TPM2_TOOLS_TEST_FIXTURES PATH abs_srcdir srcdir
pushd source/test/integration
pushd source/tpm2-tools-5.2/test/integration
for t in `ls tests/*.sh`
do
f=`basename $t`

3
tests/test.fmf Normal file
View File

@ -0,0 +1,3 @@
summary: upstream testsuite
test: ./runtest.sh
duration: 60m

View File

@ -1,30 +0,0 @@
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
required_packages:
- git
- role: standard-test-basic
tags:
- classic
required_packages:
- automake
- openssl
- openssl-devel
- sed
- tpm2-tss
- tpm2-tss-devel
- tpm2-tools
- tpm2-abrmd
- tpm2-abrmd-selinux
- swtpm
- python3
- vim-common
- perl-Digest-SHA
- dbus-daemon
tests:
- intel-tpm2:
dir: .
run: dbus-run-session ./runtest.sh
timeout: 60m