| 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 95e1065fac7ef06c00c1c3e48e48969cd8df44fd..4523b74ad5f5680a22a957434a99bd1ed9a39f41 100644
|
| --- a/build/android/pylib/gtest/gtest_test_instance.py
|
| +++ b/build/android/pylib/gtest/gtest_test_instance.py
|
| @@ -274,22 +274,32 @@ class GtestTestInstance(test_instance.TestInstance):
|
| Returns:
|
| A list of base_test_result.BaseTestResults.
|
| """
|
| + log = []
|
| + result_type = None
|
| results = []
|
| for l in output:
|
| + logging.info(l)
|
| matcher = _RE_TEST_STATUS.match(l)
|
| if matcher:
|
| - result_type = None
|
| - if matcher.group(1) == 'OK':
|
| + if matcher.group(1) == 'RUN':
|
| + log = []
|
| + elif matcher.group(1) == 'OK':
|
| result_type = base_test_result.ResultType.PASS
|
| elif matcher.group(1) == 'FAILED':
|
| result_type = base_test_result.ResultType.FAIL
|
|
|
| - if result_type:
|
| - test_name = matcher.group(2)
|
| - duration = matcher.group(3) if matcher.group(3) else 0
|
| - results.append(base_test_result.BaseTestResult(
|
| - test_name, result_type, duration))
|
| - logging.info(l)
|
| + if log is not None:
|
| + log.append(l)
|
| +
|
| + if result_type:
|
| + test_name = matcher.group(2)
|
| + duration = matcher.group(3) if matcher.group(3) else 0
|
| + results.append(base_test_result.BaseTestResult(
|
| + test_name, result_type, duration,
|
| + log=('\n'.join(log) if log else '')))
|
| + log = None
|
| + result_type = None
|
| +
|
| return results
|
|
|
| #override
|
|
|