Skip to content

Commit

Permalink
[CI] Fixup windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Apr 19, 2024
1 parent 05ff620 commit 26428d5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/bun-internal-test/src/runner.node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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,
Expand Down Expand Up @@ -298,7 +299,7 @@ Starting "${testFileName}"
});
});
} finally {
activeTests.delete(path);
activeTests.delete(testFileName);
}

if (!hasInitialMaxFD) {
Expand Down

0 comments on commit 26428d5

Please sign in to comment.