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

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

Issue 12256021: [Android] Split out the instrumentation test runner, sharder, and dispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some host_driven imports Created 7 years, 10 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
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') | build/android/run_instrumentation_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698