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

Fixing locally defined instruments erroneously propagating into global instrumentation

This commit is contained in:
Sergei Trofimov
2015-05-15 10:01:26 +01:00
parent 512bacc1be
commit a450957b9a
2 changed files with 17 additions and 1 deletions

View File

@@ -42,6 +42,14 @@ workloads:
- dhrystone
"""
INSTRUMENTATION_AGENDA_TEXT = """
config:
instrumentation: [execution_time]
workloads:
- dhrystone
- name: angrybirds
instrumentation: [fsp]
"""
class MockExtensionLoader(object):
@@ -167,6 +175,13 @@ class ConfigTest(TestCase):
self.config.finalize()
assert_equal(self.config.instrumentation['list_params']['param'], [0.1, 0.1, 0.1])
def test_instrumentation_specification(self):
a = Agenda(INSTRUMENTATION_AGENDA_TEXT)
self.config.set_agenda(a)
self.config.finalize()
assert_equal(self.config.workload_specs[0].instrumentation, ['execution_time'])
assert_equal(self.config.workload_specs[1].instrumentation, ['fsp', 'execution_time'])
def test_remove_instrument(self):
self.config.load_config({'instrumentation': ['list_params']})
a = Agenda('{config: {instrumentation: [~list_params] }}')