-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
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
Empty code coverage collection for llvm lit test #18833
Comments
Hi @yyyokata, Could you please help us with minimal steps to reproduce the issue with sample code. It will help us to narrow down the issue. Thanks! |
With your "workaround", do you get coverage data? Does this happen with any |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post |
Description of the bug:
While i'm trying to test a llvm/mlir based repo with lit test configured as below:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/glob_lit_test.bzl
CMD:bazel coverage //workspace/... --action_env=COVERAGE_GCOV_OPTIONS=-b --instrumentation_filter=/workspace[/:] --combined_report=lcov
All coverage.dat for lit tests are empty.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Ubuntu 20.04
What is the output of
bazel info release
?release 5.3.1
If
bazel info release
returnsdevelopment 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 master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
My walkaround:
Since lit test is a wrap of py_test, I tried the walkaround mentioned in #15098, but changed collect_cc_coverage.sh a few:
After link bazel-out to gcov path, coverage for single test can be generated properly.
For multi-test, it seems like there is still another issue, in https://github.com/bazelbuild/bazel/blob/master/tools/test/collect_cc_coverage.sh#L151, gcov will generate json/gcov files under CMD's current directory, which is shared by all tests but not under their own runfile path, the logic below raises a bad file move under gcov 9:
So I changed this part to code below and no more error raised.
The text was updated successfully, but these errors were encountered: