From f2ef1587e4dcd50f17d1baa53558b525fe02a15a Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 25 Mar 2014 15:16:27 +0000 Subject: 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 --- tools/compare_codereview.py | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'tools/compare_codereview.py') 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: -- cgit v1.2.3