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

Side by Side Diff: build/android/pylib/instrumentation/test_sharder.py

Issue 12378048: [Android] Switch instrumentation tests to the new shard/runner paradigm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add retries to the end of the queue instead of the beginning Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | 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
(Empty)
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Sharder for the instrumentation tests."""
6
7 from pylib.base import base_test_sharder
8 from pylib.base import sharded_tests_queue
9
10 import test_runner
11
12
13 class TestSharder(base_test_sharder.BaseTestSharder):
14 """Responsible for sharding the tests on the connected devices."""
15
16 def __init__(self, attached_devices, options, tests, apks):
17 super(TestSharder, self).__init__(attached_devices,
18 options.build_type)
19 self.options = options
20 self.tests = tests
21 self.apks = apks
22
23 def SetupSharding(self, tests):
24 """Called before starting the shards."""
25 base_test_sharder.SetTestsContainer(sharded_tests_queue.ShardedTestsQueue(
26 len(self.attached_devices), tests))
27
28 def CreateShardedTestRunner(self, device, index):
29 """Creates a sharded test runner.
30
31 Args:
32 device: Device serial where this shard will run.
33 index: Index of this device in the pool.
34
35 Returns:
36 A TestRunner object.
37 """
38 return test_runner.TestRunner(self.options, device, None, False, index,
39 self.apks, [])
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698