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

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

Issue 12025025: [Android] Track individual test case timeouts for gtests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « build/android/pylib/base/test_result.py ('k') | 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 ccbdbb3f4eba4c090797a4de0cbb75a44764ef9a..cf325c0a1121a6152ff6ad123f711bcc0d0e0a85 100644
--- a/build/android/pylib/gtest/test_package.py
+++ b/build/android/pylib/gtest/test_package.py
@@ -121,8 +121,9 @@ class TestPackage(object):
ok_tests = []
failed_tests = []
crashed_tests = []
- timed_out = False
+ timed_out_tests = []
overall_fail = False
+ overall_timed_out = False
# Test case statuses.
re_run = re.compile('\[ RUN \] ?(.*)\r\n')
@@ -138,6 +139,8 @@ class TestPackage(object):
try:
while True:
+ full_test_name = None
+
found = p.expect([re_run, re_passed, re_runner_fail],
timeout=self.timeout)
if found == 1: # re_passed
@@ -166,7 +169,9 @@ class TestPackage(object):
except pexpect.TIMEOUT:
logging.error('Test terminated after %d second timeout.',
self.timeout)
- timed_out = True
+ overall_timed_out = True
+ if full_test_name:
+ timed_out_tests += [BaseTestResult(full_test_name, p.before)]
finally:
p.close()
@@ -179,5 +184,6 @@ class TestPackage(object):
# Create TestResults and return
return TestResults.FromRun(ok=ok_tests, failed=failed_tests,
- crashed=crashed_tests, timed_out=timed_out,
- overall_fail=overall_fail)
+ crashed=crashed_tests, timed_out=timed_out_tests,
+ overall_fail=overall_fail,
+ overall_timed_out=overall_timed_out)
« no previous file with comments | « build/android/pylib/base/test_result.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698