mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: use process.env.PYTHON to spawn python
Co-authored-by: Jérémy Lal <kapouer@melix.org> Fixes: https://github.com/nodejs/node/issues/34699 PR-URL: https://github.com/nodejs/node/pull/34700 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
This commit is contained in:
1 parent
f29ab4092f
commit
9cde4eb73a
2 files changed
+4
-2
No files matched your search
@@ -25,8 +25,9 @@ const assert = require('assert');
|
||||
const ch = require('child_process');
|
||||
|
||||
const SIZE = 100000;
|
||||
const python = process.env.PYTHON || 'python';
|
||||
|
||||
const cp = ch.spawn('python', ['-c', `print(${SIZE} * "C")`], {
|
||||
const cp = ch.spawn(python, ['-c', `print(${SIZE} * "C")`], {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
|
||||
@@ -24,13 +24,14 @@ const common = require('../common');
|
||||
const assert = require('assert');
|
||||
|
||||
const spawn = require('child_process').spawn;
|
||||
const python = process.env.PYTHON || 'python';
|
||||
|
||||
const SIZE = 1000 * 1024;
|
||||
const N = 40;
|
||||
let finished = false;
|
||||
|
||||
function doSpawn(i) {
|
||||
const child = spawn('python', ['-c', `print(${SIZE} * "C")`]);
|
||||
const child = spawn(python, ['-c', `print(${SIZE} * "C")`]);
|
||||
let count = 0;
|
||||
|
||||
child.stdout.setEncoding('ascii');
|
||||
|
||||
Reference in new issue
Block a user