diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-25 15:16:27 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-25 15:16:27 +0000 |
commit | f2ef1587e4dcd50f17d1baa53558b525fe02a15a (patch) | |
tree | 3f3ac56f72b89e170a5b844992758b8a60d7a2d2 /tools | |
parent | 2fe641b9f04bac1e31952fdab61036a6f07187eb (diff) |
Tweak compare_codereview.py.
- summary at end so I don't have to scroll back up
- tweak the diff markers a bit
- strip the test runtimes
BUG=skia:
R=halcanary@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/211233002
git-svn-id: http://skia.googlecode.com/svn/trunk@13935 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/compare_codereview.py | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/tools/compare_codereview.py b/tools/compare_codereview.py index ae2909611e..b39bfe2942 100755 --- a/tools/compare_codereview.py +++ b/tools/compare_codereview.py @@ -336,22 +336,6 @@ def main(control_url, roll_url, verbosity=1): roll_name = '[roll %s]' % roll_url.split('/')[-1] out = sys.stdout - if verbosity > 0: - # Print out summary of all of the bots. - out.write('%11s %11s %4s %s\n\n' % - ('CONTROL', 'ROLL', 'DIFF', 'BOT')) - for bot in sorted(all_bots): - if control[bot].status != roll[bot].status: - diff = '****' - elif (control[bot].status != 'success' or - roll[bot].status != 'success'): - diff = '....' - else: - diff = '' - out.write('%11s %11s %4s %s\n' % ( - control[bot].status, roll[bot].status, diff, bot)) - out.write('\n') - out.flush() for bot in sorted(all_bots): if (roll[bot].status == 'success'): @@ -371,6 +355,8 @@ def main(control_url, roll_url, verbosity=1): for result in results: formatted_result = re.sub( r'(\S*\.html) ', '\n__\g<1>\n', result.text) + # Strip runtimes. + formatted_result = re.sub(r'\(.*\)', '', formatted_result) printer(2, formatted_result) if ('compile' in result.text or '...and more' in result.text): @@ -380,6 +366,25 @@ def main(control_url, roll_url, verbosity=1): printer(2, status) out.write('\n') + if verbosity > 0: + # Print out summary of all of the bots. + out.write('%11s %11s %4s %s\n\n' % + ('CONTROL', 'ROLL', 'DIFF', 'BOT')) + for bot in sorted(all_bots): + if roll[bot].status == 'success': + diff = '' + elif (control[bot].status == 'success' and + roll[bot].status == 'failure'): + diff = '!!!!' + elif ('pending' in control[bot].status or + 'pending' in roll[bot].status): + diff = '....' + else: + diff = '****' + out.write('%11s %11s %4s %s\n' % ( + control[bot].status, roll[bot].status, diff, bot)) + out.write('\n') + out.flush() if __name__ == '__main__': if len(sys.argv) < 3: |