[enhancement] Properly combine append-type command-line options defined in execution modes
#2788
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The documentation for this case is a bit grey area. In documentation of the
modesconfiguration parameter it is stated:And the docs for the
--moderead as:These are consistent for the options that can be specified only once: every time such an option is re-passed, it overwrites the previous one. But it's unclear what happens with options that are of an
appendtype. The first excerpt implies that the options will be simply unpacked and combined with the same options in the command line (desired behaviour that this PR provides), but the second excerpt allows the interpretation that if such an option is specified in the command line will still overwrite completely that in the execution mode (current behaviour and what was validated in the unit tests).I believe that options that can be specified multiple options must be combined and not overwritten, because this would allow users to set test variables in an execution mode and then set additional variables or reset existing ones from the command line without the need to repass all options.
Since the current behaviour was validated in the existing unit tests, I am not classifying this as a bug fix, but as an enhancement, so it targets the
developbranch.Fixes #2785.