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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 219083002: Bug fix: Get the leak log not from error strings but from the line (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | Tools/Scripts/webkitpy/layout_tests/port/driver.py » ('j') | 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 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 stderr = self._executive.run_command(['c++filt'], input=output, decode_output=False) 1505 stderr = self._executive.run_command(['c++filt'], input=output, decode_output=False)
1506 1506
1507 name_str = name or '<unknown process name>' 1507 name_str = name or '<unknown process name>'
1508 pid_str = str(pid or '<unknown>') 1508 pid_str = str(pid or '<unknown>')
1509 stdout_lines = (stdout or '<empty>').decode('utf8', 'replace').splitline s() 1509 stdout_lines = (stdout or '<empty>').decode('utf8', 'replace').splitline s()
1510 stderr_lines = (stderr or '<empty>').decode('utf8', 'replace').splitline s() 1510 stderr_lines = (stderr or '<empty>').decode('utf8', 'replace').splitline s()
1511 return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_ str, 1511 return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_ str,
1512 '\n'.join(('STDOUT: ' + l) for l in stdout_lines), 1512 '\n'.join(('STDOUT: ' + l) for l in stdout_lines),
1513 '\n'.join(('STDERR: ' + l) for l in stderr_lines))) 1513 '\n'.join(('STDERR: ' + l) for l in stderr_lines)))
1514 1514
1515 def _get_leak_log(self, name, pid, stdout, stderr, newer_than):
1516 match = re.match('#LEAK - (\S+) pid (\d+) (.+)\n', stderr)
1517 return (stderr, match.group(3))
1518
1519 def look_for_new_crash_logs(self, crashed_processes, start_time): 1515 def look_for_new_crash_logs(self, crashed_processes, start_time):
1520 pass 1516 pass
1521 1517
1522 def look_for_new_samples(self, unresponsive_processes, start_time): 1518 def look_for_new_samples(self, unresponsive_processes, start_time):
1523 pass 1519 pass
1524 1520
1525 def sample_process(self, name, pid): 1521 def sample_process(self, name, pid):
1526 pass 1522 pass
1527 1523
1528 def virtual_test_suites(self): 1524 def virtual_test_suites(self):
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 if name.find('/') != -1: 1753 if name.find('/') != -1:
1758 _log.error("Virtual test suites names cannot contain /'s: %s" % name) 1754 _log.error("Virtual test suites names cannot contain /'s: %s" % name)
1759 return 1755 return
1760 self.name = 'virtual/' + name + '/' + base 1756 self.name = 'virtual/' + name + '/' + base
1761 self.base = base 1757 self.base = base
1762 self.args = args 1758 self.args = args
1763 self.tests = tests or set() 1759 self.tests = tests or set()
1764 1760
1765 def __repr__(self): 1761 def __repr__(self):
1766 return "VirtualTestSuite('%s', '%s', %s)" % (self.name, self.base, self. args) 1762 return "VirtualTestSuite('%s', '%s', %s)" % (self.name, self.base, self. args)
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/port/driver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698