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

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

Issue 553783007: Add support for CHROMIUM_OUT_DIR to findbugs util. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 with file(known_bugs_file, 'w') as known_bugs: 63 with file(known_bugs_file, 'w') as known_bugs:
64 for warning in sorted(current_warnings_set): 64 for warning in sorted(current_warnings_set):
65 print >> known_bugs, warning 65 print >> known_bugs, warning
66 return 0 66 return 0
67 67
68 68
69 def _GetChromeJars(release_version): 69 def _GetChromeJars(release_version):
70 version = 'Debug' 70 version = 'Debug'
71 if release_version: 71 if release_version:
72 version = 'Release' 72 version = 'Release'
73 path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', version, 'lib.java') 73 path = os.path.join(constants.DIR_SOURCE_ROOT,
74 os.environ.get('CHROMIUM_OUT_DIR', 'out'),
75 version,
76 'lib.java')
74 cmd = 'find %s -name "*.jar"' % path 77 cmd = 'find %s -name "*.jar"' % path
75 out = cmd_helper.GetCmdOutput(shlex.split(cmd)) 78 out = cmd_helper.GetCmdOutput(shlex.split(cmd))
76 out = [p for p in out.splitlines() if not p.endswith('.dex.jar')] 79 out = [p for p in out.splitlines() if not p.endswith('.dex.jar')]
77 if not out: 80 if not out:
78 print 'No classes found in %s' % path 81 print 'No classes found in %s' % path
79 return ' '.join(out) 82 return ' '.join(out)
80 83
81 84
82 def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, 85 def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes,
83 rebaseline, release_version, findbug_args): 86 rebaseline, release_version, findbug_args):
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 236
234 def main(): 237 def main():
235 parser = GetCommonParser() 238 parser = GetCommonParser()
236 options, _ = parser.parse_args() 239 options, _ = parser.parse_args()
237 240
238 return Run(options) 241 return Run(options)
239 242
240 243
241 if __name__ == '__main__': 244 if __name__ == '__main__':
242 sys.exit(main()) 245 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