Skip to content

Commit

Permalink
Fix flakiness in //src/test/shell/bazel:starlark_repository_test
Browse files Browse the repository at this point in the history
Make sure repository cache is not used by adding --repository_cache= to bazelrc

https://buildkite.com/bazel/bazel-bazel/builds/26360#018d21bc-b66f-4f99-98af-de50fc10794f

Fixes #20790

PiperOrigin-RevId: 599872040
Change-Id: I8203d15a8826431f5eb4de9dc33894dc5be21936
  • Loading branch information
meteorcloudy authored and bazel-io committed Feb 12, 2024
1 parent f9acae2 commit dbc367a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/shell/bazel/starlark_repository_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ source "$(rlocation "io_bazel/src/test/shell/bazel/remote_helpers.sh")" \

mock_rules_java_to_avoid_downloading

# Make sure no repository cache is used in this test
add_to_bazelrc "build --repository_cache="

# Basic test.
function test_macro_local_repository() {
create_new_workspace
Expand Down Expand Up @@ -2329,7 +2332,8 @@ genrule(
)
EOF

bazel build --distdir="." --repository_disable_download //:it || fail "Failed to build"
# for some reason --repository_disable_download fails with bzlmod trying to download @platforms.
bazel build --distdir="." --repository_disable_download --noenable_bzlmod //:it || fail "Failed to build"
}

function test_disable_download_should_allow_local_repository() {
Expand Down

0 comments on commit dbc367a

Please sign in to comment.