1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

fw/config: union augmentation aliases, rather than merge

If more then one of augmentation entries ("augmentations",
"instrumenatation", "output_processors") is specified in the same
config they were being merged into a single entry.

This can cause issues with '~~' (drop everything glyph) being "resolved"
during this merge and therefore not actually used to drop all previous
augmentations.

Union'ing, instead of merging, configs at the same level avoids that.
Note that this is semantically correct, as we're not enforcing
precedence at the same level of config, so merge semantics do not apply.
This commit is contained in:
sergei Trofimov 2018-05-01 09:15:17 +01:00 committed by Marc Bonnici
parent aacba47f9a
commit dd9a72f043

View File

@ -265,7 +265,7 @@ def merge_augmentations(raw):
raise ConfigError(msg.format(check_entry, e, conflict_string))
if entries:
raw['augmentations'] = reduce(lambda x, y: x.merge_with(y), entries)
raw['augmentations'] = reduce(lambda x, y: x.union(y), entries)
def _pop_aliased(d, names, entry_id):