Chromium Code Reviews| Index: build/android/test_runner.py |
| diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
| index 499ccb02c96674ea8ab80932130b67ed52bf77cd..8e468e32c465e07ebc93108c4dc3c89e4c32b599 100755 |
| --- a/build/android/test_runner.py |
| +++ b/build/android/test_runner.py |
| @@ -916,29 +916,29 @@ def RunTestsCommand(args, parser): # pylint: disable=too-many-return-statements |
| if args.enable_platform_mode: |
|
jbudorick
2015/10/09 00:28:48
alternatively, we could just switch this to
if
agrieve
2015/10/09 00:58:54
Interesting! Sounds good except with the change as
|
| return RunTestsInPlatformMode(args, parser) |
| - if command in constants.LOCAL_MACHINE_TESTS: |
| - devices = [] |
| - else: |
| - devices = _GetAttachedDevices(args.blacklist_file, args.test_device) |
| - |
| forwarder.Forwarder.RemoveHostLog() |
| if not ports.ResetTestServerPortAllocation(): |
| raise Exception('Failed to reset test server port.') |
| + def get_devices(): |
| + if command in constants.LOCAL_MACHINE_TESTS: |
| + return [] |
| + return _GetAttachedDevices(args.blacklist_file, args.test_device) |
| + |
| if command == 'gtest': |
| return RunTestsInPlatformMode(args, parser) |
| elif command == 'linker': |
| - return _RunLinkerTests(args, devices) |
| + return _RunLinkerTests(args, get_devices()) |
| elif command == 'instrumentation': |
| - return _RunInstrumentationTests(args, devices) |
| + return _RunInstrumentationTests(args, get_devices()) |
| elif command == 'uiautomator': |
| - return _RunUIAutomatorTests(args, devices) |
| + return _RunUIAutomatorTests(args, get_devices()) |
| elif command == 'junit': |
| return _RunJUnitTests(args) |
| elif command == 'monkey': |
| - return _RunMonkeyTests(args, devices) |
| + return _RunMonkeyTests(args, get_devices()) |
| elif command == 'perf': |
| - return _RunPerfTests(args, devices) |
| + return _RunPerfTests(args, get_devices()) |
| elif command == 'python': |
| return _RunPythonTests(args) |
| else: |