File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,22 @@ bazel coverage "${args[@]}" --test_tag_filters=-integration-test ...
5454
5555GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS=" instance"
5656mapfile -t integration_args < <( integration::bazel_args)
57+ # With code coverage the `--flaky_test_attempts` flag works in unexpected ways.
58+ # A flake produces an empty `coverage.dat` file, which breaks the build when
59+ # trying to consolidate all the `coverage.dat` files.
60+ #
61+ # This combination of a "successful" test (because the flake is retried) and a
62+ # failure in the consolidation of coverage results, which happens much later
63+ # in the build, easily leads the developer astray.
64+ i=0
65+ for arg in " ${integration_args[@]} " ; do
66+ case " ${arg} " in
67+ --flaky_test_attempts=* )
68+ unset " integration_args[$i ]"
69+ ;;
70+ esac
71+ i=$(( ++ i))
72+ done
5773integration::bazel_with_emulators coverage " ${args[@]} " " ${integration_args[@]} "
5874
5975# Where does this token come from? For triggered ci/pr builds GCB will securely
You can’t perform that action at this time.
0 commit comments