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: env:
- CXX=g++-4.8 - CXX=g++-4.8
install: yarn install 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 # Limit clone depth to 5, to speed up build
git: git:

View File

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

View File

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