From: Johann-S Date: Fri, 29 Sep 2017 09:23:27 +0000 (+0200) Subject: Manage exceed maximum duration for our test X-Git-Tag: v4.0.0-beta.2~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=874fd5b952b6e75f643fb3f8abb473f76c68ef77;p=thirdparty%2Fbootstrap.git Manage exceed maximum duration for our test --- diff --git a/build/saucelabs-unit-test.js b/build/saucelabs-unit-test.js index 7607b6d948..09096b1468 100644 --- a/build/saucelabs-unit-test.js +++ b/build/saucelabs-unit-test.js @@ -34,17 +34,25 @@ const waitingCallback = (error, body, id) => { }) }, 2000) } else { - const test = body['js tests'][0] - let passed = false + const test = body['js tests'][0] + let passed = false + let errorStr = false if (test.result !== null) { - passed = test.result.total === test.result.passed + if (typeof test.result === 'string' && test.result === 'Test exceeded maximum duration') { + errorStr = test.result + } else { + passed = test.result.total === test.result.passed + } } console.log(`Tested ${testURL}`) console.log(`Platform: ${test.platform.join(',')}`) console.log(`Passed: ${passed.toString()}`) console.log(`Url ${test.url} \n`) + if (errorStr) { + console.error(errorStr) + } if (passed) { jobsSuccess++