Chromium Code Reviews| Index: scripts/master/log_parser/gtest_command.py |
| =================================================================== |
| --- scripts/master/log_parser/gtest_command.py (revision 116663) |
| +++ scripts/master/log_parser/gtest_command.py (working copy) |
| @@ -22,6 +22,7 @@ |
| self._failure_description = [] |
| self._current_suppression_hash = '' |
| self._current_suppression = [] |
| + self._parsing_failures = False |
| # Line number currently being processed. |
| self._line_number = 0 |
| @@ -50,6 +51,7 @@ |
| # This regexp also matches SomeName.SomeTest/1, which should be harmless. |
| test_name_regexp = r'((\w+/)?\w+\.\w+(/\d+)?)' |
| + self._test_name = re.compile(test_name_regexp) |
| self._test_start = re.compile('\[\s+RUN\s+\] ' + test_name_regexp) |
| self._test_ok = re.compile('\[\s+OK\s+\] ' + test_name_regexp) |
| self._test_fail = re.compile('\[\s+FAILED\s+\] ' + test_name_regexp) |
| @@ -286,6 +288,20 @@ |
| if self._current_test: |
| self._failure_description.append(line) |
| + # Parse the "Failing tests:" list at the end of the output, and add any |
| + # additional failed tests to the list. For example, this includes tests |
| + # that crash after the OK line. |
| + if self._parsing_failures: |
| + results = self._test_name.search(line) |
| + if results: |
| + test_name = results.group(1) |
| + if self._StatusOfTest(test_name) == 'OK': |
| + self._test_status[test_name] = ( |
| + 'failed', ['Unknown error, see stdio log.']) |
| + else: |
| + self._parsing_failures = False |
| + elif line.find('Failing tests:') != -1: |
|
M-A Ruel
2012/01/06 17:07:36
elif 'Failing tests:' in line:
Alexei Svitkine (slow)
2012/01/06 18:08:03
Changed to startswith(), which is more precise.
|
| + self._parsing_failures = True |
| class GTestCommand(shell.ShellCommand): |
| """Buildbot command that knows how to display GTest output.""" |