From 63562ea219d8e57864f46ab8f3508d569e126130 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 3 Feb 2022 21:42:03 +0000 Subject: [PATCH] [Scripts > TestStartup] Remove as no longer used --- scripts/testStartup.js | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 scripts/testStartup.js diff --git a/scripts/testStartup.js b/scripts/testStartup.js deleted file mode 100644 index 44aa5e5..0000000 --- a/scripts/testStartup.js +++ /dev/null @@ -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(); \ No newline at end of file