From f7a9cbe29f2de63f8bbeb23097154592f6922464 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 31 Aug 2022 07:03:13 +0200 Subject: [PATCH] Onboard package into gating --- .fmf/version | 1 + ci.fmf | 1 + gating.yaml | 8 ++++++++ plans/etree-fromstring.py | 7 +++++++ plans/smoke.fmf | 12 ++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 gating.yaml create mode 100644 plans/etree-fromstring.py create mode 100644 plans/smoke.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/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..8653363 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - fedora-* +decision_contexts: + - bodhi_update_push_testing + - bodhi_update_push_stable +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke.functional} diff --git a/plans/etree-fromstring.py b/plans/etree-fromstring.py new file mode 100644 index 0000000..b400cc0 --- /dev/null +++ b/plans/etree-fromstring.py @@ -0,0 +1,7 @@ +import lxml.etree as et +s = 'ac' +x = et.fromstring(s) +t = x.find('bar').text +print(t) +if t != 'abc': + raise Exception() diff --git a/plans/smoke.fmf b/plans/smoke.fmf new file mode 100644 index 0000000..908e08d --- /dev/null +++ b/plans/smoke.fmf @@ -0,0 +1,12 @@ +summary: Basic smoke test +discover: + how: shell + tests: + - name: /smoke/import-python-module + test: | + python3 -c 'import importlib as il; print(il.import_module("lxml"))' + - name: /smoke/etree-fromstring + test: | + python3 plans/etree-fromstring.py +execute: + how: tmt