remote_runner: Avoid searching the full text for "FINISHED"
parent
3409e3f5e6
commit
a17556b876
|
@ -50,9 +50,9 @@ const sauceTestWorker = async.queue(async ({name, pfx, testSettings}) => {
|
|||
// how many characters of the log have been sent to travis
|
||||
let logIndex = 0;
|
||||
while (true) {
|
||||
const consoleText = await browser.eval("$('#console').text()") || '';
|
||||
consoleText.substring(logIndex).split('\n').forEach((line) => log(line, pfx));
|
||||
logIndex = consoleText.length;
|
||||
const consoleText = (await browser.eval("$('#console').text()") || '').substring(logIndex);
|
||||
consoleText.split('\n').forEach((line) => log(line, pfx));
|
||||
logIndex += consoleText.length;
|
||||
const [finished, nFailedStr] = consoleText.match(finishedRegex) || [];
|
||||
if (finished) {
|
||||
if (nFailedStr !== '0') process.exitCode = 1;
|
||||
|
|
Loading…
Reference in New Issue