Index: build/android/pylib/gtest/test_package.py |
diff --git a/build/android/pylib/gtest/test_package.py b/build/android/pylib/gtest/test_package.py |
index a3a17b233237d84ab9ef8a1a5830533e5d4b2c65..5237ed29aebc1a347457dabd453cd6f70512da38 100644 |
--- a/build/android/pylib/gtest/test_package.py |
+++ b/build/android/pylib/gtest/test_package.py |
@@ -155,20 +155,21 @@ class TestPackage(object): |
break |
else: # re_run |
full_test_name = p.match.group(1).replace('\r', '') |
+ log = p.before.replace('\r', '') |
found = p.expect([re_ok, re_fail, re_crash], timeout=self.timeout) |
if found == 0: # re_ok |
if full_test_name == p.match.group(1).replace('\r', ''): |
results.AddResult(base_test_result.BaseTestResult( |
full_test_name, base_test_result.ResultType.PASS, |
- log=p.before)) |
+ log=log)) |
elif found == 2: # re_crash |
results.AddResult(base_test_result.BaseTestResult( |
full_test_name, base_test_result.ResultType.CRASH, |
- log=p.before)) |
+ log=log)) |
break |
else: # re_fail |
results.AddResult(base_test_result.BaseTestResult( |
- full_test_name, base_test_result.ResultType.FAIL, log=p.before)) |
+ full_test_name, base_test_result.ResultType.FAIL, log=log)) |
except pexpect.EOF: |
logging.error('Test terminated - EOF') |
# We're here because either the device went offline, or the test harness |
@@ -178,13 +179,13 @@ class TestPackage(object): |
self.device) |
if full_test_name: |
results.AddResult(base_test_result.BaseTestResult( |
- full_test_name, base_test_result.ResultType.CRASH, log=p.before)) |
+ full_test_name, base_test_result.ResultType.CRASH, log=log)) |
except pexpect.TIMEOUT: |
logging.error('Test terminated after %d second timeout.', |
self.timeout) |
if full_test_name: |
results.AddResult(base_test_result.BaseTestResult( |
- full_test_name, base_test_result.ResultType.TIMEOUT, log=p.before)) |
+ full_test_name, base_test_result.ResultType.TIMEOUT, log=log)) |
finally: |
p.close() |