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

Unified Diff: tools/telemetry/telemetry/core/platform/cros_sysfs_platform_unittest.py

Issue 509043002: [Telemetry] Combine SysfsPlatformBackend into LinuxBasedPlatformBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: tools/telemetry/telemetry/core/platform/cros_sysfs_platform_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/cros_sysfs_platform_unittest.py b/tools/telemetry/telemetry/core/platform/cros_sysfs_platform_unittest.py
deleted file mode 100644
index d1ecfd1876058a7af9cdb93dda24b2754af8fa49..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/core/platform/cros_sysfs_platform_unittest.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from telemetry.core.platform import cros_sysfs_platform
-
-
-class CrosSysfsPlatformTest(unittest.TestCase):
- initial_cstate = {
- 'cpu0': 'POLL\nC1\nC2\nC3\n0\n138356189\n102416540\n'
- '17158209182\n0\n1\n500\n1000\n1403211341',
- 'cpu1': 'POLL\nC1\nC2\nC3\n0\n107318149\n81786238\n'
- '17348563431\n0\n1\n500\n1000\n1403211341'
- }
- expected_cstate = {
- 'cpu0': {
- 'C0': 1403193942018089,
- 'C1': 138356189,
- 'C2': 102416540,
- 'C3': 17158209182
- },
- 'cpu1': {
- 'C0': 1403193803332182,
- 'C1': 107318149,
- 'C2': 81786238,
- 'C3': 17348563431
- }
- }
- def testCrosParseCpuStates(self):
- # Use mock start and end times to allow for the test to calculate C0.
- results = cros_sysfs_platform.CrosSysfsPlatform.ParseStateSample(
- self.initial_cstate)
- for cpu in results:
- for state in results[cpu]:
- self.assertAlmostEqual(results[cpu][state],
- self.expected_cstate[cpu][state])

Powered by Google App Engine
This is Rietveld 408576698