Migrate from migrate STI tests to tmt

This commit is contained in:
Katerina Koukiou 2025-07-09 07:01:20 +02:00
parent 22a3cfc752
commit 0005e63823
3 changed files with 30 additions and 20 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

29
plans/tests.fmf Normal file
View File

@ -0,0 +1,29 @@
summary: Standard tests for dasbus
prepare:
how: install
package:
- python3
- python3-dasbus
- dbus-daemon
discover:
how: shell
dist-git-source: true
dist-git-install-builddeps: true
tests:
- name: upstream test suite
test: |
set -x
if [ -z "$PKG_VER" ]; then
PKG_VER=`rpmspec -q --srpm --qf "%{version}" python-dasbus.spec`
fi
if [ -z "$PKG_VER" ]; then
echo "Error: Unable to extract package version"
exit 1
fi
pushd $TMT_SOURCE_DIR/dasbus-${PKG_VER}
dasbus_path=$(find /usr/ -path */site-packages | tr '\n' ':')
PYTHONPATH=$dasbus_path python3 -m unittest discover -v -s ./tests/
execute:
- how: tmt

View File

@ -1,20 +0,0 @@
- hosts: localhost
roles:
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
required_packages:
- python3
- python3-dasbus
- dbus-daemon
tests:
- smoke_test:
dir: .
run: python3 -c "import dasbus"
- unit_tests:
dir: .
run: python3 -m unittest discover -v -s ./source/tests/