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

Side by Side Diff: tools/perf/diagnose_test_failure

Issue 2034573005: [tools/perf] Improve the regex to find the commited revision (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | 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 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 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 import argparse 6 import argparse
7 import re 7 import re
8 import sys 8 import sys
9 import urllib2 9 import urllib2
10 10
11 11
12 _BUILD_REGEX = r'builds/(\d+)' 12 _BUILD_REGEX = r'builds/(\d+)'
13 _REVISION_REGEX = r'Cr-Commit-Position: refs/heads/master@{#(\d+)}' 13 _REVISION_REGEX = r'\nCr-Commit-Position: refs/heads/master@{#(\d+)}'
14 14
15 15
16 class _Color(object): 16 class _Color(object):
17 HEADER = '\033[95m' 17 HEADER = '\033[95m'
18 OKBLUE = '\033[94m' 18 OKBLUE = '\033[94m'
19 OKGREEN = '\033[92m' 19 OKGREEN = '\033[92m'
20 WARNING = '\033[93m' 20 WARNING = '\033[93m'
21 FAIL = '\033[91m' 21 FAIL = '\033[91m'
22 ENDC = '\033[0m' 22 ENDC = '\033[0m'
23 BOLD = '\033[1m' 23 BOLD = '\033[1m'
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 (min(first_failure_revisions), max(first_failure_revisions)), 96 (min(first_failure_revisions), max(first_failure_revisions)),
97 len(set(first_failure_revisions))), 97 len(set(first_failure_revisions))),
98 _Color.BOLD, _Color.OKGREEN) 98 _Color.BOLD, _Color.OKGREEN)
99 _PrintWithColor('First failed build: %s' % first_failed_build, 99 _PrintWithColor('First failed build: %s' % first_failed_build,
100 _Color.BOLD, _Color.OKGREEN) 100 _Color.BOLD, _Color.OKGREEN)
101 return 0 101 return 0
102 102
103 103
104 if __name__ == '__main__': 104 if __name__ == '__main__':
105 sys.exit(Main(sys.argv[1:])) 105 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698