From 34275d24dfc3c73e5c8b9638eac4b8945d149615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Hor=C3=A1=C4=8Dek?= Date: Tue, 30 Sep 2025 19:21:41 +0200 Subject: [PATCH] Update tests to tmt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: RHEL-94933 Signed-off-by: Štěpán Horáček --- .fmf/version | 2 ++ plan.fmf | 24 ++++++++++++++++++++++++ tests/runtest.sh | 10 ++++++---- tests/test.fmf | 3 +++ tests/tests.yml | 30 ------------------------------ 5 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 .fmf/version create mode 100644 plan.fmf create mode 100644 tests/test.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d474e1b --- /dev/null +++ b/.fmf/version @@ -0,0 +1,2 @@ +1 + diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..b5ce6dd --- /dev/null +++ b/plan.fmf @@ -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 diff --git a/tests/runtest.sh b/tests/runtest.sh index 47b3a2f..f432c56 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -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` diff --git a/tests/test.fmf b/tests/test.fmf new file mode 100644 index 0000000..eeec447 --- /dev/null +++ b/tests/test.fmf @@ -0,0 +1,3 @@ +summary: upstream testsuite +test: ./runtest.sh +duration: 60m diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index f751483..0000000 --- a/tests/tests.yml +++ /dev/null @@ -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