From 7a623fe3e8eddddbc5dedbdd2b0f465eed2b8ddd Mon Sep 17 00:00:00 2001 From: Kai Tamkun Date: Thu, 21 Nov 2024 12:15:49 -0800 Subject: [PATCH] Print compilation progress in node-napi.test.ts --- test/napi/node-napi.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/napi/node-napi.test.ts b/test/napi/node-napi.test.ts index f1695f94b6..165b1d4065 100644 --- a/test/napi/node-napi.test.ts +++ b/test/napi/node-napi.test.ts @@ -70,7 +70,10 @@ beforeAll(async () => { .map(t => dirname(t)); const uniqueDirectories = Array.from(new Set(directories)); + const start = Date.now(); + async function buildOne(dir: string) { + console.log(`Building in ${dir.replace(/.+node-napi-tests.test./, "")}.`, (Date.now() - start) / 1000, "s elapsed"); const child = spawn({ cmd: [bunExe(), "x", "node-gyp", "rebuild", "--debug"], cwd: dir, @@ -101,7 +104,7 @@ beforeAll(async () => { } } - const parallelism = Math.min(8, os.cpus().length); + const parallelism = Math.min(8, os.cpus().length, 1 /* TODO(@heimskr): remove */); const jobs = []; for (let i = 0; i < parallelism; i++) { jobs.push(worker()); @@ -129,7 +132,7 @@ describe.each([ expect(result.success).toBeTrue(); expect(result.exitCode).toBe(0); }, - 20000, // timeout + 60000, // timeout ); }); });