diff --git a/travis-after-failure.sh b/travis-after-failure.sh index 06cd82e0439..56fbc2f2d0e 100755 --- a/travis-after-failure.sh +++ b/travis-after-failure.sh @@ -1,4 +1,5 @@ #!/bin/bash +./travis/junit-errors-to-stdout.sh if [[ $TRAVIS_BRANCH =~ ^master|grails-shell|2\..\.x$ && $TRAVIS_REPO_SLUG == grails/* && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo "Install duplicity with S3 support" diff --git a/travis/junit-errors-to-stdout.sh b/travis/junit-errors-to-stdout.sh new file mode 100755 index 00000000000..98ef1bd62ed --- /dev/null +++ b/travis/junit-errors-to-stdout.sh @@ -0,0 +1,19 @@ +#!/bin/bash +IFS=' +' +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +sudo apt-get install -y --force-yes xml-twig-tools xsltproc +ROOTDIR="$1" +if [ -z "$ROOTDIR" ]; then + ROOTDIR="." +fi +FILES=$(find "$ROOTDIR" -path '*/build/test-results/*.xml' | xargs --no-run-if-empty xml_grep --files --cond 'testsuite[@failures > 0 or @errors > 0]') +if [ -n "$FILES" ]; then + for file in "$FILES"; do + if [ -f "$file" ]; then + echo '=====================================================' + xsltproc "$DIR/junit-xml-format-errors.xsl" "$file" + fi + done + echo '=====================================================' +fi diff --git a/travis/junit-xml-format-errors.xsl b/travis/junit-xml-format-errors.xsl new file mode 100644 index 00000000000..5f27accb659 --- /dev/null +++ b/travis/junit-xml-format-errors.xsl @@ -0,0 +1,60 @@ + + + + + Testsuite: + +Tests run: + + , Failures: + + , Errors: + + , Time elapsed: + + sec + +--------- ----------- --------- + + + + + + + +Testcase: + + took + + + FAILURE + ERROR + SUCCESS + + + + + + + + + + + + + + + +------ Standard output ------ + + + + + + +------ Error output ------ + + + + + \ No newline at end of file