Skip to content

Commit 235ef28

Browse files
committed
all: fix integration test on macOS
Newer protobuf versions won't build on macOS unless you pass --macos_minimum_os=(something recentish) to bazel. Change-Id: I9e8f47eae708023400e15e5ca43d79caf2f62825 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/569355 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]>
1 parent fe89159 commit 235ef28

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

integration_test.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,24 @@ func mustInitDeps(t *testing.T) {
283283
// the conformance test runner.
284284
fmt.Printf("build %v\n", filepath.Base(protobufPath))
285285
env := os.Environ()
286+
args := []string{
287+
"bazel", "build",
288+
":protoc",
289+
"//conformance:conformance_test_runner",
290+
}
286291
if runtime.GOOS == "darwin" {
287292
// Adding this environment variable appears to be necessary for macOS builds.
288293
env = append(env, "CC=clang")
294+
// And this flag.
295+
args = append(args,
296+
"--macos_minimum_os=13.0",
297+
"--host_macos_minimum_os=13.0",
298+
)
289299
}
290300
command{
291301
Dir: protobufPath,
292302
Env: env,
293-
}.mustRun(t, "bazel", "build", ":protoc", "//conformance:conformance_test_runner")
303+
}.mustRun(t, args...)
294304
}
295305
}
296306
check(os.Setenv("PROTOBUF_ROOT", protobufPath)) // for generate-protos

0 commit comments

Comments
 (0)