[Scripts > TestStartup] Remove as no longer used
This commit is contained in:
parent
2bc195b479
commit
63562ea219
|
@ -1,35 +0,0 @@
|
||||||
const { execFile } = require('child_process');
|
|
||||||
|
|
||||||
const test = () => {
|
|
||||||
console.log('running...');
|
|
||||||
const proc = execFile('xvfb-run', [process.argv[2], '--enable-logging']);
|
|
||||||
|
|
||||||
let success = false;
|
|
||||||
let anyOutput = false;
|
|
||||||
proc.stderr.on('data', (data) => {
|
|
||||||
console.error('stderr', data.toString());
|
|
||||||
});
|
|
||||||
|
|
||||||
proc.stdout.on('data', (data) => {
|
|
||||||
anyOutput = true;
|
|
||||||
console.log('stdout', data.toString());
|
|
||||||
if (data.toString().includes('Installing discord_rpc')) {
|
|
||||||
success = true;
|
|
||||||
setTimeout(() => proc.kill(), 1000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
proc.on('close', async () => {
|
|
||||||
if (!anyOutput) return;
|
|
||||||
process.exit(success ? 0 : 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
if (anyOutput) return;
|
|
||||||
console.log('detected no output in 5s, retrying...');
|
|
||||||
proc.kill();
|
|
||||||
test();
|
|
||||||
}, 5000);
|
|
||||||
};
|
|
||||||
|
|
||||||
test();
|
|
Loading…
Reference in New Issue