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 argparse | 5 import argparse |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 import re | 8 import re |
9 import shlex | 9 import shlex |
10 import sys | 10 import sys |
11 import xml.dom.minidom | 11 import xml.dom.minidom |
12 | 12 |
13 from pylib import cmd_helper | 13 from devil.utils import cmd_helper |
14 from pylib import constants | 14 from pylib import constants |
15 | 15 |
16 | 16 |
17 _FINDBUGS_HOME = os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', | 17 _FINDBUGS_HOME = os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', |
18 'findbugs') | 18 'findbugs') |
19 _FINDBUGS_JAR = os.path.join(_FINDBUGS_HOME, 'lib', 'findbugs.jar') | 19 _FINDBUGS_JAR = os.path.join(_FINDBUGS_HOME, 'lib', 'findbugs.jar') |
20 _FINDBUGS_MAX_HEAP = 768 | 20 _FINDBUGS_MAX_HEAP = 768 |
21 _FINDBUGS_PLUGIN_PATH = os.path.join( | 21 _FINDBUGS_PLUGIN_PATH = os.path.join( |
22 constants.DIR_SOURCE_ROOT, 'tools', 'android', 'findbugs_plugin', 'lib', | 22 constants.DIR_SOURCE_ROOT, 'tools', 'android', 'findbugs_plugin', 'lib', |
23 'chromiumPlugin.jar') | 23 'chromiumPlugin.jar') |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 _, raw_out, stderr = cmd_helper.GetCmdStatusOutputAndError(cmd) | 149 _, raw_out, stderr = cmd_helper.GetCmdStatusOutputAndError(cmd) |
150 results_doc = xml.dom.minidom.parseString(raw_out) | 150 results_doc = xml.dom.minidom.parseString(raw_out) |
151 | 151 |
152 for line in stderr.splitlines(): | 152 for line in stderr.splitlines(): |
153 logging.debug(' %s', line) | 153 logging.debug(' %s', line) |
154 | 154 |
155 current_warnings_set = _ParseXmlResults(results_doc) | 155 current_warnings_set = _ParseXmlResults(results_doc) |
156 | 156 |
157 return (' '.join(cmd), current_warnings_set) | 157 return (' '.join(cmd), current_warnings_set) |
158 | 158 |
OLD | NEW |