Chromium Code Reviews| Index: build/android/pylib/gtest/gtest_test_instance.py |
| diff --git a/build/android/pylib/gtest/gtest_test_instance.py b/build/android/pylib/gtest/gtest_test_instance.py |
| index 173628b46134d6c7fe4b5eab246fea610c8836a6..e4649e63c3b860ff635cd630b8c9babff7ba4350 100644 |
| --- a/build/android/pylib/gtest/gtest_test_instance.py |
| +++ b/build/android/pylib/gtest/gtest_test_instance.py |
| @@ -343,6 +343,24 @@ class GtestTestInstance(test_instance.TestInstance): |
| return '*-%s' % ':'.join(disabled_filter_items) |
| + def GetCrashedTestCase(self, output): |
| + crash_happened = re.search(r'FAILURES!!! Tests run: \d+, Failures: \d+,' \ |
|
jbudorick
2016/02/27 00:31:37
all of the regexes in here should compiled into mo
|
| + ' Errors: 1', output[-1]) |
| + if not crash_happened: |
| + return |
| + |
| + #Crashes that will cause output like DCHECK(false). |
|
jbudorick
2016/02/27 00:31:37
nit: # Crashes ...
|
| + has_crash = re.search(r'\[ERROR:.*?\] Currently running: ', output[-3]) |
|
jbudorick
2016/02/27 00:31:37
magical -3
|
| + if has_crash: |
| + return output[-3][len(has_crash.group(0)):] |
| + |
| + # Crashes that will cause output like null pointer dereference. |
| + index = output.index('[ CRASHED ]') |
| + if not index == -1: |
| + run_info = re.search(r'(?<=\[ RUN \] ).*', output[index-1]) |
|
jbudorick
2016/02/27 00:31:37
Why is this doing a lookbehind if you're matching
|
| + if run_info: |
| + return run_info.group(0) |
| + |
| # pylint: disable=no-self-use |
| def ParseGTestOutput(self, output): |
| """Parses raw gtest output and returns a list of results. |