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

Side by Side Diff: tools/run_swarm_tests_on_swarm.py

Issue 25478012: Make Progress support an arbitrary number of columns. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/tools/swarm_client@1_progress
Patch Set: Kept Progress.start public Created 7 years, 2 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 | « tools/isolateserver_load_test.py ('k') | utils/threading_utils.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Runs the whole set unit tests on swarm.""" 6 """Runs the whole set unit tests on swarm."""
7 7
8 import datetime 8 import datetime
9 import glob 9 import glob
10 import getpass 10 import getpass
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 self.progress.update_item( 133 self.progress.update_item(
134 'Failed %s:\n%s' % (step_name, stdout), index=1) 134 'Failed %s:\n%s' % (step_name, stdout), index=1)
135 return (test_name, platform, stdout) 135 return (test_name, platform, stdout)
136 self.progress.update_item('Passed %s' % step_name, index=1) 136 self.progress.update_item('Passed %s' % step_name, index=1)
137 return None 137 return None
138 138
139 139
140 def run_swarm_tests_on_swarm(oses, tests, logs, isolate_server, swarm_server): 140 def run_swarm_tests_on_swarm(oses, tests, logs, isolate_server, swarm_server):
141 runs = len(tests) * len(oses) 141 runs = len(tests) * len(oses)
142 total = 3 * runs 142 total = 3 * runs
143 progress = threading_utils.Progress(total) 143 columns = [('index', 0), ('size', total)]
144 progress = threading_utils.Progress(columns)
144 progress.use_cr_only = False 145 progress.use_cr_only = False
145 tempdir = tempfile.mkdtemp(prefix='swarm_client_tests') 146 tempdir = tempfile.mkdtemp(prefix='swarm_client_tests')
146 try: 147 try:
147 with threading_utils.ThreadPoolWithProgress( 148 with threading_utils.ThreadPoolWithProgress(
148 progress, runs, runs, total) as pool: 149 progress, runs, runs, total) as pool:
149 start = time.time() 150 start = time.time()
150 runner = Runner( 151 runner = Runner(
151 isolate_server, swarm_server, pool.add_task, progress, tempdir) 152 isolate_server, swarm_server, pool.add_task, progress, tempdir)
152 for test in tests: 153 for test in tests:
153 for platform in oses: 154 for platform in oses:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return run_swarm_tests_on_swarm( 240 return run_swarm_tests_on_swarm(
240 oses, 241 oses,
241 tests, 242 tests,
242 options.logs, 243 options.logs,
243 options.isolate_server, 244 options.isolate_server,
244 options.swarming) 245 options.swarming)
245 246
246 247
247 if __name__ == '__main__': 248 if __name__ == '__main__':
248 sys.exit(main()) 249 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/isolateserver_load_test.py ('k') | utils/threading_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698