Make parallel run-tests compatible with IO capture tests

Inherit the main stdin/stdout/stderr streams into the worker processes.
We don't talk to workers via these pipes, so there shouldn't be a
problem doing this.
This commit is contained in:
Nikita Popov 2019-02-18 15:36:39 +01:00
parent 5cde3afda7
commit fa915614fe

View File

@ -391,7 +391,6 @@ NO_PROC_OPEN_ERROR;
error("'$workers' is not a valid number of workers, try e.g. -j16 for 16 workers"); error("'$workers' is not a valid number of workers, try e.g. -j16 for 16 workers");
} }
$workers = intval($workers, 10); $workers = intval($workers, 10);
$environment['SKIP_IO_CAPTURE_TESTS'] = 1;
break; break;
case 'r': case 'r':
case 'l': case 'l':
@ -1434,11 +1433,7 @@ NAME_AND_SHAME;
for ($i = 1; $i <= $workers; $i++) { for ($i = 1; $i <= $workers; $i++) {
$proc = proc_open( $proc = proc_open(
$thisPHP . ' ' . escapeshellarg($thisScript), $thisPHP . ' ' . escapeshellarg($thisScript),
[ [], // Inherit our stdin, stdout and stderr
0 => ['pipe', 'r'],
1 => ['pipe', 'w'],
2 => ['pipe', 'w']
],
$pipes, $pipes,
NULL, NULL,
$_ENV + [ $_ENV + [