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

Side by Side Diff: server/site_tests/platform_CryptohomeSyncStressServer/platform_CryptohomeSyncStressServer.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/site_tests/power_x86Settings/power_x86Settings.py ('k') | no next file » | 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) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 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 random, time 5 import random, time
6 from autotest_lib.client.common_lib import error, power_strip 6 from autotest_lib.client.common_lib import error
7 from autotest_lib.client.cros import power_strip
7 from autotest_lib.server import autotest, test 8 from autotest_lib.server import autotest, test
8 9
9 class platform_CryptohomeSyncStressServer(test.test): 10 class platform_CryptohomeSyncStressServer(test.test):
10 version = 1 11 version = 1
11 max_delay = 120 12 max_delay = 120
12 13
13 def run_once(self, host, power_addr, outlet, username, password): 14 def run_once(self, host, power_addr, outlet, username, password):
14 # check parameters 15 # check parameters
15 if power_addr == None: 16 if power_addr == None:
16 raise error.TestFail('Missing power_addr argument.') 17 raise error.TestFail('Missing power_addr argument.')
(...skipping 17 matching lines...) Expand all
34 raise error.TestFail('Client test failed') 35 raise error.TestFail('Client test failed')
35 36
36 # wait for some delay 37 # wait for some delay
37 delay = random.randint(0, self.max_delay) 38 delay = random.randint(0, self.max_delay)
38 print 'Delaying for %s seconds and then restarting.' % (delay) 39 print 'Delaying for %s seconds and then restarting.' % (delay)
39 time.sleep(delay) 40 time.sleep(delay)
40 41
41 # restart client 42 # restart client
42 power_strip.PowerStrip(power_addr).reboot(outlet) 43 power_strip.PowerStrip(power_addr).reboot(outlet)
43 host.wait_for_restart(old_boot_id=boot_id) 44 host.wait_for_restart(old_boot_id=boot_id)
OLDNEW
« no previous file with comments | « client/site_tests/power_x86Settings/power_x86Settings.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698