[CI > Test] Log stderr and stdout in script
This commit is contained in:
parent
41bb80ae22
commit
a82b1adb02
1 changed files with 6 additions and 1 deletions
|
@ -1,16 +1,21 @@
|
|||
const { execFile } = require('child_process');
|
||||
|
||||
const test = () => {
|
||||
const proc = execFile(process.argv[2], ['--enable-logging']);
|
||||
const proc = execFile('xvfb-run', ['-e', '/dev/stdout', process.argv[2], '--enable-logging']);
|
||||
|
||||
let success = false;
|
||||
proc.stderr.on('data', (data) => {
|
||||
console.error(data.toString());
|
||||
if (data.toString().includes('FAST CONNECT')) { // Main window JS running, startup success
|
||||
success = true;
|
||||
proc.kill();
|
||||
}
|
||||
});
|
||||
|
||||
data.stdout.on('data', (data) => {
|
||||
console.log(data.toString();)
|
||||
})
|
||||
|
||||
proc.on('close', async () => {
|
||||
process.exit(success ? 0 : 1);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue