config: add 'include' and 'override'
including a config file and overriding some properties is helpful when we do not want to modify the original config but run it with sligthly different properties. this involves some redesign a.o.: - modules are collected in a dict instead of a list in order for 'override' to find the related module - checking for duplicates happens in the Collector Do not warn when included file does not end with '_cfg.py', as this may be intentional, in case a file is only used via 'include' and not as cfg file alone. + remove unused method Collector.append + complain with specific error message when Node is not given Change-Id: Id568f04d6d84622ef2547412eb6f288fcebf986f Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/36357 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -92,8 +92,8 @@ def test_cfg_not_existing(direc, log):
|
||||
def collector_helper(node, mods):
|
||||
n = NodeCollector()
|
||||
n.add(*node)
|
||||
m = Collector(Mod)
|
||||
m.list = [Mod(module, '', '') for module in mods]
|
||||
m = Collector()
|
||||
m.modules = {module: Mod(module, '', '') for module in mods}
|
||||
return n, m
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user