| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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()) |
| OLD | NEW |