OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |