Ensure Gemini terminates with exit status 1 on failing build

This commit is contained in:
squidfunk 2017-02-09 18:28:33 +01:00
parent 57871449ea
commit 0beec63367
3 changed files with 15 additions and 9 deletions

View File

@ -41,7 +41,7 @@ matrix:
env:
- CXX=g++-4.8
install: yarn install
script: yarn run test:visual:run --no-clean
script: yarn run test:visual:run -- --no-clean
# Limit clone depth to 5, to speed up build
git:

View File

@ -39,6 +39,7 @@ export default (gulp, config, args) => {
return done => {
/* Start static file server */
let error = false
new Promise(resolve => {
ecstatic.start(`${config.tests.visual}/data`, 8000, resolve)
@ -96,7 +97,8 @@ export default (gulp, config, args) => {
})
/* Return runner for graceful stop */
.then(() => {
.then(status => {
error = status.errored > 0
return runner
})
})
@ -111,9 +113,13 @@ export default (gulp, config, args) => {
/* Stop static file server */
})
.then(() => {
ecstatic.stop(done)
ecstatic.stop(() => {
return error
? done(new Error("Gemini terminated with errors"))
: done()
})
}, err => {
return done(err)
return done(new Error(err))
})
}
}

View File

@ -10,7 +10,7 @@
"screenResolution": "1280x1024",
"recordVideo": "false"
},
"retry": 1
"retry": 3
},
"firefox": {
"desiredCapabilities": {
@ -20,7 +20,7 @@
"screenResolution": "1280x1024",
"recordVideo": "false"
},
"retry": 1
"retry": 3
},
"edge": {
"desiredCapabilities": {
@ -29,7 +29,7 @@
"screenResolution": "1280x1024",
"recordVideo": "false"
},
"retry": 1
"retry": 3
},
"ie11": {
"desiredCapabilities": {
@ -39,7 +39,7 @@
"screenResolution": "1280x1024",
"recordVideo": "false"
},
"retry": 1
"retry": 3
},
"ie10": {
"desiredCapabilities": {
@ -49,7 +49,7 @@
"screenResolution": "1280x1024",
"recordVideo": "false"
},
"retry": 1
"retry": 3
}
},
"system": {