Lines Matching +full:test +full:- +full:results
2 # Use of this source code is governed by a BSD-style license that can be
11 """This class knows how to understand GTest test output.
28 # List of parsing errors, as human-readable strings.
31 # Tests are stored here as 'test.name': (status, [description]).
33 # The description is a list of lines detailing the test's error, as
45 # Regular expressions for parsing GTest logs. Test names look like
55 'Test timeout \([0-9]+ ms\) exceeded for ' + test_name_regexp)
56 self._disabled = re.compile(' YOU HAVE (\d+) DISABLED TEST')
57 self._flaky = re.compile(' YOU HAVE (\d+) FLAKY TEST')
60 'Suppression \(error hash=#([0-9A-F]+)#\):')
69 self._error_logging_end_re = re.compile('-' * 70)
76 status: test results status to search for.
88 test_list = [x for x in test_list if x.find('FAILS_') == -1]
90 test_list = [x for x in test_list if x.find('FLAKY_') == -1]
94 def _StatusOfTest(self, test): argument
95 """Returns the status code for the given test, or 'not known'."""
96 test_status = self._test_status.get(test, ('not known', []))
138 def FailureDescription(self, test): argument
139 """Returns a list containing the failure description for the given test.
141 If the test didn't fail or timeout, returns [].
143 test: Name to test to find failure reason.
145 List of test name, and failure string.
147 test_status = self._test_status.get(test, ('', []))
167 """This is called once with each line of the test log."""
173 results = self._master_name_re.search(line)
174 if results:
175 self.master_name = results.group(1)
178 results = self._disabled.search(line)
179 if results:
181 disabled = int(results.group(1))
187 # If we can't parse the line, at least give a heads-up. This is
194 results = self._flaky.search(line)
195 if results:
197 flaky = int(results.group(1))
203 # If we can't parse the line, at least give a heads-up. This is
209 # Is it the start of a test?
210 results = self._test_start.search(line)
211 if results:
212 test_name = results.group(1)
214 self._RecordError(line, 'test started more than once')
229 # Is it a test success line?
230 results = self._test_ok.search(line)
231 if results:
232 test_name = results.group(1)
242 # Is it a test failure line?
243 results = self._test_fail.search(line)
244 if results:
245 test_name = results.group(1)
250 # Don't overwrite the failure description when a failing test is
260 # Is it a test timeout line?
261 results = self._test_timeout.search(line)
262 if results:
263 test_name = results.group(1)
275 results = self._suppression_start.search(line)
276 if results:
277 suppression_hash = results.group(1)
287 results = self._suppression_end.search(line)
288 if results and self._current_suppression_hash:
296 # Is it the start of a test summary error message?
297 results = self._error_logging_test_name_re.search(line)
298 if results:
299 test_name = results.group(1)
306 # Is it the start of the next test summary signaling the end
308 results = self._error_logging_start_re.search(line)
309 if results and self._current_test:
316 # Is it the end of the extra test failure summaries?
317 results = self._error_logging_end_re.search(line)
318 if results and self._current_test:
334 # Random line: if we're in a test, collect it for the failure