diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index b0f49f4c1..90a625463 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -91,7 +91,7 @@ tasks: - "@go_default_sdk//..." test_targets: - "//..." - macos_legacy: + macos_arm64: shell_commands: - tests/core/cgo/generate_imported_dylib.sh build_flags: diff --git a/go/tools/bazel_testing/bazel_testing.go b/go/tools/bazel_testing/bazel_testing.go index 30bc8f058..a414b40c9 100644 --- a/go/tools/bazel_testing/bazel_testing.go +++ b/go/tools/bazel_testing/bazel_testing.go @@ -179,7 +179,10 @@ func TestMain(m *testing.M, args Args) { // hide that this code is executing inside a bazel test. func BazelCmd(args ...string) *exec.Cmd { cmd := exec.Command("bazel") - cmd.Args = append(cmd.Args, "--nosystem_rc", "--nohome_rc") + // --nosystem_rc isn't used here because Bazel may need essential flags set in + // system rc to be able to work correctly + // See https://github.com/bazelbuild/rules_go/pull/3969#issuecomment-2220405416 + cmd.Args = append(cmd.Args, "--nohome_rc") cmd.Args = append(cmd.Args, args...) for _, e := range os.Environ() { // Filter environment variables set by the bazel test wrapper script.