Skip to content

Commit 33e7df2

Browse files
Christian Schmittelchristian-wr
authored andcommitted
fix(test): run the WGC smoke tests against the host's own helper
The helper path was pinned to `win32-x64`, so on an ARM64 host every smoke test launched the x64 binary under emulation — a binary that machine never ships. Its failures read as arm64 capture bugs: `test:wgc-mic:win` and the plain capture test both died on "Helper never acknowledged the stop command", which is exactly what a real arm64 capture regression would look like. With the arch resolved the same way the build scripts resolve it, all four pass against the arm64 helper: microphone (AAC written, device selected), webcam, system audio and the two mixed. The two system-audio tests need sound actually playing on the machine — with a silent host the loopback capture has nothing to record and the output collapses to ~1s, which is a property of the test, not of the helper.
1 parent 9c8725e commit 33e7df2

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎scripts/test-windows-wgc-helper.mjs‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@ import fs from "node:fs";
44
import os from "node:os";
55
import path from "node:path";
66
import { fileURLToPath } from "node:url";
7+
import { resolveTargetArch, winBinDirName } from "./windows-helper-arch.mjs";
78

89
const __dirname = path.dirname(fileURLToPath(import.meta.url));
910
const ROOT = path.join(__dirname, "..");
11+
// The arch-tagged directory, not a fixed `win32-x64`. On an ARM64 host the hard-coded
12+
// path silently ran the x64 helper under emulation, so every smoke test reported on a
13+
// binary nobody ships to that machine — and its failures looked like arm64 capture bugs.
1014
const HELPER_PATH =
1115
process.env.OPENSCREEN_WGC_CAPTURE_EXE ??
12-
path.join(ROOT, "electron", "native", "bin", "win32-x64", "wgc-capture.exe");
16+
path.join(
17+
ROOT,
18+
"electron",
19+
"native",
20+
"bin",
21+
winBinDirName(resolveTargetArch({ envArch: process.env.OPENSCREEN_WIN_HELPER_ARCH, hostArch: process.arch })),
22+
"wgc-capture.exe",
23+
);
1324

1425
const DURATION_MS = Number(process.env.OPENSCREEN_WGC_TEST_DURATION_MS ?? 5000);
1526
const WITH_SYSTEM_AUDIO =

0 commit comments

Comments
 (0)