diff options
author | Javi Merino <javi.merino@arm.com> | 2014-07-02 18:34:24 +0100 |
---|---|---|
committer | Javi Merino <javi.merino@arm.com> | 2015-08-12 14:52:40 +0100 |
commit | d44312f4ec66d1f144352858cfc9ba8c5280a0f5 (patch) | |
tree | 58e2bd2a22308cc5bc10f096f6b751d6ae65c6cf /tests/test_thermal.py | |
parent | c68e37998a9ae8d59723ae74cfbc236a75549158 (diff) | |
download | trappy-d44312f4ec66d1f144352858cfc9ba8c5280a0f5.tar.gz |
thermal: teach trace_parser_explode_array() to handle more than one array in the trace
Diffstat (limited to 'tests/test_thermal.py')
-rw-r--r-- | tests/test_thermal.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_thermal.py b/tests/test_thermal.py index 2df6130..054fa59 100644 --- a/tests/test_thermal.py +++ b/tests/test_thermal.py @@ -26,6 +26,14 @@ class TestThermalMethods(unittest.TestCase): line = "cpus=0000000f freq=1400000 raw_cpu_power=189 load0=3 load1=2 load2=12 load3=2 power=14" self.assertEquals(thermal.trace_parser_explode_array(line), line) + def test_trace_parser_explode_array_2(self): + """trace_parser_explode_array() works if there's two arrays in the string""" + + line = "cpus=0000000f freq=1400000 load={3 2 12 2} power=14 req_power={10 7 2 34}" + expected = "cpus=0000000f freq=1400000 load0=3 load1=2 load2=12 load3=2 power=14 req_power0=10 req_power1=7 req_power2=2 req_power3=34" + + self.assertEquals(thermal.trace_parser_explode_array(line), expected) + class TestThermalBase(utils_tests.SetupDirectory): def __init__(self, *args, **kwargs): super(TestThermalBase, self).__init__( |