Index: build/android/pylib/base/test_dispatcher.py |
diff --git a/build/android/pylib/base/test_dispatcher.py b/build/android/pylib/base/test_dispatcher.py |
index c513d9abebf9fe9336a18eb3b771b6fa422cc8c4..327709ca609a4aefa0e1e12128aab6363cdaa9f5 100644 |
--- a/build/android/pylib/base/test_dispatcher.py |
+++ b/build/android/pylib/base/test_dispatcher.py |
@@ -147,8 +147,12 @@ |
index = threadsafe_counter.GetAndIncrement() |
logging.warning('Creating shard %s for device %s.', index, device) |
runner = runner_factory(device, index) |
- runner.SetUp() |
- out_runners.append(runner) |
+ if runner: |
+ runner.SetUp() |
+ out_runners.append(runner) |
+ else: |
+ logging.info('Device %s is not active. Will not create shard %s.', |
+ str(device), index) |
except (device_errors.CommandFailedError, |
device_errors.CommandTimeoutError, |
device_errors.DeviceUnreachableError): |