From ec76e0bb54bf9f97610fda7afd37b0b4807db30b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Jun 22 2021 15:46:52 +0000 Subject: 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 --- 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