From 3409e3f5e6b80969190b002610e9d3e6bdbf972c Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 2 May 2021 21:36:32 -0400 Subject: [PATCH] remote_runner: Prevent Sauce errors from interrupting other tests --- src/tests/frontend/travis/remote_runner.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/tests/frontend/travis/remote_runner.js b/src/tests/frontend/travis/remote_runner.js index bbb41addb..047095a19 100644 --- a/src/tests/frontend/travis/remote_runner.js +++ b/src/tests/frontend/travis/remote_runner.js @@ -30,9 +30,7 @@ const log = (msg, pfx = '') => { const finishedRegex = /FINISHED.*[0-9]+ tests passed, ([0-9]+) tests failed/; -const sauceTestWorker = async.queue(async (testSettings) => { - const name = `${testSettings.browserName} ${testSettings.version}, ${testSettings.platform}`; - const pfx = `[${name}] `; +const sauceTestWorker = async.queue(async ({name, pfx, testSettings}) => { const fullName = [process.env.GIT_HASH].concat(process.env.SAUCE_NAME || [], name).join(' - '); testSettings.name = fullName; testSettings.public = true; @@ -100,4 +98,13 @@ Promise.all([ version: '78.0', }, ]), -].map(async (task) => await sauceTestWorker.push(task))); +].map(async (testSettings) => { + const name = `${testSettings.browserName} ${testSettings.version}, ${testSettings.platform}`; + const pfx = `[${name}] `; + try { + await sauceTestWorker.push({name, pfx, testSettings}); + } catch (err) { + log(`[red]FAILED[clear] ${err.stack || err}`, pfx); + process.exitCode = 1; + } +}));