fmf icon indicating copy to clipboard operation
fmf copied to clipboard

allow to push attribute's diff from above

Open sopos opened this issue 4 years ago • 2 comments

Normally one can do

require:
  - a
/X:
  require+:
    - b

In the tmt the test case normally defined require: so it replaces eventual parents require:.

Now, the use case is to be able to force some requirement from the parent to the childs.

+require:
  - a
/X:
  require:
    - b

This +require: would ackt the same as require+: but applied in opposite order. So every child node would append it. It might be reset as usual +require: '' or added, deducted by +require+:, +require-: respectively. The same forced deduction might work with -require:.

What I want to achieve: instead of updating all the test with requirement for a library referenced with url/name I would propagate it this way so I can manage it centrally.

sopos avatar Nov 11 '20 16:11 sopos

Just an obvious note: By solely using merging in children nodes (everywhere require+) you can achieve desired effect right now. However with this new merging prefix one will be unable to override parent's attribute.

lukaszachy avatar Nov 19 '20 08:11 lukaszachy

After some thinking I must say that if this is implemented it should be done on tmt side. Simply +require would be treated as any other attribute (redefining, adding, deducting works as normally). Just tmt would merge +require and require into a final require. The workaround with using require+ everywhere is also possible it is just not that convenient.

sopos avatar Jan 04 '21 22:01 sopos