Migrate STI tests to tmt

Related to: RHEL-58212
This commit is contained in:
Katerina Koukiou 2025-09-17 09:41:26 +02:00
parent 90be9a956b
commit ce899054a0
3 changed files with 32 additions and 22 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

31
plans/tests.fmf Normal file
View File

@ -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

View File

@ -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"