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

Side by Side Diff: build/android/findbugs_diff.py

Issue 11967019: [Android] Sever findbugs dependencies on environment variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fit nits Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/pylib/constants.py » ('j') | 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 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs findbugs, and returns an error code if there are new warnings. 7 """Runs findbugs, and returns an error code if there are new warnings.
8 This runs findbugs with an additional flag to exclude known bugs. 8 This runs findbugs with an additional flag to exclude known bugs.
9 To update the list of known bugs, do this: 9 To update the list of known bugs, do this:
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 Run 22 Run
23 $CHROM_SRC/third_party/findbugs/bin/findbugs -textui for details. 23 $CHROM_SRC/third_party/findbugs/bin/findbugs -textui for details.
24 24
25 """ 25 """
26 26
27 import optparse 27 import optparse
28 import os 28 import os
29 import sys 29 import sys
30 30
31 from pylib import findbugs 31 from pylib import constants
32 from pylib.utils import findbugs
32 33
33 34
34 def main(argv): 35 def main(argv):
35 if not findbugs.CheckEnvironment():
36 return 1
37
38 parser = findbugs.GetCommonParser() 36 parser = findbugs.GetCommonParser()
39 37
40 options, _ = parser.parse_args() 38 options, _ = parser.parse_args()
41 39
42 chrome_src = os.getenv('CHROME_SRC')
43
44 if not options.base_dir: 40 if not options.base_dir:
45 options.base_dir = os.path.join(chrome_src, 'build', 'android', 41 options.base_dir = os.path.join(constants.CHROME_DIR, 'build', 'android',
46 'findbugs_filter') 42 'findbugs_filter')
47 if not options.only_analyze: 43 if not options.only_analyze:
48 options.only_analyze = 'org.chromium.-' 44 options.only_analyze = 'org.chromium.-'
49 45
50 return findbugs.Run(options) 46 return findbugs.Run(options)
51 47
52 48
53 if __name__ == '__main__': 49 if __name__ == '__main__':
54 sys.exit(main(sys.argv)) 50 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/constants.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698