From 1d443f4315e0a6f3399f5e8a37688db5f529e41b Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Wed, 21 Aug 2024 11:39:11 +0200 Subject: [PATCH] packit.yml: run gating tests on PRs --- .fmf/version | 1 + packit.yaml | 11 +++++++++++ plans/all.fmf | 10 ++++++++++ test/browser/main.fmf | 1 + test/verify/composerlib.py | 2 +- test/vm.install | 6 ++++-- 6 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/all.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/packit.yaml b/packit.yaml index 6f61c540e..e5243cc66 100644 --- a/packit.yaml +++ b/packit.yaml @@ -21,6 +21,17 @@ jobs: - centos-stream-10 - fedora-all + - job: tests + trigger: pull_request + targets: + - fedora-39 + - fedora-39-aarch64 + - fedora-40 + - fedora-40-aarch64 + - centos-stream-9 + - centos-stream-9-aarch64 + - centos-stream-10 + - job: copr_build trigger: commit branch: "^main$" diff --git a/plans/all.fmf b/plans/all.fmf new file mode 100644 index 000000000..689393ef2 --- /dev/null +++ b/plans/all.fmf @@ -0,0 +1,10 @@ +summary: + Run all tests +discover: + how: fmf +execute: + how: tmt + +# Let's handle them upstream only, don't break Fedora/RHEL reverse dependency gating +environment: + TEST_AUDIT_NO_SELINUX: 1 diff --git a/test/browser/main.fmf b/test/browser/main.fmf index 2090a30bd..3639b3893 100644 --- a/test/browser/main.fmf +++ b/test/browser/main.fmf @@ -18,5 +18,6 @@ - python3 - targetcli - tlog + - podman test: ./browser.sh duration: 1h diff --git a/test/verify/composerlib.py b/test/verify/composerlib.py index e801ec340..835e6b839 100644 --- a/test/verify/composerlib.py +++ b/test/verify/composerlib.py @@ -45,7 +45,7 @@ def setUp(self): # push pre-defined blueprint self.machine.execute(""" - for toml_file in /home/admin/files/*.toml; do + for toml_file in /etc/osbuild-composer/blueprints/*.toml; do composer-cli blueprints push $toml_file done """) diff --git a/test/vm.install b/test/vm.install index ebc6d103d..bf3f1ab0b 100755 --- a/test/vm.install +++ b/test/vm.install @@ -13,15 +13,17 @@ if [ -n "$VG" ]; then fi # Repositories in /etc/osbuild-composer/repositories are used only for on-premise -REPODIR=/etc/osbuild-composer/repositories -sudo mkdir -p $REPODIR +sudo mkdir -p /etc/osbuild-composer/repositories +sudo mkdir -p /etc/osbuild-composer/blueprints # Copy rhel nightly overrides if [ -d /home/admin/files ]; then cp /home/admin/files/rhel-95.json /etc/osbuild-composer/repositories/rhel-95.json cp /home/admin/files/rhel-10.json /etc/osbuild-composer/repositories/rhel-10.0.json + cp /home/admin/files/*.toml /etc/osbuild-composer/blueprints/ else cp test/files/rhel-95.json /etc/osbuild-composer/repositories/rhel-95.json cp test/files/rhel-10.json /etc/osbuild-composer/repositories/rhel-10.json + cp test/files/*.toml /etc/osbuild-composer/blueprints/ fi ln -s /etc/osbuild-composer/repositories/rhel-95.json /etc/osbuild-composer/repositories/rhel-95-beta.json ln -s /etc/osbuild-composer/repositories/rhel-95.json /etc/osbuild-composer/repositories/rhel-95-ga.json