mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-03 14:37:56 +00:00
test(ci): increase smoke test timeout and fix WebKitGTK hang in xvfb
This commit is contained in:
@@ -17,6 +17,12 @@ const executable = path.resolve(executableArg);
|
|||||||
const child = spawn(executable, [], {
|
const child = spawn(executable, [], {
|
||||||
cwd: process.env.RUNNER_TEMP || process.env.TMPDIR || process.cwd(),
|
cwd: process.env.RUNNER_TEMP || process.env.TMPDIR || process.cwd(),
|
||||||
detached: process.platform !== 'win32',
|
detached: process.platform !== 'win32',
|
||||||
|
env: {
|
||||||
|
...process.env,
|
||||||
|
FIRELINK_SMOKE_TEST: '1',
|
||||||
|
WEBKIT_DISABLE_COMPOSITING_MODE: '1',
|
||||||
|
GDK_BACKEND: 'x11'
|
||||||
|
},
|
||||||
stdio: ['ignore', 'pipe', 'pipe']
|
stdio: ['ignore', 'pipe', 'pipe']
|
||||||
});
|
});
|
||||||
let stderr = '';
|
let stderr = '';
|
||||||
@@ -24,12 +30,17 @@ let spawnError = null;
|
|||||||
child.on('error', error => {
|
child.on('error', error => {
|
||||||
spawnError = error;
|
spawnError = error;
|
||||||
});
|
});
|
||||||
|
child.on('exit', (code, signal) => {
|
||||||
|
if (readyPort === null) {
|
||||||
|
console.error(`Child exited prematurely with code ${code} signal ${signal}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
child.stderr.on('data', data => {
|
child.stderr.on('data', data => {
|
||||||
stderr += data.toString();
|
stderr += data.toString();
|
||||||
});
|
});
|
||||||
|
|
||||||
let readyPort = null;
|
let readyPort = null;
|
||||||
for (let attempt = 0; attempt < 40 && readyPort === null; attempt += 1) {
|
for (let attempt = 0; attempt < 200 && readyPort === null; attempt += 1) {
|
||||||
for (let port = 6412; port <= 6422; port += 1) {
|
for (let port = 6412; port <= 6422; port += 1) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`http://127.0.0.1:${port}/ping`);
|
const response = await fetch(`http://127.0.0.1:${port}/ping`);
|
||||||
|
|||||||
Reference in New Issue
Block a user