From 8c9de84f3d08e0816863593a9430dc6a2d77fd0f Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Thu, 18 Jul 2024 16:08:43 +0200 Subject: [PATCH 1/3] Migrate to macos_arm64 --- .bazelci/presubmit.yml | 2 +- go/tools/bazel_testing/bazel_testing.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..c0e75cbd2 100644 --- a/go/tools/bazel_testing/bazel_testing.go +++ b/go/tools/bazel_testing/bazel_testing.go @@ -179,7 +179,7 @@ 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") + 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. From be4d879dc2e9cc1accf8e0a06d55a37bae646897 Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Thu, 18 Jul 2024 18:11:44 +0200 Subject: [PATCH 2/3] Add comment --- go/tools/bazel_testing/bazel_testing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/tools/bazel_testing/bazel_testing.go b/go/tools/bazel_testing/bazel_testing.go index c0e75cbd2..afaeed91a 100644 --- a/go/tools/bazel_testing/bazel_testing.go +++ b/go/tools/bazel_testing/bazel_testing.go @@ -179,6 +179,9 @@ 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") + // --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() { From 28030f4154ecaa0f7d3805d8ef3a344f57d54f7d Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Thu, 18 Jul 2024 18:17:24 +0200 Subject: [PATCH 3/3] Update bazel_testing.go --- go/tools/bazel_testing/bazel_testing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/tools/bazel_testing/bazel_testing.go b/go/tools/bazel_testing/bazel_testing.go index afaeed91a..a414b40c9 100644 --- a/go/tools/bazel_testing/bazel_testing.go +++ b/go/tools/bazel_testing/bazel_testing.go @@ -179,9 +179,9 @@ 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") - // --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 + // --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() {