print failure message in case not all saucelabs runner could be started
parent
e824ac424d
commit
d8bcfa0a49
|
@ -13,7 +13,12 @@ var allTestsPassed = true;
|
||||||
// overwrite the default exit code
|
// overwrite the default exit code
|
||||||
// in case not all worker can be run (due to saucelabs limits), `queue.drain` below will not be called
|
// in case not all worker can be run (due to saucelabs limits), `queue.drain` below will not be called
|
||||||
// and the script would silently exit with error code 0
|
// and the script would silently exit with error code 0
|
||||||
process.exitCode = 1;
|
process.exitCode = 2;
|
||||||
|
process.on('exit', (code) => {
|
||||||
|
if (code === 2){
|
||||||
|
console.log("\x1B[31mFAILED\x1B[39m Not all saucelabs runner have been started.");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
var sauceTestWorker = async.queue(function (testSettings, callback) {
|
var sauceTestWorker = async.queue(function (testSettings, callback) {
|
||||||
var browser = wd.promiseChainRemote(config.host, config.port, config.username, config.accessKey);
|
var browser = wd.promiseChainRemote(config.host, config.port, config.username, config.accessKey);
|
||||||
|
|
Loading…
Reference in New Issue