OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from recipe_engine.types import freeze | 5 from recipe_engine.types import freeze |
6 | 6 |
7 DEPS = [ | 7 DEPS = [ |
8 'adb', | 8 'adb', |
9 'chromium', | 9 'chromium', |
10 'chromium_android', | 10 'chromium_android', |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 'enable_platform_mode': True, | 102 'enable_platform_mode': True, |
103 'write_buildbot_json': True, | 103 'write_buildbot_json': True, |
104 }, | 104 }, |
105 'timestamp_as_point_id': { | 105 'timestamp_as_point_id': { |
106 'perf_config': 'sharded_perf_tests.json', | 106 'perf_config': 'sharded_perf_tests.json', |
107 'timestamp_as_point_id': True | 107 'timestamp_as_point_id': True |
108 }, | 108 }, |
109 'telemetry_browser_tests_tester': { | 109 'telemetry_browser_tests_tester': { |
110 'run_telemetry_browser_tests': True, | 110 'run_telemetry_browser_tests': True, |
111 }, | 111 }, |
| 112 'use_devil_adb': { |
| 113 'android_apply_config': ['use_devil_adb'], |
| 114 } |
112 }) | 115 }) |
113 | 116 |
114 from recipe_engine.recipe_api import Property | 117 from recipe_engine.recipe_api import Property |
115 | 118 |
116 PROPERTIES = { | 119 PROPERTIES = { |
117 'buildername': Property(), | 120 'buildername': Property(), |
118 } | 121 } |
119 | 122 |
120 def RunSteps(api, buildername): | 123 def RunSteps(api, buildername): |
121 config = BUILDERS[buildername] | 124 config = BUILDERS[buildername] |
122 | 125 |
123 api.chromium_android.configure_from_properties( | 126 api.chromium_android.configure_from_properties( |
124 'base_config', | 127 'base_config', |
125 REPO_URL='svn://svn.chromium.org/chrome/trunk/src', | 128 REPO_URL='svn://svn.chromium.org/chrome/trunk/src', |
126 REPO_NAME='src/repo', | 129 REPO_NAME='src/repo', |
127 INTERNAL=True, | 130 INTERNAL=True, |
128 BUILD_CONFIG='Release') | 131 BUILD_CONFIG='Release') |
129 | 132 |
130 api.chromium_android.c.get_app_manifest_vars = True | 133 api.chromium_android.c.get_app_manifest_vars = True |
131 api.chromium_android.c.coverage = config.get('coverage', False) | 134 api.chromium_android.c.coverage = config.get('coverage', False) |
132 api.chromium_android.c.asan_symbolize = True | 135 api.chromium_android.c.asan_symbolize = True |
133 | 136 |
134 if config.get('adb_vendor_keys'): | 137 if config.get('adb_vendor_keys'): |
135 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 . | 138 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 . |
136 api.chromium.c.env.ADB_VENDOR_KEYS = api.path['build'].join( | 139 api.chromium.c.env.ADB_VENDOR_KEYS = api.path['build'].join( |
137 'site_config', '.adb_key') | 140 'site_config', '.adb_key') |
138 | 141 |
| 142 for c in config.get('android_apply_config', []): |
| 143 api.chromium_android.apply_config(c) |
| 144 |
139 api.chromium_android.init_and_sync( | 145 api.chromium_android.init_and_sync( |
140 use_bot_update=False, use_git_cache=config.get('use_git_cache', True)) | 146 use_bot_update=False, use_git_cache=config.get('use_git_cache', True)) |
141 | 147 |
142 api.chromium.runhooks() | 148 api.chromium.runhooks() |
143 api.chromium_android.run_tree_truth(additional_repos=['foo']) | 149 api.chromium_android.run_tree_truth(additional_repos=['foo']) |
144 assert 'MAJOR' in api.chromium.get_version() | 150 assert 'MAJOR' in api.chromium.get_version() |
145 | 151 |
146 api.chromium_android.host_info() | 152 api.chromium_android.host_info() |
147 | 153 |
148 if config.get('build', False): | 154 if config.get('build', False): |
(...skipping 23 matching lines...) Expand all Loading... |
172 | 178 |
173 api.chromium_android.provision_devices( | 179 api.chromium_android.provision_devices( |
174 skip_wipe=config.get('skip_wipe', False), | 180 skip_wipe=config.get('skip_wipe', False), |
175 disable_location=config.get('disable_location', False), | 181 disable_location=config.get('disable_location', False), |
176 min_battery_level=config.get('min_battery_level'), | 182 min_battery_level=config.get('min_battery_level'), |
177 max_battery_temp=config.get('max_battery_temp'), | 183 max_battery_temp=config.get('max_battery_temp'), |
178 reboot_timeout=1800, | 184 reboot_timeout=1800, |
179 remove_system_webview=config.get('remove_system_webview', False), | 185 remove_system_webview=config.get('remove_system_webview', False), |
180 disable_system_chrome=config.get('disable_system_chrome', False)) | 186 disable_system_chrome=config.get('disable_system_chrome', False)) |
181 | 187 |
| 188 api.chromium_android.common_tests_setup_steps() |
| 189 |
182 except api.step.StepFailure as f: | 190 except api.step.StepFailure as f: |
183 failure = f | 191 failure = f |
184 | 192 |
185 if config.get('downgrade'): | 193 if config.get('downgrade'): |
186 api.chromium_android.adb_install_apk('apk', allow_downgrade=True) | 194 api.chromium_android.adb_install_apk('apk', allow_downgrade=True) |
187 | 195 |
188 api.chromium_android.monkey_test() | 196 api.chromium_android.monkey_test() |
189 | 197 |
190 try: | 198 try: |
191 if config.get('perf_config'): | 199 if config.get('perf_config'): |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 properties_for('tester') + | 449 properties_for('tester') + |
442 api.override_step_data('get version (2)', | 450 api.override_step_data('get version (2)', |
443 api.raw_io.output('MAJOR=53\nMINOR=0\nBUILD=2800\nPATCH=0\n'))) | 451 api.raw_io.output('MAJOR=53\nMINOR=0\nBUILD=2800\nPATCH=0\n'))) |
444 | 452 |
445 yield (api.test('telemetry_browser_tests_failures') + | 453 yield (api.test('telemetry_browser_tests_failures') + |
446 properties_for('telemetry_browser_tests_tester') + | 454 properties_for('telemetry_browser_tests_tester') + |
447 api.override_step_data('Run telemetry browser_test PopularUrlsTest', | 455 api.override_step_data('Run telemetry browser_test PopularUrlsTest', |
448 api.json.output({'successes': ['passed_test1', 'passed_test2'], | 456 api.json.output({'successes': ['passed_test1', 'passed_test2'], |
449 'failures': ['failed_test_1', 'failed_test_2']}), | 457 'failures': ['failed_test_1', 'failed_test_2']}), |
450 retcode=1)) | 458 retcode=1)) |
OLD | NEW |