Chromium Code Reviews| 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..f783cb81fe15afbe814cbfdfc9604d5659d3868f 100644 |
| --- a/client/cros/cros_ui_test.py |
| +++ b/client/cros/cros_ui_test.py |
| @@ -290,14 +290,27 @@ 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) |
|
DaleCurtis
2011/02/15 23:45:43
I realize there's a regular expression that can do
|
| + 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) == 'chrome' and |
|
Chris Masone
2011/02/16 00:38:32
can you use constants.BROWSER instead of 'chrome'?
DaleCurtis
2011/02/16 01:20:08
Done.
|
| + match.group(2) == 'sig 6')): |
| + self.job.record('INFO', self.tagged_testname, |
| + line[match.start():]) |
| def cleanup(self): |