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

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

Issue 16854020: Strip out \r characters from pexpect's log capture before adding the results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698