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

Unified Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 1855663002: Make android's run_instrumentation_suite() use generated wrapper scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@wrapper-1
Patch Set: Created 4 years, 9 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: scripts/slave/recipe_modules/chromium_android/api.py
diff --git a/scripts/slave/recipe_modules/chromium_android/api.py b/scripts/slave/recipe_modules/chromium_android/api.py
index c7ad0e1f6919ce9355de4084f94cae69e5cfa329..66db7a7890d5d1f7752e2830f2d886e7b58ac8fe 100644
--- a/scripts/slave/recipe_modules/chromium_android/api.py
+++ b/scripts/slave/recipe_modules/chromium_android/api.py
@@ -661,35 +661,25 @@ class AndroidApi(recipe_api.RecipeApi):
def run_instrumentation_suite(self,
name,
- test_apk,
- apk_under_test=None,
- additional_apks=None,
- isolate_file_path=None,
+ test_apk=None, # no-op
+ apk_under_test=None, # no-op
+ additional_apks=None, # no-op
+ isolate_file_path=None, # no-op
flakiness_dashboard=None,
annotation=None, except_annotation=None,
screenshot=False, verbose=False, tool=None,
- apk_package=None, host_driven_root=None,
- official_build=False, json_results_file=None,
+ apk_package=None, # no-op
+ host_driven_root=None, # unused?
+ official_build=False, # no-op
+ json_results_file=None,
timeout_scale=None, strict_mode=None,
suffix=None, num_retries=None,
device_flags=None, **kwargs):
- if apk_under_test:
- # TODO(jbudorick): Remove this once the test runner handles installation
- # of the APK under test.
- self.adb_install_apk(apk_under_test)
-
logcat_output_file = self.m.raw_io.output()
args = [
- '--test-apk', test_apk,
'--blacklist-file', self.blacklist_file,
'--logcat-output-file', logcat_output_file,
]
- if apk_under_test:
- args.extend(['--apk-under-test', apk_under_test])
- for a in additional_apks or []:
- args.extend(['--additional-apk', a])
- if isolate_file_path:
- args.extend(['--isolate-file-path', isolate_file_path])
if tool:
args.append('--tool=%s' % tool)
if flakiness_dashboard:
@@ -702,14 +692,10 @@ class AndroidApi(recipe_api.RecipeApi):
args.append('--screenshot')
if verbose:
args.append('--verbose')
- if self.m.chromium.c.BUILD_CONFIG == 'Release':
- args.append('--release')
if self.c.coverage or self.c.incremental_coverage:
args.extend(['--coverage-dir', self.coverage_dir])
if host_driven_root:
args.extend(['--host-driven-root', host_driven_root])
- if official_build:
- args.extend(['--official-build'])
if json_results_file:
args.extend(['--json-results-file', json_results_file])
if timeout_scale:
@@ -725,6 +711,7 @@ class AndroidApi(recipe_api.RecipeApi):
'Instrumentation test %s%s' % (annotation or name,
' (%s)' % suffix if suffix else ''),
args=['instrumentation'] + args,
+ wrapper_script_suite_name=name,
**kwargs)
if step_result.raw_io.output:
step_result.presentation.logs['logcat'] = (
@@ -1245,7 +1232,7 @@ class AndroidApi(recipe_api.RecipeApi):
f.result.presentation.status = self.m.step.FAILURE
raise
- def test_runner(self, step_name, args=None, **kwargs):
+ def test_runner(self, step_name, args=None, wrapper_script_suite_name=None, **kwargs):
"""Wrapper for the python testrunner script.
Args:
@@ -1253,5 +1240,8 @@ class AndroidApi(recipe_api.RecipeApi):
args: Testrunner arguments.
"""
with self.handle_exit_codes():
- return self.m.python(
- step_name, self.c.test_runner, args, **kwargs)
+ script = self.c.test_runner
+ if wrapper_script_suite_name:
+ script = os.path.join('out', self.m.chromium.c.BUILD_CONFIG, 'bin',
jbudorick 2016/04/02 00:59:57 this should instead be self.m.chromium.output_dir.
agrieve 2016/04/05 02:37:01 Done.
+ 'run_%s' % wrapper_script_suite_name)
+ return self.m.python(step_name, script, args, **kwargs)

Powered by Google App Engine
This is Rietveld 408576698