mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
PR-URL: https://github.com/nodejs/node/pull/60412 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
25 lines
704 B
JavaScript
25 lines
704 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 assert 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');
|
|
assert.strictEqual(code, 0);
|