Migrate cryptsetup gating tests from sti to tmt.

Modified and reviewed by Ondrej Kozina <okozina@redhat.com>.

- Resolves: RHELMISC-9572
This commit is contained in:
guazhang 2025-02-20 06:42:43 +00:00 committed by Ondrej Kozina
parent fdcd9a23a6
commit d14b872e02
5 changed files with 76 additions and 10 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

View File

@ -1,15 +1,6 @@
--- !Policy
product_versions:
- fedora-33
- fedora-rawhide
decision_context: bodhi_update_push_stable
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-9
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}

71
plans/cryptsetup.fmf Normal file
View File

@ -0,0 +1,71 @@
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
- vim-common
- sharutils
- cryptsetup-libs
- glibc
- libblkid
- popt
- libpwquality
- libuuid
- popt-devel
- libpwquality-devel
- rubygem-asciidoctor
discover:
how: shell
url: https://gitlab.com/redhat/centos-stream/rpms/cryptsetup.git
ref: c9s
dist-git-source: true
dist-git-install-builddeps: true
tests:
- name: regression tests
test: |
set -x
if [ -z "$PKG_VER" ]; then
PKG_VER=`rpmspec -q --srpm --qf "%{version}" cryptsetup.spec`
fi
if [ -z "$PKG_VER" ]; then
echo "Error: Unable to extract package version"
exit 1
fi
pushd $TMT_SOURCE_DIR/cryptsetup-${PKG_VER}/tests
if [[ -z $CRYPTSETUP_PATH ]];then
export CRYPTSETUP_PATH="/sbin"
fi
make -f Makefile.localtest tests
if [[ $? != 0 ]];then
echo "Something was wrong here in localtests"
exit 2
fi
popd
execute:
- how: tmt
provision:
hardware:
memory: ">= 3 GB"
adjust:
enabled: false
when: distro == fedora
because: They don't have access to internal repos.

2
plans/env.yaml Normal file
View File

@ -0,0 +1,2 @@
---
CRYPTSETUP_PATH: /sbin