test: dump Electron process PID to path if environment variable set (#45494)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
parent
20941efeb5
commit
637313c2f3
1 changed files with 3 additions and 0 deletions
|
@ -164,6 +164,9 @@ async function asyncSpawn (exe, runnerArgs) {
|
||||||
const child = childProcess.spawn(exe, runnerArgs, {
|
const child = childProcess.spawn(exe, runnerArgs, {
|
||||||
cwd: path.resolve(__dirname, '../..')
|
cwd: path.resolve(__dirname, '../..')
|
||||||
});
|
});
|
||||||
|
if (process.env.ELECTRON_TEST_PID_DUMP_PATH && child.pid) {
|
||||||
|
fs.writeFileSync(process.env.ELECTRON_TEST_PID_DUMP_PATH, child.pid.toString());
|
||||||
|
}
|
||||||
child.stdout.pipe(process.stdout);
|
child.stdout.pipe(process.stdout);
|
||||||
child.stderr.pipe(process.stderr);
|
child.stderr.pipe(process.stderr);
|
||||||
if (process.env.ELECTRON_FORCE_TEST_SUITE_EXIT) {
|
if (process.env.ELECTRON_FORCE_TEST_SUITE_EXIT) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue