Chromium Code Reviews| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 api.chromium.output_dir.join('chrome_public_apk', 'classes.dex.zip')) | 141 api.chromium.output_dir.join('chrome_public_apk', 'classes.dex.zip')) |
| 142 | 142 |
| 143 if config.get('specific_install'): | 143 if config.get('specific_install'): |
| 144 api.chromium_android.adb_install_apk('Chrome.apk', devices=['abc123']) | 144 api.chromium_android.adb_install_apk('Chrome.apk', devices=['abc123']) |
| 145 | 145 |
| 146 api.adb.root_devices() | 146 api.adb.root_devices() |
| 147 api.chromium_android.spawn_logcat_monitor() | 147 api.chromium_android.spawn_logcat_monitor() |
| 148 | 148 |
| 149 failure = False | 149 failure = False |
| 150 try: | 150 try: |
| 151 # TODO(luqui): remove redundant cruft, need one consistent API. | 151 # detect_and_setup_devices contains device recovery, provisiong, and status. |
| 152 api.chromium_android.detect_and_setup_devices() | 152 api.chromium_android.detect_and_setup_devices() |
| 153 | 153 api.chromium_android.device_status_check() |
| 154 api.chromium_android.device_status_check( | 154 # Needed to test all flags to provision devices. |
| 155 restart_usb=config.get('restart_usb', False)) | |
| 156 | |
| 157 api.chromium_android.provision_devices( | 155 api.chromium_android.provision_devices( |
| 158 skip_wipe=config.get('skip_wipe', False), | 156 skip_wipe=config.get('skip_wipe', False), |
| 159 disable_location=config.get('disable_location', False), | 157 disable_location=config.get('disable_location', False), |
| 160 min_battery_level=config.get('min_battery_level'), | 158 min_battery_level=config.get('min_battery_level'), |
| 161 max_battery_temp=config.get('max_battery_temp'), | 159 max_battery_temp=config.get('max_battery_temp'), |
| 162 reboot_timeout=1800, | 160 reboot_timeout=1800, |
| 163 remove_system_webview=config.get('remove_system_webview', False), | 161 remove_system_webview=config.get('remove_system_webview', False), |
| 164 disable_system_chrome=config.get('disable_system_chrome', False)) | 162 disable_system_chrome=config.get('disable_system_chrome', False)) |
| 165 | 163 |
| 164 | |
|
jbudorick
2016/06/15 14:05:38
?
rnephew (Reviews Here)
2016/06/15 16:05:13
Done.
| |
| 166 except api.step.StepFailure as f: | 165 except api.step.StepFailure as f: |
| 167 failure = f | 166 failure = f |
| 168 | 167 |
| 169 if config.get('downgrade'): | 168 if config.get('downgrade'): |
| 170 api.chromium_android.adb_install_apk('apk', allow_downgrade=True) | 169 api.chromium_android.adb_install_apk('apk', allow_downgrade=True) |
| 171 | 170 |
| 172 api.chromium_android.monkey_test() | 171 api.chromium_android.monkey_test() |
| 173 | 172 |
| 174 try: | 173 try: |
| 175 if config.get('perf_config'): | 174 if config.get('perf_config'): |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 buildername=buildername, | 231 buildername=buildername, |
| 233 slavename='tehslave', | 232 slavename='tehslave', |
| 234 repo_name='src/repo', | 233 repo_name='src/repo', |
| 235 patch_url='https://the.patch.url/the.patch', | 234 patch_url='https://the.patch.url/the.patch', |
| 236 repo_url='svn://svn.chromium.org/chrome/trunk/src', | 235 repo_url='svn://svn.chromium.org/chrome/trunk/src', |
| 237 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | 236 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', |
| 238 internal=True) | 237 internal=True) |
| 239 | 238 |
| 240 for buildername in BUILDERS: | 239 for buildername in BUILDERS: |
| 241 yield api.test('%s_basic' % buildername) + properties_for(buildername) | 240 yield api.test('%s_basic' % buildername) + properties_for(buildername) |
| 242 | 241 |
|
jbudorick
2016/06/15 14:05:38
I would expect some of these to fail in recovery.
rnephew (Reviews Here)
2016/06/15 16:05:13
Done.
| |
| 243 yield (api.test('tester_no_devices') + | 242 yield (api.test('tester_no_devices') + |
| 244 properties_for('tester') + | 243 properties_for('tester') + |
| 245 api.step_data('device_status_check', retcode=1)) | 244 api.step_data('device_status', retcode=1)) |
| 246 | 245 |
| 247 yield (api.test('tester_other_device_failure') + | 246 yield (api.test('tester_other_device_failure') + |
| 248 properties_for('tester') + | 247 properties_for('tester') + |
| 249 api.step_data('device_status_check', retcode=2)) | 248 api.step_data('device_status', retcode=2)) |
| 250 | 249 |
| 251 yield (api.test('tester_with_step_warning') + | 250 yield (api.test('tester_with_step_warning') + |
| 252 properties_for('tester') + | 251 properties_for('tester') + |
| 253 api.step_data('unittests', retcode=88)) | 252 api.step_data('unittests', retcode=88)) |
| 254 | 253 |
| 255 yield (api.test('tester_blacklisted_devices') + | 254 yield (api.test('tester_blacklisted_devices') + |
| 256 properties_for('tester') + | 255 properties_for('tester') + |
| 257 api.override_step_data('provision_devices', | 256 api.override_step_data('provision_devices', |
| 258 api.json.output(['abc123', 'def456']))) | 257 api.json.output(['abc123', 'def456']))) |
| 259 | 258 |
| 260 yield (api.test('tester_offline_devices') + | 259 yield (api.test('tester_offline_devices') + |
| 261 properties_for('tester') + | 260 properties_for('tester') + |
| 262 api.override_step_data('device_status_check', | 261 api.override_step_data('device_status', |
| 263 api.json.output([{}, {}]))) | 262 api.json.output([{}, {}]))) |
| 264 | 263 |
| 265 yield (api.test('perf_tests_failure') + | 264 yield (api.test('perf_tests_failure') + |
| 266 properties_for('perf_runner') + | 265 properties_for('perf_runner') + |
| 267 api.step_data('perf_test.foo', retcode=1)) | 266 api.step_data('perf_test.foo', retcode=1)) |
| 268 | 267 |
| 269 yield (api.test('gerrit_refs') + | 268 yield (api.test('gerrit_refs') + |
| 270 api.properties.generic( | 269 api.properties.generic( |
| 271 buildername='gerrit_try_builder', | 270 buildername='gerrit_try_builder', |
| 272 slavename='testslave', | 271 slavename='testslave', |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 365 'Created xml report file at file:///path/to/testResult.xml', | 364 'Created xml report file at file:///path/to/testResult.xml', |
| 366 stream='stdout')) + | 365 stream='stdout')) + |
| 367 api.override_step_data('Read test result and report failures', | 366 api.override_step_data('Read test result and report failures', |
| 368 api.raw_io.output(result_xml_with_unexpected_failure_method))) | 367 api.raw_io.output(result_xml_with_unexpected_failure_method))) |
| 369 | 368 |
| 370 yield (api.test('webview_cts_invalid_output') + | 369 yield (api.test('webview_cts_invalid_output') + |
| 371 properties_for('webview_cts') + | 370 properties_for('webview_cts') + |
| 372 api.override_step_data('Run CTS', api.raw_io.stream_output( | 371 api.override_step_data('Run CTS', api.raw_io.stream_output( |
| 373 'Invalid CTS output here...', | 372 'Invalid CTS output here...', |
| 374 stream='stdout'))) | 373 stream='stdout'))) |
| OLD | NEW |