bazelbuild / bazelbuild/bazel

Need to be able to capture coverage for subprocess

Open
#25,224 2 comments 0 reactions 0 assignees View on GitHub
type: support / not a bug (process)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the feature request:

We have two cases that currently appear to be gaps in bazel coverage:

1) c++ test cases that make system calls to invoke c++ binaries
2) junit test cases that make network calls to previously started c++ binaries

In both cases we would like the coverage of the c++ binary to be captured as part of the data of the test itself.

Both test cases and c++ binaries are built with bazel within a single repo and c++ binaries are data dependencies of their respective test.

Is this possible, now or with some modifications?

Thanks!

### Which category does this issue belong to?

Core

### What underlying problem are you trying to solve with this feature?

_No response_

### Which operating system are you running Bazel on?

linux

### What is the output of `bazel info release`?

8.0.1

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

```text

```

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by reading Bazel's coverage behavior for C++ binaries used as data dependencies by C++ system-call tests and JUnit network-call tests on Linux. Done means determining whether subprocess coverage can be included in the invoking test's coverage data, or documenting the required Bazel changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, java, linux
Domain
build-system, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.