Migrate from migrate STI tests to tmt
This commit is contained in:
parent
e47543a39c
commit
9b75f209f1
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
29
plans/tests.fmf
Normal file
29
plans/tests.fmf
Normal 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
|
||||
@ -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/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user