| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 if config.get('specific_install'): | 149 if config.get('specific_install'): |
| 150 api.chromium_android.adb_install_apk('Chrome.apk', devices=['abc123']) | 150 api.chromium_android.adb_install_apk('Chrome.apk', devices=['abc123']) |
| 151 | 151 |
| 152 api.adb.root_devices() | 152 api.adb.root_devices() |
| 153 api.chromium_android.spawn_logcat_monitor() | 153 api.chromium_android.spawn_logcat_monitor() |
| 154 | 154 |
| 155 failure = False | 155 failure = False |
| 156 try: | 156 try: |
| 157 # TODO(luqui): remove redundant cruft, need one consistent API. | 157 # TODO(luqui): remove redundant cruft, need one consistent API. |
| 158 api.chromium_android.detect_and_setup_devices() | 158 api.chromium_android.detect_and_setup_devices() |
| 159 api.chromium_android.device_status_check() | |
| 160 | 159 |
| 161 api.path.mock_add_paths(api.chromium_android.known_devices_file) | 160 api.path.mock_add_paths(api.chromium_android.known_devices_file) |
| 162 api.chromium_android.device_status_check( | 161 api.chromium_android.device_status_check( |
| 163 restart_usb=config.get('restart_usb', False)) | 162 restart_usb=config.get('restart_usb', False)) |
| 164 | 163 |
| 165 api.chromium_android.provision_devices( | 164 api.chromium_android.provision_devices( |
| 166 skip_wipe=config.get('skip_wipe', False), | 165 skip_wipe=config.get('skip_wipe', False), |
| 167 disable_location=config.get('disable_location', False), | 166 disable_location=config.get('disable_location', False), |
| 168 min_battery_level=config.get('min_battery_level'), | 167 min_battery_level=config.get('min_battery_level'), |
| 169 max_battery_temp=config.get('max_battery_temp'), | 168 max_battery_temp=config.get('max_battery_temp'), |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 slavename='tehslave', | 242 slavename='tehslave', |
| 244 repo_name='src/repo', | 243 repo_name='src/repo', |
| 245 patch_url='https://the.patch.url/the.patch', | 244 patch_url='https://the.patch.url/the.patch', |
| 246 repo_url='svn://svn.chromium.org/chrome/trunk/src', | 245 repo_url='svn://svn.chromium.org/chrome/trunk/src', |
| 247 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | 246 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', |
| 248 internal=True) | 247 internal=True) |
| 249 | 248 |
| 250 for buildername in BUILDERS: | 249 for buildername in BUILDERS: |
| 251 yield api.test('%s_basic' % buildername) + properties_for(buildername) | 250 yield api.test('%s_basic' % buildername) + properties_for(buildername) |
| 252 | 251 |
| 253 yield (api.test('tester_no_devices_during_recovery') + | 252 yield (api.test('tester_no_devices') + |
| 254 properties_for('tester') + | 253 properties_for('tester') + |
| 255 api.step_data('device_recovery', retcode=1)) | 254 api.step_data('device_status_check', retcode=1)) |
| 256 | 255 |
| 257 yield (api.test('tester_no_devices_during_status') + | 256 yield (api.test('tester_other_device_failure') + |
| 258 properties_for('tester') + | 257 properties_for('tester') + |
| 259 api.step_data('device_status', retcode=1)) | 258 api.step_data('device_status_check', retcode=2)) |
| 260 | |
| 261 yield (api.test('tester_other_device_failure_during_recovery') + | |
| 262 properties_for('tester') + | |
| 263 api.step_data('device_recovery', retcode=2)) | |
| 264 | |
| 265 yield (api.test('tester_other_device_failure_during_status') + | |
| 266 properties_for('tester') + | |
| 267 api.step_data('device_status', retcode=2)) | |
| 268 | 259 |
| 269 yield (api.test('tester_with_step_warning') + | 260 yield (api.test('tester_with_step_warning') + |
| 270 properties_for('tester') + | 261 properties_for('tester') + |
| 271 api.step_data('unittests', retcode=88)) | 262 api.step_data('unittests', retcode=88)) |
| 272 | 263 |
| 273 yield (api.test('tester_blacklisted_devices') + | 264 yield (api.test('tester_blacklisted_devices') + |
| 274 properties_for('tester') + | 265 properties_for('tester') + |
| 275 api.override_step_data('provision_devices', | 266 api.override_step_data('provision_devices', |
| 276 api.json.output(['abc123', 'def456']))) | 267 api.json.output(['abc123', 'def456']))) |
| 277 | 268 |
| 278 yield (api.test('tester_offline_devices') + | 269 yield (api.test('tester_offline_devices') + |
| 279 properties_for('tester') + | 270 properties_for('tester') + |
| 280 api.override_step_data('device_status', | 271 api.override_step_data('device_status_check', |
| 281 api.json.output([{}, {}]))) | 272 api.json.output([{}, {}]))) |
| 282 | 273 |
| 283 yield (api.test('perf_tests_failure') + | 274 yield (api.test('perf_tests_failure') + |
| 284 properties_for('perf_runner') + | 275 properties_for('perf_runner') + |
| 285 api.step_data('perf_test.foo', retcode=1)) | 276 api.step_data('perf_test.foo', retcode=1)) |
| 286 | 277 |
| 287 yield (api.test('gerrit_refs') + | 278 yield (api.test('gerrit_refs') + |
| 288 api.properties.generic( | 279 api.properties.generic( |
| 289 buildername='gerrit_try_builder', | 280 buildername='gerrit_try_builder', |
| 290 slavename='testslave', | 281 slavename='testslave', |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 384 |
| 394 yield (api.test('device_file_format_mismatch') + | 385 yield (api.test('device_file_format_mismatch') + |
| 395 properties_for('tester') + | 386 properties_for('tester') + |
| 396 api.override_step_data('fix_device_file_format.read_device_file', | 387 api.override_step_data('fix_device_file_format.read_device_file', |
| 397 api.raw_io.output('["device1", "device2"]'))) | 388 api.raw_io.output('["device1", "device2"]'))) |
| 398 | 389 |
| 399 yield (api.test('tombstones_m53') + | 390 yield (api.test('tombstones_m53') + |
| 400 properties_for('tester') + | 391 properties_for('tester') + |
| 401 api.override_step_data('get version (2)', | 392 api.override_step_data('get version (2)', |
| 402 api.raw_io.output('MAJOR=53\nMINOR=0\nBUILD=2800\nPATCH=0\n'))) | 393 api.raw_io.output('MAJOR=53\nMINOR=0\nBUILD=2800\nPATCH=0\n'))) |
| OLD | NEW |