Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py

Issue 610483002: Handle the case freq state data read from file is empty for sysfs_power_montior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py b/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py
index e3a6043d4b34e8252d4353213b6dc69d4873a003..a01862433c29125b6ffe6b7ecf9a31697e36f245 100644
--- a/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py
@@ -16,7 +16,8 @@ class SysfsPowerMonitorMonitorTest(unittest.TestCase):
'1200000 2082\n1100000 2943\n1000000 6560\n900000 12517\n'
'800000 8690\n700000 5105\n600000 3800\n500000 5131\n400000 5479\n'
'300000 7571\n200000 133618',
- 'cpu2': '1700000 1131'
+ 'cpu2': '1700000 1131',
+ 'cpu3': '1700000 1131'
}
final_freq = {
'cpu0': '1700000 7159\n1600000 0\n1500000 0\n1400000 68\n1300000 134\n'
@@ -27,7 +28,8 @@ class SysfsPowerMonitorMonitorTest(unittest.TestCase):
'1200000 2272\n1100000 3163\n1000000 7039\n900000 13800\n'
'800000 9599\n700000 5655\n600000 4144\n500000 5655\n400000 6005\n'
'300000 8288\n200000 149724',
- 'cpu2': None
+ 'cpu2': None,
+ 'cpu3': ''
}
expected_initial_freq = {
'cpu0': {
@@ -68,6 +70,9 @@ class SysfsPowerMonitorMonitorTest(unittest.TestCase):
},
'cpu2': {
1700000000: 1131
+ },
+ 'cpu3': {
+ 1700000000: 1131
}
}
expected_final_freq = {
@@ -107,7 +112,8 @@ class SysfsPowerMonitorMonitorTest(unittest.TestCase):
300000000: 8288,
200000000: 149724
},
- 'cpu2': None
+ 'cpu2': None,
+ 'cpu3': {}
}
expected_freq_percents = {
'whole_package': {
@@ -166,7 +172,10 @@ class SysfsPowerMonitorMonitorTest(unittest.TestCase):
},
'cpu2': {
1700000000: 0.0,
- }
+ },
+ 'cpu3': {
+ 1700000000: 0.0,
+ }
}
def testParseCpuFreq(self):
« no previous file with comments | « tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698