I'm following the TMT documentation and am now trying to install the necessary test dependencies:
❱❱❱ cat plans/unit-tests.fmf summary: Run unit tests prepare: how: install package: - python3-pylint - python3-gobject-base - make execute: script: make ci
The test run fails as there is nothing installed, it seems to entirely ignore the package: list?
package:
Locally it seems fine:
❱❱❱ tmt run --all provision --how local /var/tmp/tmt/run-005 /plans/unit-tests discover how: shell directory: /var/home/martin/upstream/python-simpleline summary: 1 test selected provision how: local distro: Fedora 33 (Container Image) summary: 1 guest provisioned prepare how: install package: python3-pylint, python3-gobject-base and make summary: 1 preparation applied execute how: tmt summary: 1 test executed report how: display summary: 1 test passed finish summary: 0 tasks completed total: 1 test passed
```
This was triggered on https://github.com/martinpitt/python-simpleline/pull/1 , but I'll force-push to that a lot still as that's my current learning playground.
Oops, sorry. prepare: itself is a dictionary, not a list. The documentation mentions that, I just copied it from another PR which got that wrong.
prepare:
I fixed the syntax now:
Now the test run does not complain/crash any more, but it seems to entirely ignore the package: bit, and does not install anything.
Sorry @martinpitt , we are migrating Packit to "new" Testing Farm backend, you are seeing there issues because it does not use tmt tool as a runner and the support is fairly outdated.
tmt
As workaround, you could add installation to do "manually":100:
summary: Run unit tests execute: how: shell script: - dnf -y install python3-pylint python3-gobject-base make - make ci
I believe this will work
Thanks @mvadkert ! Indeed I had a similar idea and moved to prepare: how: shell. The test didn't start yet, but if that doesn't work I'll move it into execute:.
execute:
Either way, this isn't a blocker for me, I just wanted to report it. Thanks!
Update: That works!
prepare: how: shell script: dnf install -y python3-pylint python3-gobject-base make
@martinpitt I will close this once this is finally done, we are getting close
Metadata Update from @mvadkert: - Issue assigned to mvadkert
Metadata Update from @mvadkert: - Issue tagged with: Testing Farm