test(apple): verify compiled Mach-O root occurrence facts (#1300)

test(artifacts): verify compiled Mach-O roles and permissions

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
This commit is contained in:
Ysopwnable
2026-10-09 15:24:53 +00:00
committed by GitHub
parent 411498d45f
commit 4bb4c6fe6d
2 changed files with 90 additions and 1 deletions
+4 -1
View File
@@ -16,6 +16,7 @@ import {
} from "../../fixtures/apple/macos-bundle.mjs";
import { verifyDyldEnvironment } from "./dyld-environment.mjs";
import { verifyDylibResolution } from "./macos-dylib-e2e.mjs";
import { verifyMachOOccurrences } from "./macho-occurrences.mjs";
const exec = promisify(execFile);
@@ -67,7 +68,8 @@ const EXPECTED_BUNDLES = [
let report;
try {
const { app } = await buildMacosBundleFixture(root);
const { app, executable } = await buildMacosBundleFixture(root);
const machoOccurrences = await verifyMachOOccurrences(app, executable);
const zip = join(root, "MacFixture.zip");
await exec("/usr/bin/ditto", ["-c", "-k", "--keepParent", app, zip]);
const staging = join(root, "dmg-source");
@@ -164,6 +166,7 @@ try {
containers: containers.map(({ format }) => format),
bundles: EXPECTED_BUNDLES.length,
dmg_detached: true,
macho_occurrences: machoOccurrences,
dylib_resolution: dylibs,
dyld_environment: dyldEnvironment,
};