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

Side by Side Diff: client/cros/cros_ui_test.py

Issue 6690056: Revert "Support rotated logs." (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 8 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 | « client/cros/cros_logging.py ('k') | 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 dbus, logging, os, re, shutil, socket, sys, time 5 import dbus, logging, os, re, shutil, socket, sys, time
6 import common 6 import common
7 import auth_server, constants as chromeos_constants, cryptohome, dns_server 7 import auth_server, constants as chromeos_constants, cryptohome, dns_server
8 import cros_logging, cros_ui, login 8 import cros_logging, cros_ui, login
9 from autotest_lib.client.bin import test, utils 9 from autotest_lib.client.bin import test, utils
10 from autotest_lib.client.common_lib import error 10 from autotest_lib.client.common_lib import error
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 """Runs through the log watched by |watcher| to see if a crash was 292 """Runs through the log watched by |watcher| to see if a crash was
293 reported for any process names listed in |processes|. SIGABRT crashes in 293 reported for any process names listed in |processes|. SIGABRT crashes in
294 chrome or supplied-chrome during logout are ignored. 294 chrome or supplied-chrome during logout are ignored.
295 """ 295 """
296 logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG) 296 logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG)
297 crash_regex = re.compile( 297 crash_regex = re.compile(
298 'Received crash notification for (\w+).+ (sig \d+)') 298 'Received crash notification for (\w+).+ (sig \d+)')
299 logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG) 299 logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG)
300 300
301 in_logout = False 301 in_logout = False
302 for line in self._log_reader.get_logs().splitlines(): 302 for line in self._log_reader.get_logs().split('\n'):
303 if logout_start_regex.search(line): 303 if logout_start_regex.search(line):
304 in_logout = True 304 in_logout = True
305 elif logout_complete_regex.search(line): 305 elif logout_complete_regex.search(line):
306 in_logout = False 306 in_logout = False
307 else: 307 else:
308 match = crash_regex.search(line) 308 match = crash_regex.search(line)
309 if (match and not match.group(1) in processes and 309 if (match and not match.group(1) in processes and
310 not (in_logout and 310 not (in_logout and
311 (match.group(1) == chromeos_constants.BROWSER or 311 (match.group(1) == chromeos_constants.BROWSER or
312 match.group(1) == 'supplied_chrome') and 312 match.group(1) == 'supplied_chrome') and
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 self.stop_authserver() 350 self.stop_authserver()
351 self.__log_crashed_processes(self.crash_blacklist) 351 self.__log_crashed_processes(self.crash_blacklist)
352 352
353 353
354 def get_auth_endpoint_misses(self): 354 def get_auth_endpoint_misses(self):
355 if hasattr(self, '_authServer'): 355 if hasattr(self, '_authServer'):
356 return self._authServer.get_endpoint_misses() 356 return self._authServer.get_endpoint_misses()
357 else: 357 else:
358 return {} 358 return {}
OLDNEW
« no previous file with comments | « client/cros/cros_logging.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698