| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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()) |
| OLD | NEW |