test_runner.py Apply --num-retries to device retries
Since the default for --num-retries is 3, the main use-case of passing
it is to set it to 0. Wanted to fail-fast, and then having the same
broken code run 3 more times makes for excessive logging.
BUG=none
Review URL: https://codereview.chromium.org/1860693002
Cr-Commit-Position: refs/heads/master@{#385255}
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 5edc6da..1f3752a4 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -931,7 +931,7 @@
sys.path = sys.path[1:]
-def _GetAttachedDevices(blacklist_file, test_device, enable_cache):
+def _GetAttachedDevices(blacklist_file, test_device, enable_cache, num_retries):
"""Get all attached devices.
Args:
@@ -947,7 +947,8 @@
else None)
attached_devices = device_utils.DeviceUtils.HealthyDevices(
- blacklist, enable_device_files_cache=enable_cache)
+ blacklist, enable_device_files_cache=enable_cache,
+ default_retries=num_retries)
if test_device:
test_device = [d for d in attached_devices if d == test_device]
if not test_device:
@@ -989,7 +990,7 @@
def get_devices():
return _GetAttachedDevices(args.blacklist_file, args.test_device,
- args.enable_device_cache)
+ args.enable_device_cache, args.num_retries)
if command == 'linker':
return _RunLinkerTests(args, get_devices())