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

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

Issue 19537004: [Android] Converts host driven tests to common test_dispatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sharding_refactoring
Patch Set: Converts --official-build into a boolean flag Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/buildbot/bb_device_steps.py ('k') | build/android/pylib/base/test_dispatcher.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/base/sharded_tests_queue.py
diff --git a/build/android/pylib/base/sharded_tests_queue.py b/build/android/pylib/base/sharded_tests_queue.py
deleted file mode 100644
index c2b4f2de086d64205b28385618e228880888ebfb..0000000000000000000000000000000000000000
--- a/build/android/pylib/base/sharded_tests_queue.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-"""A module that contains a queue for running sharded tests."""
-
-import multiprocessing
-
-
-class ShardedTestsQueue(object):
- """A queue for managing pending tests across different runners.
-
- This class should only be used when sharding.
-
- Attributes:
- num_devices: an integer; the number of attached Android devices.
- tests: a list of tests to be run.
- tests_queue: if sharding, a JoinableQueue object that holds tests from
- |tests|. Otherwise, a list holding tests.
- results_queue: a Queue object to hold TestRunResults objects.
- """
- _STOP_SENTINEL = 'STOP' # sentinel value for iter()
-
- def __init__(self, num_devices, tests):
- self.num_devices = num_devices
- self.tests_queue = multiprocessing.Queue()
- for test in tests:
- self.tests_queue.put(test)
- for _ in xrange(self.num_devices):
- self.tests_queue.put(ShardedTestsQueue._STOP_SENTINEL)
-
- def __iter__(self):
- """Returns an iterator with the test cases."""
- return iter(self.tests_queue.get, ShardedTestsQueue._STOP_SENTINEL)
« no previous file with comments | « build/android/buildbot/bb_device_steps.py ('k') | build/android/pylib/base/test_dispatcher.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698