Skip to content

Fix bugs with macOS test runner #2754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged

Conversation

luispadron
Copy link
Contributor

Fixes two major issues with the macos_unit_test runner

  • Tests were always passing because:
xcodebuild <...> 2>&1 | tee -i "$testlog" \
    || test_exit_code=$?

Without pipefail means the exit code of the xcodebuild command is dropped. This meant as of #2649 all macos_unit_test were always passing even when tests failed 🙈

  • Warning when running xcodebuild:
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64e, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64e, variant:Mac Catalyst, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64, variant:Mac Catalyst, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64e, variant:DriverKit, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64, variant:DriverKit, id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64e, variant:Designed for [iPad,iPhone], id:00006031-001851843684001C, name:My Mac }
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006031-001851843684001C, name:My Mac }

The fix here is to specify variant=macos and arch so that xcodebuild always picks the right destination.

@luispadron luispadron enabled auto-merge (squash) July 21, 2025 19:55
@adincebic
Copy link
Contributor

Thanks @luispadron

@luispadron luispadron merged commit 724e402 into master Jul 21, 2025
11 checks passed
@luispadron luispadron deleted the luis/fix-macos-test-runner-issues branch July 21, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants