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

Side by Side Diff: build/android/pylib/utils/findbugs.py

Issue 612883006: [Android] Print out the command used to run findbugs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 | « 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import optparse 5 import optparse
6 import os 6 import os
7 import re 7 import re
8 import shlex 8 import shlex
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 cmd = '%s -exclude %s ' % (cmd, os.path.abspath(exclude)) 137 cmd = '%s -exclude %s ' % (cmd, os.path.abspath(exclude))
138 138
139 if findbug_args: 139 if findbug_args:
140 cmd = '%s %s ' % (cmd, findbug_args) 140 cmd = '%s %s ' % (cmd, findbug_args)
141 141
142 chrome_classes = _GetChromeJars(release_version) 142 chrome_classes = _GetChromeJars(release_version)
143 if not chrome_classes: 143 if not chrome_classes:
144 return 1 144 return 1
145 cmd = '%s %s ' % (cmd, chrome_classes) 145 cmd = '%s %s ' % (cmd, chrome_classes)
146 146
147 print
148 print '*' * 80
149 print 'Command used to run findbugs:'
150 print cmd
151 print '*' * 80
152 print
153
147 proc = subprocess.Popen(shlex.split(cmd), 154 proc = subprocess.Popen(shlex.split(cmd),
148 stdout=subprocess.PIPE, stderr=subprocess.PIPE) 155 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
149 out, _err = proc.communicate() 156 out, _err = proc.communicate()
150 current_warnings_set = set(_StripLineNumbers(filter(None, out.splitlines()))) 157 current_warnings_set = set(_StripLineNumbers(filter(None, out.splitlines())))
151 158
152 if rebaseline: 159 if rebaseline:
153 return _Rebaseline(current_warnings_set, known_bugs) 160 return _Rebaseline(current_warnings_set, known_bugs)
154 else: 161 else:
155 return _DiffKnownWarnings(current_warnings_set, known_bugs) 162 return _DiffKnownWarnings(current_warnings_set, known_bugs)
156 163
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 243
237 def main(): 244 def main():
238 parser = GetCommonParser() 245 parser = GetCommonParser()
239 options, _ = parser.parse_args() 246 options, _ = parser.parse_args()
240 247
241 return Run(options) 248 return Run(options)
242 249
243 250
244 if __name__ == '__main__': 251 if __name__ == '__main__':
245 sys.exit(main()) 252 sys.exit(main())
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