mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
remote_runner: Avoid re-sending the same console text over and over
This commit is contained in:
parent
25275f2744
commit
a7cd0a4b25
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,8 @@ 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()") || '').substring(logIndex);
|
||||
const remoteFn = ($, skipChars) => $('#console').text().substring(skipChars);
|
||||
const consoleText = await browser.eval(`(${remoteFn})($, ${JSON.stringify(logIndex)})`);
|
||||
(consoleText ? consoleText.split('\n') : []).forEach((line) => log(line, pfx));
|
||||
logIndex += consoleText.length;
|
||||
const [finished, nFailedStr] = consoleText.match(finishedRegex) || [];
|
||||
|
|
Loading…
Reference in a new issue