From 650cec047f79997a378746bc798ea1a9a07cc3f8 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Wed, 3 Sep 2025 11:24:05 +0200 Subject: [PATCH] Migrate cryptsetup gating tests from sti to tmt. --- {tests/.fmf => .fmf}/version | 0 ci.fmf | 1 + gating.yaml | 18 +---------------- plans/cryptsetup.fmf | 39 ++++++++++++++++++++++++++++++++++++ plans/env.yaml | 2 ++ plans/run-local-tests.sh | 8 ++++++++ tests/provision.fmf | 5 ----- tests/tests.yml | 28 -------------------------- 8 files changed, 51 insertions(+), 50 deletions(-) rename {tests/.fmf => .fmf}/version (100%) create mode 100644 ci.fmf create mode 100644 plans/cryptsetup.fmf create mode 100644 plans/env.yaml create mode 100755 plans/run-local-tests.sh delete mode 100644 tests/provision.fmf delete mode 100644 tests/tests.yml diff --git a/tests/.fmf/version b/.fmf/version similarity index 100% rename from tests/.fmf/version rename to .fmf/version diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index 42981df..02186a8 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,22 +1,6 @@ ---- !Policy -product_versions: - - fedora-* -decision_contexts: [bodhi_update_push_testing] -subject_type: koji_build -rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} ---- !Policy -product_versions: - - fedora-* -decision_contexts: [bodhi_update_push_stable] -subject_type: koji_build -rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} - --- !Policy product_versions: - rhel-10 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-x86_64.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/cryptsetup.functional} diff --git a/plans/cryptsetup.fmf b/plans/cryptsetup.fmf new file mode 100644 index 0000000..e645ecb --- /dev/null +++ b/plans/cryptsetup.fmf @@ -0,0 +1,39 @@ +summary: cryptsetup gating tests +environment-file: + - plans/env.yaml + +prepare: + - how: feature + epel: enabled + - how: install + package: + - cryptsetup + - cryptsetup-devel + - integritysetup + - veritysetup + - gcc + - make + - kernel-headers + - device-mapper-devel + - expect + - keyutils + - jq + - sharutils + - glibc + - vim-common + - sharutils + +discover: + how: shell + dist-git-source: true + tests: + - name: upstream tier0 + duration: 2h + test: exec plans/run-local-tests.sh + +execute: + - how: tmt + +provision: + hardware: + memory: ">= 3 GB" diff --git a/plans/env.yaml b/plans/env.yaml new file mode 100644 index 0000000..2526948 --- /dev/null +++ b/plans/env.yaml @@ -0,0 +1,2 @@ +--- + CRYPTSETUP_PATH: /sbin diff --git a/plans/run-local-tests.sh b/plans/run-local-tests.sh new file mode 100755 index 0000000..5468317 --- /dev/null +++ b/plans/run-local-tests.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -eux +set -o pipefail + +pushd $TMT_SOURCE_DIR/cryptsetup-*/tests +make -f Makefile.localtest tests +popd diff --git a/tests/provision.fmf b/tests/provision.fmf deleted file mode 100644 index 952b5a6..0000000 --- a/tests/provision.fmf +++ /dev/null @@ -1,5 +0,0 @@ ---- -standard-inventory-qcow2: - qemu: - m: 3G - diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 21e7c29..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,28 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-source - tags: - - classic - - role: standard-test-basic - tags: - - classic - tests: - - upstream_test_suite: - dir: source/tests - run: make -f Makefile.localtest tests - environment: - CRYPTSETUP_PATH: /sbin - required_packages: - - cryptsetup - - cryptsetup-devel - - integritysetup - - veritysetup - - gcc - - make - - kernel-headers - - device-mapper-devel - - expect - - keyutils - - jq - - vim-common - - sharutils