teemtee / fmf

Flexible Metadata Format
GNU General Public License v2.0
22 stars 28 forks source link

`context` should always populate `path` #227

Open LecrisUT opened 6 months ago

LecrisUT commented 6 months ago

This is if we want to use:

adjust:
  when: path ~ r"/plans/(?P<dep>pypi|system)/(?P<test_type>unit|integration)(?:/.*)?"
  context+:
    dependencies: $@{regex_match['dep']}
  filter: "tag:$@{regex_match['test_type']"

Borrowing the regex syntax of #226.

This would help design the n-dim fmf trees

lukaszachy commented 5 months ago

Could you please clarify it should be really a path (which we have defined only in tmt) but not a name (which is valid in fmf )?

LecrisUT commented 5 months ago

This is about context so the name of the variable is still to be decided. The content of the variable should be the name/path of the fmf leaf object, i.e. the output of fmf ls. It might be tricky because some paths are virtual like in tmt discover and it is unclear which value it should expand in that case, but that might be more relevant on the TMT_TEST_NAME case instead.