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