From b24e06b5b1855c8f86cd97b6d67cdb51a5f81a06 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Tue, 9 Jan 2024 14:32:51 +0100 Subject: [PATCH] Logic rework of fmf files and add dnf4 build steps --- .../integration/behave-createrepo_c.fmf | 2 +- plans/dnf4/integration/behave-dnf.fmf | 9 +++++++++ plans/dnf4/main.fmf | 18 ++++++++++++++++++ plans/dnf5/integration/behave-createrepo_c.fmf | 8 ++++++++ plans/{ => dnf5}/integration/behave-dnf5.fmf | 3 ++- .../integration/behave-dnf5daemon.fmf | 3 ++- plans/dnf5/main.fmf | 12 ++++++++++++ plans/integration/behave-dnf.fmf | 7 ------- plans/main.fmf | 12 ++---------- 9 files changed, 54 insertions(+), 20 deletions(-) rename plans/{ => dnf4}/integration/behave-createrepo_c.fmf (82%) create mode 100644 plans/dnf4/integration/behave-dnf.fmf create mode 100644 plans/dnf4/main.fmf create mode 100644 plans/dnf5/integration/behave-createrepo_c.fmf rename plans/{ => dnf5}/integration/behave-dnf5.fmf (57%) rename plans/{ => dnf5}/integration/behave-dnf5daemon.fmf (62%) create mode 100644 plans/dnf5/main.fmf delete mode 100644 plans/integration/behave-dnf.fmf diff --git a/plans/integration/behave-createrepo_c.fmf b/plans/dnf4/integration/behave-createrepo_c.fmf similarity index 82% rename from plans/integration/behave-createrepo_c.fmf rename to plans/dnf4/integration/behave-createrepo_c.fmf index 62adcb84c..caf22565b 100644 --- a/plans/integration/behave-createrepo_c.fmf +++ b/plans/dnf4/integration/behave-createrepo_c.fmf @@ -5,4 +5,4 @@ execute: script: | $TMT_PLANS_DATA/ci-dnf-stack/container-test \ --suite createrepo_c \ - run + -c dnf4-testing-container run diff --git a/plans/dnf4/integration/behave-dnf.fmf b/plans/dnf4/integration/behave-dnf.fmf new file mode 100644 index 000000000..f4ae400bd --- /dev/null +++ b/plans/dnf4/integration/behave-dnf.fmf @@ -0,0 +1,9 @@ +summary: Run Behave Test Suite - DNF +tag: dnf +execute: + how: tmt + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + --suite dnf \ + run + diff --git a/plans/dnf4/main.fmf b/plans/dnf4/main.fmf new file mode 100644 index 000000000..ce342213f --- /dev/null +++ b/plans/dnf4/main.fmf @@ -0,0 +1,18 @@ +summary: Prepare the DNF4 environment + +prepare+: + - name: Checkout DNF4 branch + how: shell + script: | + if [ "$PACKIT_UPSTREAM_NAME" == "dnf" ]; then + git -C $TMT_PLANS_DATA/ci-dnf-stack checkout dnf-4-stack + fi + + - name: Build DNF4 testing container + how: shell + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + -c dnf4-testing-container build \ + --base $( echo "$@distro" | tr '-' ':') \ + --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ + --container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS" diff --git a/plans/dnf5/integration/behave-createrepo_c.fmf b/plans/dnf5/integration/behave-createrepo_c.fmf new file mode 100644 index 000000000..062a9d27a --- /dev/null +++ b/plans/dnf5/integration/behave-createrepo_c.fmf @@ -0,0 +1,8 @@ +summary: Run Behave Test Suite - CREATEREPO_C +tag: createrepo_c +execute: + how: tmt + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + --suite createrepo_c \ + -c dnf5-testing-container run diff --git a/plans/integration/behave-dnf5.fmf b/plans/dnf5/integration/behave-dnf5.fmf similarity index 57% rename from plans/integration/behave-dnf5.fmf rename to plans/dnf5/integration/behave-dnf5.fmf index 6961d8002..eb9d6f8ce 100644 --- a/plans/integration/behave-dnf5.fmf +++ b/plans/dnf5/integration/behave-dnf5.fmf @@ -3,6 +3,7 @@ tag: dnf5 execute: how: tmt script: | - $TMT_PLANS_DATA/ci-dnf-stack/container-test run \ + $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + -c dnf5-testing-container run \ --tags dnf5 \ --command dnf5 diff --git a/plans/integration/behave-dnf5daemon.fmf b/plans/dnf5/integration/behave-dnf5daemon.fmf similarity index 62% rename from plans/integration/behave-dnf5daemon.fmf rename to plans/dnf5/integration/behave-dnf5daemon.fmf index ee3ece32c..e74609267 100644 --- a/plans/integration/behave-dnf5daemon.fmf +++ b/plans/dnf5/integration/behave-dnf5daemon.fmf @@ -3,6 +3,7 @@ tag: dnf5daemon execute: how: tmt script: | - $TMT_PLANS_DATA/ci-dnf-stack/container-test run \ + $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + -c dnf5-testing-container run \ --tags dnf5daemon \ --command dnf5daemon-client diff --git a/plans/dnf5/main.fmf b/plans/dnf5/main.fmf new file mode 100644 index 000000000..fb84bd52e --- /dev/null +++ b/plans/dnf5/main.fmf @@ -0,0 +1,12 @@ +summary: Prepare the DNF5 environment + +prepare+: + - name: Build DNF5 testing container + how: shell + script: | + $TMT_PLANS_DATA/ci-dnf-stack/container-test \ + -c dnf5-testing-container build \ + --base $( echo "$@distro" | tr '-' ':') \ + --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ + --container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS" + diff --git a/plans/integration/behave-dnf.fmf b/plans/integration/behave-dnf.fmf deleted file mode 100644 index a67772fce..000000000 --- a/plans/integration/behave-dnf.fmf +++ /dev/null @@ -1,7 +0,0 @@ -summary: Run Behave Test Suite - DNF -tag: dnf -execute: - how: tmt - script: | - $TMT_PLANS_DATA/ci-dnf-stack/container-test run - diff --git a/plans/main.fmf b/plans/main.fmf index 24071e852..685766eed 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -1,6 +1,6 @@ -summary: Prepare CI DNF Stack +summary: Prepare Tests -tag: integration +tag: all prepare: - name: Install packages to build fedora container @@ -21,11 +21,3 @@ prepare: git -C $TMT_PLANS_DATA/ci-dnf-stack checkout --track pull-request/$PACKIT_SOURCE_BRANCH git -C $TMT_PLANS_DATA/ci-dnf-stack rebase $PACKIT_TARGET_BRANCH fi - - - name: Build testing container - how: shell - script: | - $TMT_PLANS_DATA/ci-dnf-stack/container-test build \ - --base $( echo "$@distro" | tr '-' ':') \ - --container-arg="--env=COPR=$PACKIT_COPR_PROJECT" \ - --container-arg="--env=COPR_RPMS=$PACKIT_COPR_RPMS"