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

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

Issue 3213006: [autotest] Ensure that we clear /tmp/uptime-login-prompt-ready before starting a new test (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 3 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 | « no previous file | 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 errno, logging, os, re, utils, signal, subprocess, time 5 import errno, logging, os, re, utils, signal, subprocess, time
6 from autotest_lib.client.bin import chromeos_constants, site_cryptohome 6 from autotest_lib.client.bin import chromeos_constants, site_cryptohome
7 from autotest_lib.client.bin import site_utils, test 7 from autotest_lib.client.bin import site_utils, test
8 from autotest_lib.client.common_lib import error, log_watcher, site_ui 8 from autotest_lib.client.common_lib import error, log_watcher, site_ui
9 9
10 _DEFAULT_TIMEOUT = 30 10 _DEFAULT_TIMEOUT = 30
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 Args: 285 Args:
286 timeout: float number of seconds to wait 286 timeout: float number of seconds to wait
287 287
288 Raises: 288 Raises:
289 UnexpectedCondition: called while already logged in 289 UnexpectedCondition: called while already logged in
290 TimeoutError: chrome didn't start before timeout 290 TimeoutError: chrome didn't start before timeout
291 """ 291 """
292 if logged_in(): 292 if logged_in():
293 raise UnexpectedCondition('Already logged in') 293 raise UnexpectedCondition('Already logged in')
294 wait_for_browser()
295 wait_for_login_prompt()
294 try: 296 try:
295 os.unlink(chromeos_constants.LOGIN_PROMPT_READY_MAGIC_FILE) 297 os.unlink(chromeos_constants.LOGIN_PROMPT_READY_MAGIC_FILE)
296 except OSError, e: 298 except OSError, e:
297 if e.errno != errno.ENOENT: 299 if e.errno != errno.ENOENT:
298 raise e 300 raise e
299 wait_for_browser()
300 nuke_process_by_name(chromeos_constants.BROWSER, with_prejudice=True) 301 nuke_process_by_name(chromeos_constants.BROWSER, with_prejudice=True)
301 wait_for_browser() 302 wait_for_browser()
302 wait_for_login_prompt() 303 wait_for_login_prompt()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698