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

Unified Diff: build/android/test_package.py

Issue 10051021: apk-based test runner work for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/single_test_runner.py ('k') | build/android/test_package_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/test_package.py
diff --git a/build/android/test_package.py b/build/android/test_package.py
index 16b834c6821d475af618dc4ee7e00801c603c950..6d0810b27985593349f572b42cdd515c28a4038a 100644
--- a/build/android/test_package.py
+++ b/build/android/test_package.py
@@ -35,6 +35,7 @@ class TestPackage(object):
performance_test, cleanup_test_files, tool, dump_debug_info):
self.adb = adb
self.device = device
+ self.test_suite_full = test_suite
self.test_suite = os.path.splitext(test_suite)[0]
self.test_suite_basename = os.path.basename(self.test_suite)
self.test_suite_dirname = os.path.dirname(self.test_suite)
@@ -129,14 +130,21 @@ class TestPackage(object):
ok_tests = []
failed_tests = []
timed_out = False
+ overall_fail = False
re_run = re.compile('\[ RUN \] ?(.*)\r\n')
re_fail = re.compile('\[ FAILED \] ?(.*)\r\n')
+ re_runner_fail = re.compile('\[ RUNNER_FAILED \] ?(.*)\r\n')
re_ok = re.compile('\[ OK \] ?(.*)\r\n')
(io_stats_before, ready_to_continue) = self._BeginGetIOStats()
while ready_to_continue:
- found = p.expect([re_run, pexpect.EOF], timeout=self.timeout)
+ found = p.expect([re_run, pexpect.EOF, re_runner_fail],
+ timeout=self.timeout)
if found == 1: # matched pexpect.EOF
break
+ if found == 2: # RUNNER_FAILED
+ logging.error('RUNNER_FAILED')
+ overall_fail = True
+ break
if self.dump_debug_info:
self.dump_debug_info.TakeScreenshot('_Test_Start_Run_')
full_test_name = p.match.group(1)
@@ -165,4 +173,5 @@ class TestPackage(object):
'\npexpect.after: %s'
% (p.before,
p.after))]
- return TestResults.FromOkAndFailed(ok_tests, failed_tests, timed_out)
+ return TestResults.FromOkAndFailed(ok_tests, failed_tests,
+ timed_out, overall_fail)
« no previous file with comments | « build/android/single_test_runner.py ('k') | build/android/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698