Reland of [Android] Ensure perf test runner does not create shards for blacklisted devices. (patchset #1 id:1 of https://codereview.chromium.org/2059253002/ )

Reason for revert:
CL wasn't responsible for the v8 breakage

Original issue's description:
> Revert of [Android] Ensure perf test runner does not create shards for blacklisted devices. (patchset #4 id:60001 of https://codereview.chromium.org/2039363002/ )
>
> Reason for revert:
> Possibly breaking v8 perf bots.
>
> Original issue's description:
> > [Android] Ensure perf test runner does not create shards for blacklisted devices.
> >
> > BUG=617559
> >
> > Committed: https://crrev.com/15c70d1120b419bc68a484d8ecce5773433466f0
> > Cr-Commit-Position: refs/heads/master@{#398197}
>
> TBR=jbudorick@chromium.org,perezju@chromium.org,mikecase@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=617559
>
> Committed: https://crrev.com/c89b1748ad3fee34318dd63b32e881a7361743ce
> Cr-Commit-Position: refs/heads/master@{#399460}

TBR=jbudorick@chromium.org,mikecase@chromium.org,rnephew@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=617559

Review-Url: https://codereview.chromium.org/2084493003
Cr-Original-Commit-Position: refs/heads/master@{#400659}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e0ce69beeada5f4918d278c5cf8afe10165e84ce
This commit is contained in:
perezju 2016-06-20 05:30:32 -07:00 коммит произвёл Commit bot
Родитель dfed34c541
Коммит 3abf0fb458
2 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -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):

Просмотреть файл

@ -102,8 +102,10 @@ 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)
return None
return (TestRunnerFactory, sorted_step_names, all_devices)