| 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 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 env['LLVM_SYMBOLIZER_PATH'] = llvm_symbolizer_path | 1528 env['LLVM_SYMBOLIZER_PATH'] = llvm_symbolizer_path |
| 1529 else: | 1529 else: |
| 1530 env = None | 1530 env = None |
| 1531 sanitizer_filter_path = self.path_from_chromium_base('tools', 'valgr
ind', 'asan', 'asan_symbolize.py') | 1531 sanitizer_filter_path = self.path_from_chromium_base('tools', 'valgr
ind', 'asan', 'asan_symbolize.py') |
| 1532 sanitizer_strip_path_prefix = 'Release/../../' | 1532 sanitizer_strip_path_prefix = 'Release/../../' |
| 1533 if self._filesystem.exists(sanitizer_filter_path): | 1533 if self._filesystem.exists(sanitizer_filter_path): |
| 1534 stderr = self._executive.run_command(['flock', sys.executable, s
anitizer_filter_path, sanitizer_strip_path_prefix], input=stderr, decode_output=
False, env=env) | 1534 stderr = self._executive.run_command(['flock', sys.executable, s
anitizer_filter_path, sanitizer_strip_path_prefix], input=stderr, decode_output=
False, env=env) |
| 1535 | 1535 |
| 1536 name_str = name or '<unknown process name>' | 1536 name_str = name or '<unknown process name>' |
| 1537 pid_str = str(pid or '<unknown>') | 1537 pid_str = str(pid or '<unknown>') |
| 1538 stdout_lines = (stdout or '<empty>').decode('utf8', 'replace').splitline
s() | 1538 |
| 1539 stderr_lines = (stderr or '<empty>').decode('utf8', 'replace').splitline
s() | 1539 # We require stdout and stderr to be bytestrings, not character strings. |
| 1540 if stdout: |
| 1541 assert isinstance(stdout, str) |
| 1542 stdout_lines = stdout.decode('utf8', 'replace').splitlines() |
| 1543 else: |
| 1544 stdout_lines = [u'<empty>'] |
| 1545 if stderr: |
| 1546 assert isinstance(stderr, str) |
| 1547 stderr_lines = stderr.decode('utf8', 'replace').splitlines() |
| 1548 else: |
| 1549 stderr_lines = [u'<empty>'] |
| 1550 |
| 1540 return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_
str, | 1551 return (stderr, 'crash log for %s (pid %s):\n%s\n%s\n' % (name_str, pid_
str, |
| 1541 '\n'.join(('STDOUT: ' + l) for l in stdout_lines), | 1552 '\n'.join(('STDOUT: ' + l) for l in stdout_lines), |
| 1542 '\n'.join(('STDERR: ' + l) for l in stderr_lines))) | 1553 '\n'.join(('STDERR: ' + l) for l in stderr_lines))) |
| 1543 | 1554 |
| 1544 def look_for_new_crash_logs(self, crashed_processes, start_time): | 1555 def look_for_new_crash_logs(self, crashed_processes, start_time): |
| 1545 pass | 1556 pass |
| 1546 | 1557 |
| 1547 def look_for_new_samples(self, unresponsive_processes, start_time): | 1558 def look_for_new_samples(self, unresponsive_processes, start_time): |
| 1548 pass | 1559 pass |
| 1549 | 1560 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 class PhysicalTestSuite(object): | 1763 class PhysicalTestSuite(object): |
| 1753 def __init__(self, base, args, reference_args=None): | 1764 def __init__(self, base, args, reference_args=None): |
| 1754 self.name = base | 1765 self.name = base |
| 1755 self.base = base | 1766 self.base = base |
| 1756 self.args = args | 1767 self.args = args |
| 1757 self.reference_args = args if reference_args is None else reference_args | 1768 self.reference_args = args if reference_args is None else reference_args |
| 1758 self.tests = set() | 1769 self.tests = set() |
| 1759 | 1770 |
| 1760 def __repr__(self): | 1771 def __repr__(self): |
| 1761 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1772 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |