bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
511 stars 268 forks source link

Hosted macOS unit tests don't run when sandboxed #1404

Open keith opened 2 years ago

keith commented 2 years ago

With the attached sample project if you run bazel test app:hosted_test --test_output=streamed, the tests never complete. Adding --strategy=TestRunner=local, or setting tags = ["no-sandbox"] works around it. In the console logs I see error kernel <Missing Description> Sandbox: xcodebuild(72202) deny(1) job-creation, but adding (allow job-creation) to the sandbox definition here https://github.com/bazelbuild/bazel/blob/ad103c26890d53f5858b1601dcdd029430b20e94/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java#L340-L343 isn't actually enough. I can't find any sandbox definition that fixes this.

testsandbox.zip

keith commented 2 years ago

It's possible that this was new with some Xcode / macOS release, I'm currently on macOS 12.2.1 and Xcode 13.2.1