-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flag to declare coverage dir as tree artifact
This adds an experimental flag that changes the behavior of tests when run with coverage such that the _coverage directory is declared as a tree artifact. This makes it significantly easier to debug coverage runs when sandboxing (the default) or remote execution are enabled. Without this, the files are implicitly ignored, and only the coverage.dat file is brought back into the output tree. If for some reason the additional steps to generate the coverage.dat file fail, then that the file is empty or non-existent. This also provides a workaround for languages that cannot currently generate lcov format coverage data. By bringing back the individual files, the user can use a post-process to merge the data. It's not perfect, but it's simple and effective. I used it myself to debug a coverage issue due to incorrect file paths w/ gcc on MacOS. Unfortunately, the coverage collector script generates a number of temporary files in the _coverage directory which we generally do not want (or need) to bring back into the output tree. This will have to be addressed separately. PiperOrigin-RevId: 291940271
- Loading branch information
1 parent
e8d4824
commit e411fa7
Showing
4 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters