Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1929)

Unified Diff: build/android/pylib/gtest/gtest_test_instance.py

Issue 1363643002: [Android] Fix miscellaneous small issues with gtest platform mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on blink Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698