Skip to content

Commit d98e1e4

Browse files
committed
Add coverage debugging
1 parent 28e6d65 commit d98e1e4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

infra/cifuzz/generate_coverage_report.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
"""Module for generating coverage reports."""
15+
import logging
1516
import os
1617

1718
import base_runner_utils
@@ -27,7 +28,15 @@ def run_coverage_command(config, workspace):
2728
env['CORPUS_DIR'] = workspace.corpora
2829
env['COVERAGE_OUTPUT_DIR'] = workspace.coverage_report
2930
command = 'coverage'
30-
return utils.execute(command, env=env)
31+
32+
stdout, stderr, return_code = utils.execute(command, env=env)
33+
if stdout:
34+
logging.info('coverage stdout:\n%s', stdout)
35+
if stderr:
36+
logging.info('coverage stderr:\n%s', stderr)
37+
if return_code:
38+
logging.error('coverage command exited with code %d.', return_code)
39+
return stdout, stderr, return_code
3140

3241

3342
def download_corpora(fuzz_target_paths, clusterfuzz_deployment):

0 commit comments

Comments
 (0)