Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(790)

Unified Diff: build/android/test_runner.py

Issue 1397013002: Android test_runner.py: Eliminate unused "adb devices" call for gtests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary check Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 404a06a8bf4430ad61ab5d0a6798711a6f634da2..a3a3a98aca283509202c1446145d9838a6ee1820 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -921,30 +921,28 @@ def RunTestsCommand(args, parser): # pylint: disable=too-many-return-statements
if args.enable_platform_mode:
return RunTestsInPlatformMode(args, parser)
- if command in constants.LOCAL_MACHINE_TESTS:
- devices = []
- else:
- devices = _GetAttachedDevices(args.blacklist_file, args.test_device,
- args.enable_device_cache)
-
forwarder.Forwarder.RemoveHostLog()
if not ports.ResetTestServerPortAllocation():
raise Exception('Failed to reset test server port.')
+ def get_devices():
jbudorick 2015/10/09 01:06:28 oh, hrm. That wasn't what I meant, but this is fin
+ return _GetAttachedDevices(args.blacklist_file, args.test_device,
+ args.enable_device_cache)
+
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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698