mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
It previously re-einvented the pattern matching that's already supported by test.py, and was running the tests one by one, which can lead to time out on slower machines. This move it to sequential and use wildcard support in test.py to correctly parallelize the tests. PR-URL: https://github.com/nodejs/node/pull/60273 Fixes: https://github.com/nodejs/node/issues/60268 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
25 lines
706 B
JavaScript
25 lines
706 B
JavaScript
import { isWindows } from '../common/index.mjs';
|
|
import { spawn } from 'node:child_process';
|
|
import { once } from 'node:events';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { strictEqual } from 'node:assert';
|
|
|
|
const python = process.env.PYTHON || (isWindows ? 'python' : 'python3');
|
|
|
|
const testRunner = fileURLToPath(
|
|
new URL('../../tools/test.py', import.meta.url)
|
|
);
|
|
|
|
const proc = spawn(python, [
|
|
testRunner,
|
|
`--mode=${process.features.debug ? 'debug' : 'release'}`,
|
|
`--shell=${process.execPath}`,
|
|
'--node-args=--no-async-context-frame',
|
|
'*/test-async-local-storage-*',
|
|
], {
|
|
stdio: ['inherit', 'inherit', 'inherit'],
|
|
});
|
|
|
|
const [code] = await once(proc, 'exit');
|
|
strictEqual(code, 0);
|