From ec76e0bb54bf9f97610fda7afd37b0b4807db30b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 22 Jun 2021 11:46:52 -0400 Subject: [PATCH] tests: Add qemu-sanity-check fedora CI job We use `fmf` and `tmt` test config to run qemu-sanity-check, similar to how its done in the spec file at the moment. Add gating.yml that requires these tests to pass before updates can be pushed Signed-off-by: Cole Robinson --- .fmf/version | 1 + gating.yml | 19 +++++++++++++++++++ plans/main.fmf | 8 ++++++++ tests/main.fmf | 20 ++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yml create mode 100644 plans/main.fmf create mode 100644 tests/main.fmf 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/gating.yml b/gating.yml new file mode 100644 index 0000000..c5a24b8 --- /dev/null +++ b/gating.yml @@ -0,0 +1,19 @@ +# From: https://docs.fedoraproject.org/en-US/ci/gating/ + +# For updates-testing +--- !Policy +product_versions: + - fedora-* +decision_contexts: [bodhi_update_push_testing] +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} + +# For rawhide +--- !Policy +product_versions: + - fedora-* +decision_contexts: [bodhi_update_push_stable] +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..0c675d4 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,8 @@ +# toplevel plan boilerplate +summary: qemu tests +description: + Test qemu +discover: + how: fmf +execute: + how: tmt diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..16fe99f --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,20 @@ +# This is 'tmt' config format +# https://tmt.readthedocs.io/en/stable/spec.html + +summary: Runtime test qemu + +require: + - qemu + - qemu-sanity-check + +/smoke: + # Make sure -help doesn't fail + test: | + set -eux + qemu-system-x86_64 -help + qemu-img -help + +/qemu-sanity-check: + test: | + set -eux + qemu-sanity-check -v