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

Unified Diff: client/cros/cros_ui_test.py

Issue 6525034: Don't log chrome SIGABRT crashes during logout. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Code review fixes. Created 9 years, 10 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/cros/login.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cros/cros_ui_test.py
diff --git a/client/cros/cros_ui_test.py b/client/cros/cros_ui_test.py
index 8c1bae3de55eb5f8e2fd8122fb55e71197c5e571..cb0cef65e440964b04865ac86e928b2c8684792e 100644
--- a/client/cros/cros_ui_test.py
+++ b/client/cros/cros_ui_test.py
@@ -290,14 +290,28 @@ class UITest(test.test):
def __log_crashed_processes(self, processes):
"""Runs through the log watched by |watcher| to see if a crash was
- reported for any process names listed in |processes|.
+ reported for any process names listed in |processes|. SIGABRT crashes in
+ chrome during logout are ignored.
"""
- regex = re.compile(r'Received crash notification for (\w+).+ (sig \d+)',
- re.MULTILINE)
- for match in regex.finditer(self._log_reader.get_logs()):
- if match.group(1) not in processes:
- self.job.record('INFO', self.tagged_testname,
- "%s crash" % match.group(1), match.group(2))
+ logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG)
+ crash_regex = re.compile(
+ 'Received crash notification for (\w+).+ (sig \d+)')
+ logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG)
+
+ in_logout = False
+ for line in self._log_reader.get_logs().split('\n'):
+ if logout_start_regex.search(line):
+ in_logout = True
+ elif logout_complete_regex.search(line):
+ in_logout = False
+ else:
+ match = crash_regex.search(line)
+ if (match and not match.group(1) in processes and
+ not (in_logout and
+ match.group(1) == chromeos_constants.BROWSER and
+ match.group(2) == 'sig 6')):
+ self.job.record('INFO', self.tagged_testname,
+ line[match.start():])
def cleanup(self):
« no previous file with comments | « no previous file | client/cros/login.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698