From 26428d5e1c66c8d19c51d9abe6851719c685c3c8 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Thu, 18 Apr 2024 20:52:37 -0700 Subject: [PATCH] [CI] Fixup windows --- packages/bun-internal-test/src/runner.node.mjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/bun-internal-test/src/runner.node.mjs b/packages/bun-internal-test/src/runner.node.mjs index 860cf75bac779f..3aa23da6355298 100644 --- a/packages/bun-internal-test/src/runner.node.mjs +++ b/packages/bun-internal-test/src/runner.node.mjs @@ -205,14 +205,15 @@ function checkSlowTests() { setInterval(checkSlowTests, SHORT_TIMEOUT_DURATION).unref(); var currentTestNumber = 0; async function runTest(path) { + const pathOnDisk = resolve(path); const thisTestNumber = currentTestNumber++; - const testFileName = posix.normalize(relative(cwd, path)); + const testFileName = posix.normalize(relative(cwd, path).replaceAll("\\", "/")); let exitCode, signal, err, output; const start = Date.now(); const activeTestObject = { start, proc: undefined }; - activeTests.set(path, activeTestObject); + activeTests.set(testFileName, activeTestObject); try { await new Promise((finish, reject) => { @@ -227,7 +228,7 @@ Starting "${testFileName}" `, ); const TMPDIR = maketemp(); - const proc = spawn(bunExe, ["test", resolve(path)], { + const proc = spawn(bunExe, ["test", pathOnDisk], { stdio: ["ignore", "pipe", "pipe"], env: { ...process.env, @@ -298,7 +299,7 @@ Starting "${testFileName}" }); }); } finally { - activeTests.delete(path); + activeTests.delete(testFileName); } if (!hasInitialMaxFD) {