From f42791e23e36f07a1b21056e95c6902f05dc4610 Mon Sep 17 00:00:00 2001 From: guazhang Date: Tue, 14 May 2024 09:41:06 +0000 Subject: [PATCH] Add fmf gating plans --- .fmf/version | 1 + ci.fmf | 1 + gating.yaml | 2 +- plans/env.yaml | 2 + plans/udisks2.fmf | 68 +++++++++++++++++++++++++++ tests/{tests.yml => ignore_tests.yml} | 0 6 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 plans/env.yaml create mode 100644 plans/udisks2.fmf rename tests/{tests.yml => ignore_tests.yml} (100%) diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 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 4ca9235..37b81df 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,4 +3,4 @@ product_versions: - rhel-10 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/udisks2.functional} diff --git a/plans/env.yaml b/plans/env.yaml new file mode 100644 index 0000000..ffdfbe1 --- /dev/null +++ b/plans/env.yaml @@ -0,0 +1,2 @@ +--- + version: '2.10.1' diff --git a/plans/udisks2.fmf b/plans/udisks2.fmf new file mode 100644 index 0000000..d4cdf08 --- /dev/null +++ b/plans/udisks2.fmf @@ -0,0 +1,68 @@ +summary: udisks2 testing +environment-file: + - plans/env.yaml + +prepare: + how: install + package: + - dbus-daemon + - python3-blivet + - python3-bytesize + - python3-systemd + - targetcli + - smartmontools + - xfsprogs + - dosfstools + - e2fsprogs + - cryptsetup + - python3-six + - sqlite + - libstoragemgmt + - python3-libstoragemgmt + - udisks2-iscsi + - udisks2-lsm + - udisks2-lvm2 + - nvme-cli + +discover: + how: shell + url: https://gitlab.com/redhat/centos-stream/rpms/udisks2.git + ref: c10s + dist-git-source: true + dist-git-install-builddeps: true + tests: + - name: regression tests + test: > + set -x + systemctl restart libstoragemgmt.service; + systemctl restart iscsi-init.service; + systemctl restart udisks2.service; + if [ -z "$version" ];then + #version=$(grep -E "Version" $TMT_SOURCE_DIR/udisks2.spec | head -1 |sed 's/Version: //'); + echo "don't defind the version" + exit 1 + fi; + pushd $TMT_SOURCE_DIR/udisks-${version}; + /usr/bin/udisksctl dump; + pushd $TMT_SOURCE_DIR/udisks-${version}/src/tests/; + find -name '*.py' -or -name integration-test | while read i; do sed -e 's/time\\.sleep(/time.sleep(5*/' -i $i; done; + popd; + pushd $TMT_SOURCE_DIR/udisks-${version}/src/tests/dbus-tests/; + echo "UDISKS_MODULES_ENABLED = { 'lvm2', 'iscsi', 'lsm' }" > config_h.py; + echo "PACKAGE_SYSCONF_DIR = '/etc/'" >> config_h.py; + popd; + targetcli clearconfig confirm=True; + python3 src/tests/dbus-tests/run_tests.py --system; + targetcli clearconfig confirm=True; + pushd $TMT_SOURCE_DIR/udisks-${version}/src/tests/; + python3 ./integration-test --log-file=integration-tests.log 2>&1; + popd; + cat src/tests/integration-tests.log; + cat flight_record.log; + cat journaldump.log; +execute: + - how: tmt +adjust: + enabled: false + when: distro == fedora + because: They don't have access to internal repos. diff --git a/tests/tests.yml b/tests/ignore_tests.yml similarity index 100% rename from tests/tests.yml rename to tests/ignore_tests.yml