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

Side by Side Diff: client/site_tests/power_ARMSettings/power_ARMSettings.py

Issue 6627029: Refactor site_power_status, power_strip modules into client/cros. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 9 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
« no previous file with comments | « client/cros/power_strip.py ('k') | client/site_tests/power_Backlight/power_Backlight.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import glob, logging, os, re 5 import glob, logging, os, re
6 from autotest_lib.client.bin import test 6 from autotest_lib.client.bin import test, utils
7 from autotest_lib.client.common_lib import error, site_power_status, utils 7 from autotest_lib.client.common_lib import error
8 from autotest_lib.client.cros import power_status
8 9
9 class power_ARMSettings(test.test): 10 class power_ARMSettings(test.test):
10 version = 1 11 version = 1
11 12
12 def run_once(self): 13 def run_once(self):
13 if not self._check_cpu_type(): 14 if not self._check_cpu_type():
14 raise error.TestNAError('Unsupported CPU') 15 raise error.TestNAError('Unsupported CPU')
15 16
16 power_status = site_power_status.get_status() 17 status = power_status.get_status()
17 if power_status.linepower[0].online: 18 if status.linepower[0].online:
18 logging.info('AC Power is online') 19 logging.info('AC Power is online')
19 self._on_ac = True 20 self._on_ac = True
20 else: 21 else:
21 logging.info('AC Power is offline') 22 logging.info('AC Power is offline')
22 self._on_ac = False 23 self._on_ac = False
23 24
24 failures = '' 25 failures = ''
25 26
26 fail_count = self._verify_wifi_power_settings() 27 fail_count = self._verify_wifi_power_settings()
27 if fail_count: 28 if fail_count:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 continue 83 continue
83 84
84 out = utils.read_one_line(level_file) 85 out = utils.read_one_line(level_file)
85 logging.debug('USB: path set to %s for %s', 86 logging.debug('USB: path set to %s for %s',
86 out, level_file) 87 out, level_file)
87 if out != expected_state: 88 if out != expected_state:
88 logging.info(level_file) 89 logging.info(level_file)
89 errors += 1 90 errors += 1
90 91
91 return errors 92 return errors
OLDNEW
« no previous file with comments | « client/cros/power_strip.py ('k') | client/site_tests/power_Backlight/power_Backlight.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698