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

Unified Diff: build/android/pylib/base/test_dispatcher.py

Issue 2039363002: [Android] Ensure perf test runner does not create shards for blacklisted devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | build/android/pylib/perf/setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 @@ def _SetUp(runner_factory, device, out_runners, threadsafe_counter):
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):
« no previous file with comments | « no previous file | build/android/pylib/perf/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698