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

Side by Side Diff: client/bin/site_utils.py

Issue 3073014: Autotest for ScreenLocker (Closed) Base URL: ssh://git@gitrw.chromium.org/autotest.git
Patch Set: bvt only Created 10 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
« no previous file with comments | « client/bin/site_ui_test.py ('k') | client/site_tests/desktopui_ScreenLocker/control » ('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) 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 time 5 import time
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 7
8 8
9 class TimeoutError(error.TestError): 9 class TimeoutError(error.TestError):
10 """Error raised when we time out when waiting on a condition.""" 10 """Error raised when we time out when waiting on a condition."""
(...skipping 17 matching lines...) Expand all
28 if condition(): 28 if condition():
29 return 29 return
30 if time.time() + sleep_interval - start_time > timeout: 30 if time.time() + sleep_interval - start_time > timeout:
31 if exception: 31 if exception:
32 raise exception 32 raise exception
33 33
34 if desc: 34 if desc:
35 desc = 'Timed out waiting for condition: %s' % desc 35 desc = 'Timed out waiting for condition: %s' % desc
36 else: 36 else:
37 desc = 'Timed out waiting for unnamed condition' 37 desc = 'Timed out waiting for unnamed condition'
38 raise error.TestError(desc) 38 raise TimeoutError, desc
39 39
40 time.sleep(sleep_interval) 40 time.sleep(sleep_interval)
OLDNEW
« no previous file with comments | « client/bin/site_ui_test.py ('k') | client/site_tests/desktopui_ScreenLocker/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698