test: harden the native parity suites (60s budget, fail on missing tools on macOS) - #444
Merged
Conversation
…sign.spec Each case expands a ~100 MB package, which sits right on vitest's default 5s on the shared macOS runners; the payload comparison timed out at 5010ms on three unrelated PRs in a row. No-Verification-Needed: test-only change
They gated on the tools being present, so a macOS runner image without xar/pkgbuild/etc would silently skip the parity coverage and stay green. The tools ship with macOS, so gate on the platform and assert the tools inside; off macOS the suites still skip. No-Verification-Needed: test-only change
erickzhao
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things about the native parity suites, prompted by them failing on #441, #442 and #443 (none of which go near them).
pkg parity with a real Electron.app > produces a byte-identical uncompressed payloadtimed out at 5010ms on all three. Every case in that describe expands a ~100 MB package (xar + gunzip, orpkgutil --expand-full), so on the shared macOS runners it sits right on vitest's default 5s. The whole describe now gets the same 60s budgetsign.spec.tsalready uses for its real-app cases. The fixture based suite is fine as is, its slowest case is under half a second.Second, those suites were gated on
describe.runIf(hasNativeTools), so a macOS runner image that lostxarorpkgbuildwould skip the parity coverage and stay green (the(skipped)placeholder describes always passed). All of those tools ship with macOS, so the suites now gate on the platform andassertNativeTools()inside, which fails the file with the list of missing tools. Off macOS they still skip, so the Linux job is unaffected (checked by forcingisDarwinto false: 2 files skipped, exit 0, no "no test suite" complaints; and with the tools stripped fromPATHthe file fails withMissing native packaging tool(s) on this macOS host: pkgbuild, productbuild, lsbom, xar, pkgutil). Same treatment for thepkgutilbranch inflat.spec.ts. #442 adds one morehasNativeToolsgate toflat.spec.ts, I'll switch it to this helper once this lands.