Lines Matching +full:test +full:- +full:results
3 # Use of this source code is governed by a BSD-style license that can be
12 """This class knows how to understand GTest test output.
27 # List of parsing errors, as human-readable strings.
30 # Tests are stored here as 'test.name': (status, [description]).
32 # The description is a list of lines detailing the test's error, as
44 # Regular expressions for parsing GTest logs. Test names look like
54 r'Test timeout \([0-9]+ ms\) exceeded for ' + test_name_regexp)
55 self._disabled = re.compile(r' YOU HAVE (\d+) DISABLED TEST')
56 self._flaky = re.compile(r' YOU HAVE (\d+) FLAKY TEST')
59 r'Suppression \(error hash=#([0-9A-F]+)#\):')
63 # and should be updated when possible. ("master" -> "main")
71 self._error_logging_end_re = re.compile('-' * 70)
78 status: test results status to search for.
90 test_list = [x for x in test_list if x.find('FAILS_') == -1]
92 test_list = [x for x in test_list if x.find('FLAKY_') == -1]
96 def _StatusOfTest(self, test): argument
97 """Returns the status code for the given test, or 'not known'."""
98 test_status = self._test_status.get(test, ('not known', []))
140 def FailureDescription(self, test): argument
141 """Returns a list containing the failure description for the given test.
143 If the test didn't fail or timeout, returns [].
145 test: Name to test to find failure reason.
147 List of test name, and failure string.
149 test_status = self._test_status.get(test, ('', []))
169 """This is called once with each line of the test log."""
175 results = self._main_name_re.search(line)
176 if results:
177 self.main_name = results.group(1)
180 results = self._disabled.search(line)
181 if results:
183 disabled = int(results.group(1))
189 # If we can't parse the line, at least give a heads-up. This is
196 results = self._flaky.search(line)
197 if results:
199 flaky = int(results.group(1))
205 # If we can't parse the line, at least give a heads-up. This is
211 # Is it the start of a test?
212 results = self._test_start.search(line)
213 if results:
214 test_name = results.group(1)
216 self._RecordError(line, 'test started more than once')
231 # Is it a test success line?
232 results = self._test_ok.search(line)
233 if results:
234 test_name = results.group(1)
244 # Is it a test failure line?
245 results = self._test_fail.search(line)
246 if results:
247 test_name = results.group(1)
252 # Don't overwrite the failure description when a failing test is
262 # Is it a test timeout line?
263 results = self._test_timeout.search(line)
264 if results:
265 test_name = results.group(1)
277 results = self._suppression_start.search(line)
278 if results:
279 suppression_hash = results.group(1)
289 results = self._suppression_end.search(line)
290 if results and self._current_suppression_hash:
298 # Is it the start of a test summary error message?
299 results = self._error_logging_test_name_re.search(line)
300 if results:
301 test_name = results.group(1)
308 # Is it the start of the next test summary signaling the end
310 results = self._error_logging_start_re.search(line)
311 if results and self._current_test:
318 # Is it the end of the extra test failure summaries?
319 results = self._error_logging_end_re.search(line)
320 if results and self._current_test:
336 # Random line: if we're in a test, collect it for the failure