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

Side by Side Diff: tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor_unittest.py

Issue 394923003: [telemetry] Add IPPET power monitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Increase timeout again to 20s. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import logging
6 import unittest
7
8 from telemetry import decorators
9 from telemetry.core.platform import win_platform_backend
10 from telemetry.core.platform.power_monitor import ippet_power_monitor
11
12
13 class IppetPowerMonitorTest(unittest.TestCase):
14 @decorators.Enabled('win')
15 def testFindOrInstallIppet(self):
16 self.assertTrue(ippet_power_monitor.IppetPath())
17
18 @decorators.Enabled('win')
19 def testIppetRunsWithoutErrors(self):
20 # Very basic test, doesn't validate any output data.
21 platform_backend = win_platform_backend.WinPlatformBackend()
22 power_monitor = ippet_power_monitor.IppetPowerMonitor(platform_backend)
23 if not power_monitor.CanMonitorPower():
24 logging.warning('Test not supported on this platform.')
25 return
26
27 power_monitor.StartMonitoringPower(None)
28 statistics = power_monitor.StopMonitoringPower()
29
30 self.assertEqual(statistics['identifier'], 'ippet')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698