8
9
it.each([
10
{ platform: "freebsd", hostArch: "x64", arch: 1, reason: "unsupported target freebsd" },
11
- { platform: "linux", hostArch: "arm64", arch: 3, reason: "unsupported Linux architecture arm64" },
11
+ { platform: "linux", hostArch: "x64", arch: 3, reason: "unexecutable target linux/arm64" },
12
+ { platform: "linux", hostArch: "arm64", arch: 1, reason: "unexecutable target linux/x64" },
13
])(
14
"skips unsupported $platform/$hostArch cache generation",
15
async ({ platform, hostArch, arch, reason }) => {
37
{
38
platform: "darwin",
39
hostArch: "arm64",
40
+ arch: 1,
41
resources: "Fixture.app/Contents/Resources",
42
executable: "Fixture.app/Contents/MacOS/Fixture",
43
},
42
- { platform: "linux", hostArch: "x64", resources: "resources", executable: "fixture" },
43
-])("prepares $platform x64 cache", async ({ platform, hostArch, ...layout }) => {
44
+ { platform: "linux", hostArch: "x64", arch: 1, resources: "resources", executable: "fixture" },
45
+ { platform: "linux", hostArch: "arm64", arch: 3, resources: "resources", executable: "fixture" },
46
+])("prepares $platform/$hostArch cache", async ({ platform, hostArch, arch, ...layout }) => {
47
const { spawnSync } = await import("node:child_process");
48
const root = NodeFS.realpathSync(
49
NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-hook-cache-")),
79
Object.defineProperty(process, "platform", { value: ${JSON.stringify(platform)} });
80
Object.defineProperty(process, "arch", { value: ${JSON.stringify(hostArch)} });
81
require(${JSON.stringify(hook)})({
79
- appOutDir: ${JSON.stringify(root)}, electronPlatformName: ${JSON.stringify(platform)}, arch: 1,
82
+ appOutDir: ${JSON.stringify(root)}, electronPlatformName: ${JSON.stringify(platform)}, arch: ${arch},
83
packager: { appInfo: { productFilename: "Fixture" }, executableName: "fixture" }
84
}).catch(error => { console.error(error); process.exitCode = 1; });
85
`,