diff --git a/test/gstack-brain-context-load.test.ts b/test/gstack-brain-context-load.test.ts index b601cd798..5b9337fd8 100644 --- a/test/gstack-brain-context-load.test.ts +++ b/test/gstack-brain-context-load.test.ts @@ -363,7 +363,25 @@ gbrain: const dir = mkdtempSync(join(tmpdir(), "gstack-bcl-")); const binDir = join(dir, "bin"); mkdirSync(binDir); - writeFakeGbrain(binDir); + // A SLOW fake, not the shared instant one: on a fast CI runner the + // instant fake answered inside even a 1ms budget (observed dur=0ms on + // ubicloud) and no SKIP ever printed. Sleeping makes the timeout + // deterministic on every machine; --version stays instant so detection + // has nothing to wait on. + const fakeBin = join(binDir, "gbrain"); + writeFileSync( + fakeBin, + `#!/bin/sh +if [ "$1" = "--version" ]; then + echo "gbrain 0.test" +else + sleep 0.3 + echo "fake gbrain $*" +fi +`, + "utf-8", + ); + chmodSync(fakeBin, 0o755); try { const env = { ...prependPath(binDir), GSTACK_BRAIN_TIMEOUT_MS: "1" }; diff --git a/test/migrations-v1.65.0.0.test.ts b/test/migrations-v1.65.0.0.test.ts index 3be29185e..554120513 100644 --- a/test/migrations-v1.65.0.0.test.ts +++ b/test/migrations-v1.65.0.0.test.ts @@ -109,6 +109,13 @@ beforeEach(() => { pwCache = path.join(tmpHome, 'pw-cache', 'ms-playwright'); fs.mkdirSync(pwCache, { recursive: true }); fs.mkdirSync(path.join(tmpHome, '.gstack'), { recursive: true }); + // The migration gates on `uname -s` = Darwin; on the Linux CI runner the + // real uname made every test early-exit with empty output. Shim Darwin so + // the Darwin-path tests run everywhere; the non-Darwin test overwrites + // this shim with its own Linux uname. + fs.writeFileSync(path.join(fakeBinDir, 'uname'), '#!/bin/bash\necho Darwin\n', { + mode: 0o755, + }); }); afterEach(() => {