On 2025/07/31 15:42, Pavol Sloboda wrote:
Hello,
I am currently reworking the tests for bodhi for Mariadb from STI to
TMT as per the fedora change [0] and I came across an issue with the
versioned vs unversioned rpms of Mariadb (this issue seems to be
present in the STI tests as well), where the versioned mariadb rpms
are named differently than the unversioned ones and I want to
preferably keep the same tests for both kinds of packages by setting a
flag for tmt or using the `-e` flag (or any other option) in `tmt run`
to set an environment variable during the testing process in bodhi. Is
there a way to do something like this? How exactly are the tests
called inside of bodhi? I have gone over the documentation but I
haven't found anything on this topic.
A bit more context on the tests being run is needed. Iiuc, you have a
repo with common tests for multiple Mariadb packages which differ by
either installed package or cli names or equivalent in the test files?
For the former, testing-farm currently installs all packages (although
it is desired to get rid of that) so it might not be an issue there.
For the latter it depends on how you structure the tests. Ideally the
tests are shared and the plans are divergent in each repo, then you can
add either an environment variable [1] from which you can change the
tests execution. Recently you can do that with `plan.import` as well,
but I haven't experimented with it to tell you if there are any
pitfalls, but feel free to try that if you have different test
organization you want to use.
[1]: https://tmt.readthedocs.io/en/stable/spec/plans.html#environment
--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue