1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-01 10:52:33 +01:00

config: fixing an issue introduced by previous config fix...

When the merging logic was updated to preserve duplicates within the
same list, it inadvertently broke the logic that removed items marked
for removal with a '~'. This commit rectifies that.

Note to self: merging functions are doing *way* to much; they should be
refactored into several individual function and config should be
resolved in distinct stages.
This commit is contained in:
Sergei Trofimov
2015-04-30 13:34:21 +01:00
parent 799558d201
commit 8b606dd5f9
2 changed files with 14 additions and 2 deletions

View File

@@ -167,6 +167,13 @@ class ConfigTest(TestCase):
self.config.finalize()
assert_equal(self.config.instrumentation['list_params']['param'], [0.1, 0.1, 0.1])
def test_remove_instrument(self):
self.config.load_config({'instrumentation': ['list_params']})
a = Agenda('{config: {instrumentation: [~list_params] }}')
self.config.set_agenda(a)
self.config.finalize()
assert_equal(self.config.instrumentation, {})
def test_global_instrumentation(self):
self.config.load_config({'instrumentation': ['global_instrument']})
ws = AgendaWorkloadEntry(id='a', iterations=1, name='linpack', instrumentation=['local_instrument'])