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

Side by Side Diff: build/android/pylib/base/sharded_tests_queue.py

Issue 11879031: [Android] Move base tests classes to pylib/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 7 years, 11 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/base/base_test_sharder.py ('k') | build/android/pylib/base/test_result.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 5
6 """A module that contains a queue for running sharded tests.""" 6 """A module that contains a queue for running sharded tests."""
7 7
8 import multiprocessing 8 import multiprocessing
9 9
10 10
(...skipping 15 matching lines...) Expand all
26 self.num_devices = num_devices 26 self.num_devices = num_devices
27 self.tests_queue = multiprocessing.Queue() 27 self.tests_queue = multiprocessing.Queue()
28 for test in tests: 28 for test in tests:
29 self.tests_queue.put(test) 29 self.tests_queue.put(test)
30 for _ in xrange(self.num_devices): 30 for _ in xrange(self.num_devices):
31 self.tests_queue.put(ShardedTestsQueue._STOP_SENTINEL) 31 self.tests_queue.put(ShardedTestsQueue._STOP_SENTINEL)
32 32
33 def __iter__(self): 33 def __iter__(self):
34 """Returns an iterator with the test cases.""" 34 """Returns an iterator with the test cases."""
35 return iter(self.tests_queue.get, ShardedTestsQueue._STOP_SENTINEL) 35 return iter(self.tests_queue.get, ShardedTestsQueue._STOP_SENTINEL)
OLDNEW
« no previous file with comments | « build/android/pylib/base/base_test_sharder.py ('k') | build/android/pylib/base/test_result.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698