karma-shared.conf.js (angular.js-1.7.9) | : | karma-shared.conf.js (angular.js-1.8.0) | ||
---|---|---|---|---|
skipping to change at line 171 | skipping to change at line 171 | |||
}, | }, | |||
'BS_iOS_11': { | 'BS_iOS_11': { | |||
base: 'BrowserStack', | base: 'BrowserStack', | |||
device: 'iPhone 8', | device: 'iPhone 8', | |||
os: 'ios', | os: 'ios', | |||
os_version: '11.0' | os_version: '11.0' | |||
} | } | |||
} | } | |||
}); | }); | |||
if (process.env.TRAVIS) { | ||||
var buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + proce | ||||
ss.env.TRAVIS_BUILD_ID + ')'; | ||||
// Karma (with socket.io 1.x) buffers by 50 and 50 tests can take a long tim | ||||
e on IEs;-) | ||||
config.browserNoActivityTimeout = 120000; | ||||
config.browserStack.build = buildLabel; | ||||
config.browserStack.startTunnel = false; | ||||
config.browserStack.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER; | ||||
config.sauceLabs.build = buildLabel; | ||||
config.sauceLabs.startConnect = false; | ||||
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER; | ||||
config.sauceLabs.recordScreenshots = true; | ||||
// Try 'websocket' for a faster transmission first. Fallback to 'polling' if | ||||
necessary. | ||||
config.transports = ['websocket', 'polling']; | ||||
// Debug logging into a file, that we print out at the end of the build. | ||||
config.loggers.push({ | ||||
type: 'file', | ||||
filename: process.env.LOGS_DIR + '/' + (specificOptions.logFile || 'karma. | ||||
log') | ||||
}); | ||||
if (process.env.BROWSER_PROVIDER === 'saucelabs' || !process.env.BROWSER_PRO | ||||
VIDER) { | ||||
// Allocating a browser can take pretty long (eg. if we are out of capacit | ||||
y and need to wait | ||||
// for another build to finish) and so the `captureTimeout` typically kill | ||||
s | ||||
// an in-queue-pending request, which makes no sense. | ||||
config.captureTimeout = 0; | ||||
} | ||||
} | ||||
// Terrible hack to workaround inflexibility of log4js: | // Terrible hack to workaround inflexibility of log4js: | |||
// - ignore web-server's 404 warnings, | // - ignore web-server's 404 warnings, | |||
// - ignore DEBUG logs (on Travis), we log them into a file instead. | // - ignore DEBUG logs (on CI), we log them into a file instead. | |||
var IGNORED_404 = [ | var IGNORED_404 = [ | |||
'/favicon.ico', | '/favicon.ico', | |||
'/%7B%7BtestUrl%7D%7D', | '/%7B%7BtestUrl%7D%7D', | |||
'/someSanitizedUrl', | '/someSanitizedUrl', | |||
'/{{testUrl}}' | '/{{testUrl}}' | |||
]; | ]; | |||
var log4js = require('log4js'); | var log4js = require('log4js'); | |||
var layouts = require('log4js/lib/layouts'); | var layouts = require('log4js/lib/layouts'); | |||
var originalConfigure = log4js.configure; | var originalConfigure = log4js.configure; | |||
log4js.configure = function(log4jsConfig) { | log4js.configure = function(log4jsConfig) { | |||
skipping to change at line 229 | skipping to change at line 197 | |||
log4js.addAppender(function(log) { | log4js.addAppender(function(log) { | |||
var msg = log.data[0]; | var msg = log.data[0]; | |||
// ignore web-server's 404s | // ignore web-server's 404s | |||
if (log.categoryName === 'web-server' && log.level.levelStr === config.LOG _WARN && | if (log.categoryName === 'web-server' && log.level.levelStr === config.LOG _WARN && | |||
IGNORED_404.some(function(ignoredLog) {return msg.indexOf(ignoredLog) !== -1;})) { | IGNORED_404.some(function(ignoredLog) {return msg.indexOf(ignoredLog) !== -1;})) { | |||
return; | return; | |||
} | } | |||
// on Travis, ignore DEBUG statements | // on CI, ignore DEBUG statements | |||
if (process.env.TRAVIS && log.level.levelStr === config.LOG_DEBUG) { | if (process.env.CI && log.level.levelStr === config.LOG_DEBUG) { | |||
return; | return; | |||
} | } | |||
console.log(layout(log)); | console.log(layout(log)); | |||
}); | }); | |||
return originalResult; | return originalResult; | |||
}; | }; | |||
}; | }; | |||
End of changes. 3 change blocks. | ||||
42 lines changed or deleted | 3 lines changed or added |