Index: build/android/pylib/perf/setup.py |
diff --git a/build/android/pylib/perf/setup.py b/build/android/pylib/perf/setup.py |
index 31db14fa031e0cccfe8b573bb6bc0b56f9dbaaeb..8e2c0e68df7f73d292e4d29e50fa25be782d1177 100644 |
--- a/build/android/pylib/perf/setup.py |
+++ b/build/android/pylib/perf/setup.py |
@@ -98,8 +98,12 @@ def Setup(test_options, active_devices): |
flaky_steps = json.load(f) |
def TestRunnerFactory(device, shard_index): |
- return test_runner.TestRunner( |
- test_options, device, shard_index, len(all_devices), |
- steps_dict, flaky_steps) |
+ if str(device) in active_devices: |
+ return test_runner.TestRunner( |
+ test_options, device, shard_index, len(all_devices), |
+ steps_dict, flaky_steps) |
+ logging.info('Device %s is not active. Will not create shard %s.', |
+ str(device), shard_index) |
+ return None |
return (TestRunnerFactory, sorted_step_names, all_devices) |