Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[travis] Colorize test results
  • Loading branch information
m-kuhn committed Mar 4, 2017
1 parent b6e8777 commit 191c11a
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -37,6 +37,7 @@ matrix:
- txt2tags
- xvfb
- clang-3.8
- grc


- os: linux
Expand Down
53 changes: 53 additions & 0 deletions ci/travis/linux/.grc.colors
@@ -0,0 +1,53 @@
# A readme that explains the configuration options can be found here
# http://korpus.juls.savba.sk/~garabik/software/grc/README.txt

####################
# Early exit, lines that do not need to be processed further
####################

# DEFAULT: the final FAILED line in failed nose tests
regexp=^FAILED (failures=[0-9])$
colours=default
count=stop
-

###################
# Failed test block
###################

# YELLOW: A test failed, start a yellow block
regexp=^FAIL[:\!].*
colours=yellow
count=block
-
# YELLOW END: End block on next successful test
regexp=^PASS
colours=default
count=unblock
-
# YELLOW END: End block on next successful test
regexp=^Ran
colours=default
count=unblock
-

####################
# Unit test name (title)
####################

# RED: test name
regexp=.*Test.*\*\*\*Failed.*sec
colours=red
-

####################
# Successful tests
####################

# DARK GRAY: passed tests should be unobtrusive
regexp=.*Test.*Passed.*sec
colours="\033[90m"
-
# DARK GRAY: Start test lines should be unobtrusive
regexp=\s{8}Start.*
colours="\033[90m"
3 changes: 2 additions & 1 deletion ci/travis/linux/script.sh
Expand Up @@ -32,5 +32,6 @@ if [ "$CACHE_WARMING" = true ] ; then
xvfb-run ctest -V -R NOTESTS -S ./qgis-test-travis.ctest --output-on-failure
false
else
xvfb-run ctest -V -E "$(cat ${DIR}/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S ./qgis-test-travis.ctest --output-on-failure
grc -c ${TRAVIS_BUILD_DIR}/ci/travis/linux/.grc.colors \
xvfb-run ctest -V -E "$(cat ${DIR}/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S ./qgis-test-travis.ctest --output-on-failure
fi

0 comments on commit 191c11a

Please sign in to comment.