tmt icon indicating copy to clipboard operation
tmt copied to clipboard

`test.require` does not work with `context.distro`

Open LecrisUT opened this issue 9 months ago • 2 comments

In a test's fmf file I was trying:

require:
  - python3-pytest
  - python3-pytest-check
  - python3-flexmock
test: python3 -m pytest

adjust:
  when: distro == ubuntu
  require-:
    - python3-pytest-check
    - python3-flexmock

But this does not seem to work: https://github.com/LecrisUT/tmt-cmake/pull/6

It doesn't seem to be the syntax since the same when: distro == ubuntu is in the tests with the prepare. But discover is done even before provision so there is no valid context for distro to be able to be used at that point.

LecrisUT avatar May 05 '24 11:05 LecrisUT