We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The coverage.dat file produced on macOS contains entries for system headers in /Applications.
BUILD file:
cc_test( name = "test", srcs = ["test.cc"], deps = [":lib"], ) cc_library( name = "lib", srcs = ["lib.cc"], hdrs = ["lib.h"], )
lib.h:
extern void Function();
lib.cc:
#include "lib.h" #include <iostream> void Function() { std::cout << "hello world" << std::endl; }
test.cc:
#include "lib.h" int main() { Function(); }
Then, run
bazel --nohome_rc --nosystem_rc --noworkspace_rc --bazelrc=/dev/null coverage \ --test_env=VERBOSE_COVERAGE=1 --test_env=GCOV_PREFIX_STRIP=10 \ --test_output=all --nocache_test_results //:test
The GCOV_PREFIX_STRIP is for #10457.
The resulting coverage file will contain lots of data for C++ standard headers residing in the /Applications directory. Probably that directory can simply be added to https://github.com/bazelbuild/bazel/blob/5.0.0/tools/test/collect_coverage.sh#L232, because it's very unlikely that someone will have a Bazel workspace in /Applications.
macOS 12.2.1
bazel info release
release 5.0.0-homebrew
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
Nothing (not in a Git repository)
#10457 is somewhat related (albeit a bit pessimistic; coverage on macOS does work in general), but doesn't seem to touch on this specific bug.
logs.zip
The text was updated successfully, but these errors were encountered:
71747cc
@bazel-io fork 5.1
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Description of the problem / feature request:
The coverage.dat file produced on macOS contains entries for system headers in /Applications.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD file:
lib.h:
lib.cc:
test.cc:
Then, run
The GCOV_PREFIX_STRIP is for #10457.
The resulting coverage file will contain lots of data for C++ standard headers residing in the /Applications directory.
Probably that directory can simply be added to https://github.com/bazelbuild/bazel/blob/5.0.0/tools/test/collect_coverage.sh#L232, because it's very unlikely that someone will have a Bazel workspace in /Applications.
What operating system are you running Bazel on?
macOS 12.2.1
What's the output of
bazel info release
?release 5.0.0-homebrew
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Nothing (not in a Git repository)
Have you found anything relevant by searching the web?
#10457 is somewhat related (albeit a bit pessimistic; coverage on macOS does work in general), but doesn't seem to touch on this specific bug.
Any other information, logs, or outputs that you want to share?
logs.zip
The text was updated successfully, but these errors were encountered: