Permalink
Browse files

Try to add extra logging to Travis jobs

  • Loading branch information...
1 parent 49f4362 commit fdbc2f21c690b28e21d4e42622b36e0684b647cd @c0bra c0bra committed Dec 10, 2013
Showing with 35 additions and 13 deletions.
  1. +15 −12 .travis.yml
  2. +9 −1 test/karma.conf.js
  3. +11 −0 travis_print_logs.sh
View
@@ -1,7 +1,7 @@
language: node_js
node_js:
-- '0.10'
+ - '0.10'
env:
global:
@@ -17,16 +17,19 @@ branches:
- /^release-.*$/
before_script:
-- chmod +x ./misc/test_lib/sauce/sauce_connect_setup.sh ./misc/test_lib/sauce/sauce_connect_block.sh ./travis_build.sh
-- export DISPLAY=:99.0
-- sh -e /etc/init.d/xvfb start
-- mkdir -p $LOGS_DIR
-- ./misc/test_lib/sauce/sauce_connect_setup.sh
-- npm install --quiet -g grunt-cli
-- npm install
-- npm install -g -f karma@canary
-- ./misc/test_lib/sauce/sauce_connect_block.sh
+ - chmod +x ./misc/test_lib/sauce/sauce_connect_setup.sh ./misc/test_lib/sauce/sauce_connect_block.sh ./travis_build.sh
+ - export DISPLAY=:99.0
+ - sh -e /etc/init.d/xvfb start
+ - mkdir -p $LOGS_DIR
+ - ./misc/test_lib/sauce/sauce_connect_setup.sh
+ - npm install --quiet -g grunt-cli
+ - npm install
+ - npm install -g -f karma@canary
+ - ./misc/test_lib/sauce/sauce_connect_block.sh
script:
-- grunt
-- ./travis_build.sh
+ - grunt
+ - ./travis_build.sh
+
+after_script:
+ - ./travis_print_logs.sh
View
@@ -1,7 +1,7 @@
// Karma configuration
// Generated on Fri Nov 08 2013 09:25:16 GMT-0600 (Central Standard Time)
-module.exports = function(config) {
+module.exports = function(config, specificOptions) {
config.set({
// base path, that will be used to resolve files and exclude
@@ -143,6 +143,14 @@ module.exports = function(config) {
// TODO(c0bra): remove once SauceLabs supports websockets.
// This speeds up the capturing a bit, as browsers don't even try to use websocket. -- (thanks vojta)
if (process.env.TRAVIS) {
+ config.logLevel = config.LOG_DEBUG;
+
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')
+ });
}
};
View
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+LOG_FILES=$LOGS_DIR/*
+
+for FILE in $LOG_FILES; do
+ echo -e "\n\n\n"
+ echo "================================================================================"
+ echo " $FILE"
+ echo "================================================================================"
+ cat $FILE
+done

0 comments on commit fdbc2f2

Please sign in to comment.