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

Side by Side Diff: build/android/pylib/local/device/local_device_perf_test_run.py

Issue 2187513002: [Android] Fix perf test runner in platform mode return value for when devices are blacklisted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import io 5 import io
6 import json 6 import json
7 import logging 7 import logging
8 import os 8 import os
9 import pickle 9 import pickle
10 import shutil 10 import shutil
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 # Affinitize the tests. 337 # Affinitize the tests.
338 self._SplitTestsByAffinity() 338 self._SplitTestsByAffinity()
339 if not self._test_buckets: 339 if not self._test_buckets:
340 raise local_device_test_run.NoTestsError() 340 raise local_device_test_run.NoTestsError()
341 341
342 def run_perf_tests(shard_id): 342 def run_perf_tests(shard_id):
343 if device_status.IsBlacklisted( 343 if device_status.IsBlacklisted(
344 str(self._devices[shard_id]), self._env.blacklist): 344 str(self._devices[shard_id]), self._env.blacklist):
345 logging.warning('Device %s is not active. Will not create shard %s.', 345 logging.warning('Device %s is not active. Will not create shard %s.',
346 str(self._devices[shard_id]), shard_id) 346 str(self._devices[shard_id]), shard_id)
347 return [] 347 return None
348 s = TestShard(self._env, self._test_instance, self._devices[shard_id], 348 s = TestShard(self._env, self._test_instance, self._devices[shard_id],
349 shard_id, self._test_buckets[shard_id], 349 shard_id, self._test_buckets[shard_id],
350 retries=self._env.max_tries, timeout=self._timeout) 350 retries=self._env.max_tries, timeout=self._timeout)
351 return s.RunTestsOnShard() 351 return s.RunTestsOnShard()
352 352
353 device_indices = range(min(len(self._devices), len(self._test_buckets))) 353 device_indices = range(min(len(self._devices), len(self._test_buckets)))
354 shards = parallelizer.Parallelizer(device_indices).pMap(run_perf_tests) 354 shards = parallelizer.Parallelizer(device_indices).pMap(run_perf_tests)
355 return [x for x in shards.pGet(self._timeout) if x is not None] 355 return [x for x in shards.pGet(self._timeout) if x is not None]
356 356
357 # override 357 # override
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 # override 417 # override
418 def _RunTest(self, _device, _test): 418 def _RunTest(self, _device, _test):
419 raise NotImplementedError 419 raise NotImplementedError
420 420
421 421
422 class TestDictVersionError(Exception): 422 class TestDictVersionError(Exception):
423 pass 423 pass
424 424
425 class PerfTestRunGetStepsError(Exception): 425 class PerfTestRunGetStepsError(Exception):
426 pass 426 pass
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698