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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: tools/run_swarm_tests_on_swarm.py
diff --git a/tools/run_swarm_tests_on_swarm.py b/tools/run_swarm_tests_on_swarm.py
index 4e3132fd84e0d46a9917dcb49b990bc78a2b68c2..5f02759296070c0e2174c13a98545e9742aa55ce 100755
--- a/tools/run_swarm_tests_on_swarm.py
+++ b/tools/run_swarm_tests_on_swarm.py
@@ -75,11 +75,11 @@ class Runner(object):
step_name = '%s/%s (%3.2fs)' % (platform, test_name, duration)
if returncode:
self.progress.update_item(
- 'Failed to archive %s\n%s' % (step_name, stdout), index=1)
+ 'Failed to archive %s\n%s' % (step_name, stdout), col0=1)
else:
hash_value = hashlib.sha1(open(isolated, 'rb').read()).hexdigest()
logging.info('%s: %s', step_name, hash_value)
- self.progress.update_item('Archived %s' % step_name, index=1)
+ self.progress.update_item('Archived %s' % step_name, col0=1)
self.add_task(0, self.trigger, test, platform, hash_value)
finally:
try:
@@ -111,9 +111,9 @@ class Runner(object):
step_name = '%s/%s (%3.2fs)' % (platform, test_name, duration)
if returncode:
self.progress.update_item(
- 'Failed to trigger %s\n%s' % (step_name, stdout), index=1)
+ 'Failed to trigger %s\n%s' % (step_name, stdout), col0=1)
else:
- self.progress.update_item('Triggered %s' % step_name, index=1)
+ self.progress.update_item('Triggered %s' % step_name, col0=1)
self.add_task(0, self.get_result, test, platform)
return None
@@ -131,16 +131,16 @@ class Runner(object):
# Only print the output for failures, successes are unexciting.
if returncode:
self.progress.update_item(
- 'Failed %s:\n%s' % (step_name, stdout), index=1)
+ 'Failed %s:\n%s' % (step_name, stdout), col0=1)
return (test_name, platform, stdout)
- self.progress.update_item('Passed %s' % step_name, index=1)
+ self.progress.update_item('Passed %s' % step_name, col0=1)
return None
def run_swarm_tests_on_swarm(oses, tests, logs, isolate_server, swarm_server):
runs = len(tests) * len(oses)
total = 3 * runs
- progress = threading_utils.Progress(total)
+ progress = threading_utils.Progress([0, total])
progress.use_cr_only = False
tempdir = tempfile.mkdtemp(prefix='swarm_client_tests')
try:

Powered by Google App Engine
This is Rietveld 408576698