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

Unified Diff: client/bin/site_login.py

Issue 3338019: [autotest] Grab more chrome logs, not just the last one, to hedge against crashes (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: fixes per rginda, seano 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/bin/site_ui_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/bin/site_login.py
diff --git a/client/bin/site_login.py b/client/bin/site_login.py
index 44ed002785a71d40d9265e597b1409fe80b11144..d1108f4fd771683c877b84efd563c2d842a2dabb 100644
--- a/client/bin/site_login.py
+++ b/client/bin/site_login.py
@@ -294,11 +294,26 @@ def refresh_login_screen(timeout=_DEFAULT_TIMEOUT):
wait_for_browser()
wait_for_login_prompt()
oldpid = __get_session_manager_pid()
+
+ # Clear breadcrumb that shows we've emitted login-prompt-ready.
try:
- os.unlink(chromeos_constants.LOGIN_PROMPT_READY_MAGIC_FILE)
+ os.unlink(chromeos_constants.LOGIN_PROMPT_READY_MAGIC_FILE)
except OSError, e:
- if e.errno != errno.ENOENT:
- raise e
+ if e.errno != errno.ENOENT:
+ raise e
+
+ # Clear old log files.
+ logpath = chromeos_constants.CHROME_LOG_DIR
+ try:
+ for file in os.listdir(logpath):
+ fullpath = os.path.join(logpath, file)
+ if os.path.isfile(fullpath):
+ os.unlink(os.path.join(logpath, file))
rginda 2010/09/09 21:01:31 fullpath, no?
+
+ except (IOError, OSError) as error:
+ logging.error(error)
+
+ # Restart the UI.
nuke_login_manager()
site_utils.poll_for_condition(
lambda: __session_manager_restarted(oldpid),
« no previous file with comments | « no previous file | client/bin/site_ui_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698