Skip to content
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

[7.4.0] Verify in tests that coverage supports --nobuild_runfile_links #23345

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/test/shell/bazel/bazel_coverage_cc_test_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ function test_cc_test_llvm_coverage_produces_lcov_report() {
setup_llvm_coverage_tools_for_lcov || return 0
setup_a_cc_lib_and_t_cc_test

bazel coverage --test_output=all //:t &>$TEST_log || fail "Coverage for //:t failed"
# Ensure that coverage succeeds even with lazily built runfiles trees for the
# merger tool.
bazel coverage --nobuild_runfile_links \
--test_output=all //:t &>$TEST_log || fail "Coverage for //:t failed"

local expected_result="SF:a.cc
FN:3,_Z1ab
Expand All @@ -163,7 +166,10 @@ function test_cc_test_llvm_coverage_produces_lcov_report_with_split_postprocessi
setup_llvm_coverage_tools_for_lcov || return 0
setup_a_cc_lib_and_t_cc_test

# Ensure that coverage succeeds even with lazily built runfiles trees for the
# merger tool.
bazel coverage \
--nobuild_runfile_links \
--experimental_split_coverage_postprocessing --experimental_fetch_all_coverage_outputs \
--test_env=VERBOSE_COVERAGE=1 --test_output=all //:t &>$TEST_log || fail "Coverage for //:t failed"

Expand Down
6 changes: 5 additions & 1 deletion src/test/shell/bazel/bazel_coverage_java_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ public class TestCollatz {
}
EOF

bazel coverage --test_output=all //:test --coverage_report_generator=@bazel_tools//tools/test:coverage_report_generator --combined_report=lcov &>$TEST_log \
# Ensure that coverage succeeds even with lazily built runfiles trees for the
# merger tool.
bazel coverage \
--nobuild_runfile_links \
--test_output=all //:test --coverage_report_generator=@bazel_tools//tools/test:coverage_report_generator --combined_report=lcov &>$TEST_log \
|| echo "Coverage for //:test failed"

local expected_result="SF:src/main/com/example/Collatz.java
Expand Down
Loading