Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2018-04-19 10:27:49 +0300
committerJohann-S <johann.servoire@gmail.com>2018-04-19 16:19:34 +0300
commitee382915be4f98e90029b5776ff4cbe1c0126f37 (patch)
tree9a404547904a6aedfc7994c4e87f2eeae2c88b43 /build
parent1470e11ade5b1fd4f494269b7b55224e07248f5d (diff)
detect test exceeded maximum duration on Sauce Labs
Diffstat (limited to 'build')
-rw-r--r--build/saucelabs-unit-test.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/build/saucelabs-unit-test.js b/build/saucelabs-unit-test.js
index 5a0142e033..b4d952536d 100644
--- a/build/saucelabs-unit-test.js
+++ b/build/saucelabs-unit-test.js
@@ -25,6 +25,10 @@ const jsUnitSaucelabs = new JSUnitSaucelabs({
const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed'
const browsersFile = require(path.resolve(__dirname, './sauce_browsers.json'))
+const errorMessages = [
+ 'Test exceeded maximum duration',
+ 'Test exceeded maximum duration after 180 seconds'
+]
let jobsDone = 0
let jobsSucceeded = 0
@@ -43,11 +47,12 @@ const waitingCallback = (error, body, id) => {
}, 2000)
} else {
const test = body['js tests'][0]
+ const platform = test.platform.join(', ')
let passed = false
let errorStr = false
if (test.result !== null) {
- if (typeof test.result === 'string' && test.result === 'Test exceeded maximum duration') {
+ if (typeof test.result === 'string' && errorMessages.includes(test.result)) {
errorStr = test.result
} else {
passed = test.result.total === test.result.passed
@@ -55,12 +60,12 @@ const waitingCallback = (error, body, id) => {
}
console.log(`Tested ${testURL}`)
- console.log(`Platform: ${test.platform.join(', ')}`)
- console.log(`Passed: ${passed.toString()}`)
+ console.log(`Platform: ${platform}`)
+ console.log(`Passed: ${passed}`)
console.log(`URL: ${test.url}\n`)
if (errorStr) {
- console.error(errorStr)
+ console.error(`${platform}: ${errorStr}`)
}
if (passed) {