From ce899054a01870a05df51ab1421e483478baecd8 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Wed, 17 Sep 2025 09:41:26 +0200 Subject: [PATCH] Migrate STI tests to tmt Related to: RHEL-58212 --- .fmf/version | 1 + plans/tests.fmf | 31 +++++++++++++++++++++++++++++++ tests/tests.yml | 22 ---------------------- 3 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/tests.fmf delete mode 100644 tests/tests.yml 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/plans/tests.fmf b/plans/tests.fmf new file mode 100644 index 0000000..25e6b9f --- /dev/null +++ b/plans/tests.fmf @@ -0,0 +1,31 @@ +summary: Standard tests for python-simpleline +prepare: + how: install + package: + - python3 + - python3-simpleline + +discover: + how: shell + dist-git-source: true + dist-git-install-builddeps: true + tests: + - name: smoke import test + test: | + set -euo pipefail + python3 -c "import simpleline" + - name: upstream test suite + test: | + set -euxo pipefail + if [ -z "${PKG_VER:-}" ]; then + PKG_VER=$(rpmspec -q --srpm --qf "%{version}" python-simpleline.spec) + fi + if [ -z "$PKG_VER" ]; then + echo "Error: Unable to extract package version" >&2 + exit 1 + fi + pushd "$TMT_SOURCE_DIR/simpleline-${PKG_VER}" + make test + +execute: + - how: tmt diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index c741e07..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- hosts: localhost - roles: - - role: standard-test-source - tags: - - always - - - role: standard-test-basic - tags: - - classic - required_packages: - - python3-simpleline - - python3-gobject-base - - tests: - - smoke: - dir: . - run: /usr/libexec/platform-python -c "import simpleline" - - unit: - dir: ./source/tests - run: /usr/libexec/platform-python -m unittest discover -v -p "*_test.py" -