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

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

Issue 1258303003: [Android] Suppress findbugs stderr output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + reenable findbugs_verbose on GN Created 5 years, 4 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
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 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
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 cmd.extend(['-onlyAnalyze', classes_to_analyze]) 135 cmd.extend(['-onlyAnalyze', classes_to_analyze])
136 if exclude: 136 if exclude:
137 cmd.extend(['-exclude', os.path.abspath(exclude)]) 137 cmd.extend(['-exclude', os.path.abspath(exclude)])
138 if output_file: 138 if output_file:
139 cmd.extend(['-output', output_file]) 139 cmd.extend(['-output', output_file])
140 if findbug_args: 140 if findbug_args:
141 cmd.extend(findbug_args) 141 cmd.extend(findbug_args)
142 cmd.extend(os.path.abspath(j) for j in jars or []) 142 cmd.extend(os.path.abspath(j) for j in jars or [])
143 143
144 if output_file: 144 if output_file:
145 cmd_helper.RunCmd(cmd) 145 _, _, stderr = cmd_helper.GetCmdStatusOutputAndError(cmd)
146
146 results_doc = xml.dom.minidom.parse(output_file) 147 results_doc = xml.dom.minidom.parse(output_file)
147 else: 148 else:
148 raw_out = cmd_helper.GetCmdOutput(cmd) 149 _, raw_out, stderr = cmd_helper.GetCmdStatusOutputAndError(cmd)
149 results_doc = xml.dom.minidom.parseString(raw_out) 150 results_doc = xml.dom.minidom.parseString(raw_out)
150 151
152 for line in stderr.splitlines():
153 logging.debug(' %s', line)
154
151 current_warnings_set = _ParseXmlResults(results_doc) 155 current_warnings_set = _ParseXmlResults(results_doc)
152 156
153 return (' '.join(cmd), current_warnings_set) 157 return (' '.join(cmd), current_warnings_set)
154 158
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698