commit | fc08f554381472df96bbb8c83453b4a9c8b0ca13 | [log] [tgz] |
---|---|---|
author | Krzysztof Naglik <krzysztofnaglik96@gmail.com> | Tue Nov 08 17:50:36 2022 +0100 |
committer | GitHub <noreply@github.com> | Tue Nov 08 11:50:36 2022 -0500 |
tree | ebffad7c92ee98215e5c76f87b80ceedb3e98481 | |
parent | ece17d5d4e74d67dd869cbd1951ca1001423b472 [diff] |
Fix identical gcov json file name problem (#16672) **The problem:** Bazel moves all `.gcov.json.gz` files to one directory. If in a test target, two source files have identical names, then the second `.gcov.json.gz` overwrites the first one. **The solution:** I added `gcno_path` to the move destination in order to distinguish multiple `.gcov.json.gz` with the same name. **Testing:** In the `test_cc_test_coverage_gcov` test case I added the `different/a.cc` source file, so currently we have the following source tree: ``` coverage_srcs/a.h coverage_srcs/a.cc coverage_srcs/b.h coverage_srcs/t.cc coverage_srcs/different/a.h coverage_srcs/different/a.cc ``` gcda and gcno files are created next to the source files. The final `gcov.json` files are placed in the corresponding paths: ``` $COVERAGE_DIR_VAR/coverage_srcs/*a.gcov.json.gz $COVERAGE_DIR_VAR/coverage_srcs/*t.gcov.json.gz $COVERAGE_DIR_VAR/coverage_srcs/different/*a.gcov.json.gz ``` Closes #16527. PiperOrigin-RevId: 483911427 Change-Id: I1608407e4b7264fb5fd436997bdc344344932b97
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md