diff options
| author | Vojta Jina | 2013-08-21 03:16:57 -0700 | 
|---|---|---|
| committer | Vojta Jina | 2013-08-23 16:49:10 -0700 | 
| commit | 80d0f98263786ef302ca7551c4515560a7c07195 (patch) | |
| tree | 03d603ef6d1294ed75f346faa5509be105decd27 /karma-shared.conf.js | |
| parent | c64a9853074a392ba83a0f790b28b3be96c1144a (diff) | |
| download | angular.js-80d0f98263786ef302ca7551c4515560a7c07195.tar.bz2 | |
chore(travis): clean up logs
Forward SauceConnect logs and Karma debug logs into a file and print these files at the very end of a build.
Diffstat (limited to 'karma-shared.conf.js')
| -rw-r--r-- | karma-shared.conf.js | 17 | 
1 files changed, 13 insertions, 4 deletions
| diff --git a/karma-shared.conf.js b/karma-shared.conf.js index 06f31108..28978097 100644 --- a/karma-shared.conf.js +++ b/karma-shared.conf.js @@ -1,4 +1,4 @@ -module.exports = function(config) { +module.exports = function(config, specificOptions) {    config.set({      frameworks: ['jasmine'],      autoWatch: true, @@ -9,11 +9,13 @@ module.exports = function(config) {      // config for Travis CI      sauceLabs: { -      testName: 'AngularJS', +      testName: specificOptions.testName || 'AngularJS',        startConnect: false,        tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER      }, +    // For more browsers on Sauce Labs see: +    // https://saucelabs.com/docs/platforms/webdriver      customLaunchers: {        'SL_Chrome': {          base: 'SauceLabs', @@ -51,9 +53,16 @@ module.exports = function(config) {    }); -  // TODO(vojta): remove once SauceLabs supports websockets. -  // This speeds up the capturing a bit, as browsers don't even try to use websocket.    if (process.env.TRAVIS) { +    // TODO(vojta): remove once SauceLabs supports websockets. +    // This speeds up the capturing a bit, as browsers don't even try to use websocket.      config.transports = ['xhr-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'), +      level: config.LOG_DEBUG +    });    }  }; | 
