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

Unified Diff: scripts/slave/recipe_modules/chromium_tests/steps.py

Issue 1678273003: Split out instrumentation test name map for further use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 10 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: scripts/slave/recipe_modules/chromium_tests/steps.py
diff --git a/scripts/slave/recipe_modules/chromium_tests/steps.py b/scripts/slave/recipe_modules/chromium_tests/steps.py
index 164236e3ff07089f2c12340195f221da0800ed13..22ef7166a6a69d0250766eb3dd24dd37a8eae28d 100644
--- a/scripts/slave/recipe_modules/chromium_tests/steps.py
+++ b/scripts/slave/recipe_modules/chromium_tests/steps.py
@@ -1506,16 +1506,25 @@ class AndroidJunitTest(AndroidTest):
step_test_data=lambda: api.json.test_api.output(mock_test_results))
+ANDROID_INSTRUMENTATION_TARGET_MAP = {
+ 'AndroidWebViewTest': 'android_webview_test_apk',
+ 'ChromePublicTest': 'chrome_public_test_apk',
+ 'ChromeSyncShellTest': 'chrome_sync_shell_test_apk',
+ 'ChromotingTest': 'remoting_test_apk',
+ 'ContentShellTest': 'content_shell_test_apk',
+ 'MojoTest': 'mojo_test_apk',
+ 'SystemWebViewShellLayoutTest': 'system_webview_shell_layout_test_apk',
+}
+
+
class AndroidInstrumentationTest(AndroidTest):
_DEFAULT_SUITES = {
'AndroidWebViewTest': {
- 'compile_targets': ['android_webview_test_apk'],
'isolate_file_path': 'android_webview/android_webview_test_apk.isolate',
'apk_under_test': 'AndroidWebView.apk',
'test_apk': 'AndroidWebViewTest.apk',
},
'ChromePublicTest': {
- 'compile_targets': ['chrome_public_test_apk'],
'isolate_file_path': 'chrome/chrome_public_test_apk.isolate',
'apk_under_test': 'ChromePublic.apk',
'test_apk': 'ChromePublicTest.apk',
@@ -1525,28 +1534,24 @@ class AndroidInstrumentationTest(AndroidTest):
],
},
'ChromeSyncShellTest': {
- 'compile_targets': ['chrome_sync_shell_test_apk'],
'isolate_file_path': None,
'apk_under_test': 'ChromeSyncShell.apk',
'test_apk': 'ChromeSyncShellTest.apk',
},
'ChromotingTest': {
- 'compile_targets': ['remoting_test_apk'],
'isolate_file_path': None,
'apk_under_test': 'Chromoting.apk',
'test_apk': 'ChromotingTest.apk',
},
'ContentShellTest': {
- 'compile_targets': ['content_shell_test_apk'],
'isolate_file_path': 'content/content_shell_test_apk.isolate',
'apk_under_test': 'ContentShell.apk',
'test_apk': 'ContentShellTest.apk',
},
'SystemWebViewShellLayoutTest': {
- 'compile_targets': ['system_webview_apk',
- 'system_webview_shell_apk',
- 'system_webview_shell_layout_test_apk',
- 'android_tools'],
+ 'extra_compile_targets': ['system_webview_apk',
bpastene 2016/02/09 07:04:21 What makes these 'extra'? What's the point of desi
+ 'system_webview_shell_apk',
+ 'android_tools'],
'isolate_file_path': ('android_webview/'
'system_webview_shell_test_apk.isolate'),
'apk_under_test': 'SystemWebViewShell.apk',
@@ -1554,7 +1559,6 @@ class AndroidInstrumentationTest(AndroidTest):
'additional_apks': ['SystemWebView.apk'],
},
'MojoTest': {
- 'compile_targets': ['mojo_test_apk'],
'isolate_file_path': None,
'apk_under_test': None,
'test_apk': 'MojoTest.apk',
@@ -1568,9 +1572,16 @@ class AndroidInstrumentationTest(AndroidTest):
verbose=True, tool=None, host_driven_root=None,
additional_apks=None):
suite_defaults = AndroidInstrumentationTest._DEFAULT_SUITES.get(name, {})
+ if not compile_targets:
+ compile_targets = []
+ main_target = ANDROID_INSTRUMENTATION_TARGET_MAP.get(name)
+ if main_target:
+ compile_targets.append(main_target)
+ compile_targets.extend(suite_defaults.get('extra_compile_targets', []))
+
super(AndroidInstrumentationTest, self).__init__(
name,
- compile_targets or suite_defaults.get('compile_targets'),
+ compile_targets,
isolate_file_path or suite_defaults.get('isolate_file_path'))
self._additional_apks = (
additional_apks or suite_defaults.get('additional_apks'))
« 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