From e19a208cf3ec04363d504b29efba19f2d8d2519b Mon Sep 17 00:00:00 2001 From: Milos Malik Date: Mon, 11 Jul 2022 13:33:22 +0200 Subject: [PATCH] run tests via TMT/FMF Use the TMT/FMF instead of STI for running tests. STI does not respect the adjust section in main.fmf files of stored tests. --- .fmf/version | 1 + plans/selinux.fmf | 7 +++++ plans/tests.fmf | 5 ++++ .../main.fmf | 11 +++++++ .../runtest.sh | 1 - tests/Sanity/sedta/main.fmf | 30 +++++++++++++++++++ .../Sanity/seinfo-consistent-output/main.fmf | 15 ++++++++++ .../seinfo-consistent-output/runtest.sh | 1 - tests/tests.yml | 22 -------------- 9 files changed, 69 insertions(+), 24 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/selinux.fmf create mode 100644 plans/tests.fmf create mode 100644 tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf create mode 100644 tests/Sanity/sedta/main.fmf create mode 100644 tests/Sanity/seinfo-consistent-output/main.fmf delete mode 100644 tests/tests.yml 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/plans/selinux.fmf b/plans/selinux.fmf new file mode 100644 index 0000000..b20003c --- /dev/null +++ b/plans/selinux.fmf @@ -0,0 +1,7 @@ +summary: selinux tests - Tier 1 | policycoreutils | checkpolicy +discover: + how: fmf + url: https://src.fedoraproject.org/tests/selinux + filter: "tier: 1 | component: policycoreutils | component: checkpolicy" +execute: + how: tmt diff --git a/plans/tests.fmf b/plans/tests.fmf new file mode 100644 index 0000000..1caffcc --- /dev/null +++ b/plans/tests.fmf @@ -0,0 +1,5 @@ +summary: setools test plan +discover: + how: fmf +execute: + how: tmt diff --git a/tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf b/tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf new file mode 100644 index 0000000..11ff640 --- /dev/null +++ b/tests/Regression/The-setools-package-doesn-t-install-any-tools/main.fmf @@ -0,0 +1,11 @@ +summary: Make sure setools requires setools-console and setools-gui +contact: Vit Mojzis +component: + - setools +test: ./runtest.sh +framework: beakerlib +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1820078 +extra-summary: /CoreOS/setools/Regression/The-setools-package-doesn-t-install-any-tools +extra-task: /CoreOS/setools/Regression/The-setools-package-doesn-t-install-any-tools diff --git a/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh b/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh index 16267ce..ad83754 100755 --- a/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh +++ b/tests/Regression/The-setools-package-doesn-t-install-any-tools/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setools" diff --git a/tests/Sanity/sedta/main.fmf b/tests/Sanity/sedta/main.fmf new file mode 100644 index 0000000..e0c2de1 --- /dev/null +++ b/tests/Sanity/sedta/main.fmf @@ -0,0 +1,30 @@ +summary: Does sedta work as expected? Does it support all features? +description: '' +contact: Milos Malik +component: + - setools +test: ./runtest.sh +framework: beakerlib +recommend: + - git + - policycoreutils + - setools-console-analyses +duration: 1h +enabled: true +tag: + - CI-Tier-1 + - NoRHEL4 + - NoRHEL5 + - NoRHEL6 + - NoRHEL7 + - TIPfail_Security + - f32friendly + - f33friendly + - targeted +adjust: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6, rhel-7 + continue: false +extra-nitrate: TC#0604139 +extra-summary: /CoreOS/setools/Sanity/sedta +extra-task: /CoreOS/setools/Sanity/sedta diff --git a/tests/Sanity/seinfo-consistent-output/main.fmf b/tests/Sanity/seinfo-consistent-output/main.fmf new file mode 100644 index 0000000..1c908d7 --- /dev/null +++ b/tests/Sanity/seinfo-consistent-output/main.fmf @@ -0,0 +1,15 @@ +summary: Check whether different 2 or more runs of same seinfo commands produce same + output +description: '' +contact: Petr Lautrbach +component: + - setools +test: ./runtest.sh +framework: beakerlib +recommend: + - setools-console +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=2019962 +extra-summary: Sanity/seinfo-consistent-output +extra-task: Sanity/seinfo-consistent-output diff --git a/tests/Sanity/seinfo-consistent-output/runtest.sh b/tests/Sanity/seinfo-consistent-output/runtest.sh index da49081..0ad39a7 100755 --- a/tests/Sanity/seinfo-consistent-output/runtest.sh +++ b/tests/Sanity/seinfo-consistent-output/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setools-console" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index c840ce4..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Test to run in classic context -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - repositories: - - repo: "https://src.fedoraproject.org/tests/selinux.git" - dest: "selinux" - fmf_filter: "tier: 1 | component: policycoreutils | component: checkpolicy" - -# Test to run in classic context -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - Sanity/sedta - - Regression/The-setools-package-doesn-t-install-any-tools - - Sanity/seinfo-consistent-output