tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Do not present discover phase name as a part of test name

Open janhavlin opened this issue 1 year ago • 1 comments

When multiple phase are used in the discover step, phase name is presented as a part of the test name. Filtering, however, does support only the real test name, without the prefix.

Example of a discover step defining two named phases which import tests from a remote url:

discover:
  - name: first
    url: ...
    ...
  - name: second
    url: ...
    ...

Both destinations could contain tests named /tests/one and /tests/two, and currently, tmt presents the discovered tests including the phase name:

/first/tests/one
/first/tests/two
/second/tests/one
/second/tests/two

Currently, it is not possible to filter by the names as they're presented, running tmt run discover test --name /first/tests/one would not return anything as the test name is actually just /tests/one.

As discussed, the phase name should be distinguished from the test name:

first::/tests/one
first::/tests/two
second::/tests/one
second::/tests/two

On the command line, using the phase name will be allowed when filtering tests by name:

tmt run test --name "first::/tests/first"

Additinonally, the discover phase name should be stored in the tests.yaml (already) and results.yaml (tbd).

Encountered in https://redhat-internal.slack.com/archives/C03BRN71JAF/p1708424104910169.

janhavlin avatar Feb 27 '24 10:02 janhavlin

Be aware of related issue https://github.com/teemtee/tmt/issues/2768

happz avatar Mar 26 '24 10:03 happz

Moved to 1.44 as discussed on the tmt hacking meeting

thrix avatar Jan 28 '25 14:01 thrix