Repository navigation
test(apple): skip ibtool-compiled NIB tests when Xcode ibtool is unavailable - #2070
Conversation
…ailable Command Line Tools install the /usr/bin/ibtool and xcrun shims without ibtool itself, so the existing /usr/bin/ibtool existence guard never skipped the storyboard test, and the native NIB hierarchy suite had no guard. On a Command Line Tools-only macOS host these seven tests failed at fixture compilation. Probe xcrun --find ibtool once and use it for both suites.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
baron
left a comment
There was a problem hiding this comment.
Reviewed exact head e8068cc and current-main integration. No source/design blocker.
The shared fixture owns xcrun's actual Xcode ibtool resolution, rather than inferring availability from the installed shim. Both compiled-NIB consumers use it; distinct native fixture tests remain intact.
The earlier positive-Xcode verification hold is now satisfied: pinned Node 24.18.0/npm 11.16.0 current-main integration executed all seven specifically inspected repository-owned XIB/storyboard compile-and-static-decode cases: 7 passed, 0 selected skips/failures; 46 unrelated cases were excluded. All seven fixture directories were observed removed. Existing mocked available/unavailable/error/non-macOS controls also passed. No app/device/GUI/hdiutil/mount or target execution occurred. Current exact-head hosted CI is green; optional skipped jobs are not misrepresented as real-provider evidence.
…ailable (morluto#2070) Command Line Tools install the /usr/bin/ibtool and xcrun shims without ibtool itself, so the existing /usr/bin/ibtool existence guard never skipped the storyboard test, and the native NIB hierarchy suite had no guard. On a Command Line Tools-only macOS host these seven tests failed at fixture compilation. Probe xcrun --find ibtool once and use it for both suites.
Summary
On a macOS host with only Command Line Tools (no Xcode), seven Interface Builder boundary tests fail when they compile their fixtures, instead of being skipped:
tests/boundary/filesystem/nibNativeHierarchy.test.ts: all 6 tests in "native compiled NIB view hierarchy"tests/boundary/filesystem/interfaceBuilderBundle.test.ts: "decodes an Xcode-compiled storyboard NIB and recovers its UI routes"No linked issue: I found this running the suite locally on macOS 26.5.1 with Command Line Tools only.
Problem and expected behavior
Command Line Tools install
/usr/bin/ibtooland/usr/bin/xcrunas shims, but not ibtool itself:existsSync("/usr/bin/ibtool"). The shim always exists, so the test never skips.process.platform, even though testing documents that these archives are compiled with Xcodeibtool.On Command Line Tools-only hosts,
npm run test:boundarytherefore reports fixture compilation failures (Command failed: /usr/bin/xcrun ibtool --errors --warnings --compile …) rather than missing prerequisites.Change and scope
tests/fixtures/ibtool.tsrunsxcrun --find ibtoolonce and exportsxcodeIbtoolAvailable, which is also false off macOS. Both suites skip on it. Production code is unchanged.The
macos-15CI job, which selects these two files explicitly (ci.yml), has Xcode, so the tests still run there.Contract and boundary impact
xcrun --findprobe at test module load on the test hostEvidence and regression coverage
4573e8cwith Command Line Tools only, the seven tests fail atibtoolfixture compilation. With this change they are reported as skipped.macos-15CI job for this PRValidation performed
npx vitest run tests/boundary/filesystem/nibNativeHierarchy.test.ts tests/boundary/filesystem/interfaceBuilderBundle.test.ts: 46 passed, 7 skipped (previously 7 failed)npm run check:fast: passednpm run verify:test-discovery: "Discovered all 913 test files exactly once."npx oxfmt --checkon the changed files: cleanCompatibility, safety, and release
Review checklist
type(scope): outcome.