Skip to content

Commit

Permalink
cleanup .travis.yml
Browse files Browse the repository at this point in the history
- Don't install gdb twice
- Time the gdb install
- If the cpp tests return any code >= 128 then apply gdb
- Add some comments
  • Loading branch information
cbeck88 committed Jul 5, 2014
1 parent 857b1e4 commit f5a9508
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .travis.yml
Expand Up @@ -28,9 +28,10 @@ install:
- time sudo apt-get install -qq libboost-iostreams-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-test-dev libcairo2-dev libfribidi-dev libpango1.0-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev
- if [ "$CXX" = "g++" ]; then time sudo apt-get install g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
- if [ "$WML_TESTS" = true]; then sudo apt-get install gdb; fi
# gdb is used to generate a backtrace if a wml test crashes, this is -g option to run_wml_tests
- if [ "$WML_TESTS" = true]; then time sudo apt-get install gdb; fi
# gdb is used to generate a backtrace if a wml test crashes, this is -g option to run_wml_tests. it is also needed when the test executable crashes
- if [ "$CHECK_UTF8" = true ]; then time sudo apt-get install -qq moreutils; fi
# more utils is needed for check_utf8 script
script:
- if [ "$CHECK_UTF8" = true ]; then time ./utils/travis/check_utf8.sh; fi
- time if grep -qorHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ; then echo "Error, Found a UTF8 BOM:\n"; grep -orHbm1 "^`echo -ne '\xef\xbb\xbf'`" po/ src/ data/ ; ./utils/travis/exit_wrapper.sh 1; fi
Expand All @@ -41,12 +42,11 @@ script:
- time if [[ "$CPP_TESTS" = true ]]; then ./test; export TEST_ERROR_CODE=$?; ./utils/travis/exit_wrapper.sh $TEST_ERROR_CODE; fi
- if [[ "$WML_TESTS" = true ]]; then time ./run_wml_tests -g -v -t "$WML_TEST_TIME"; fi
after_failure:
- if [ "$TEST_ERROR_CODE" -ge 128 -a "$WML_TESTS" = false ]; then time sudo apt-get install -qq gdb; fi
# Need to install that if we don't already have it
- if [ -f "errors.log" ]; then echo -e "\n*** \n*\n* Errors reported in wml unit tests, here is errors.log...\n*\n*** \n"; cat errors.log; fi
- if [ "$TEST_ERROR_CODE" = 200 ]; then echo -e "\n***\n*\n* Encountered a segfault in the c++ unit test executable, attempting to get a backtrace in the remaining time...\n*\n***\n"; fi
- if [ "$TEST_ERROR_CODE" = 200 ]; then time sudo apt-get install -qq gdb; fi
- if [ "$TEST_ERROR_CODE" = 200 ]; then time gdb -q -batch -ex start -ex continue -ex bt -ex quit --args ./test; fi
# - if [ "$TEST_ERROR_CODE" = 200 ]; then time scons build=debug extra_flags_debug="$EXTRA_FLAGS_RELEASE" test; fi
# - if [ "$TEST_ERROR_CODE" = 200 ]; then time gdb -q -batch -ex start -ex continue -ex bt -ex quit --args ./test-debug; fi
- if [ "$TEST_ERROR_CODE" -ge 128 ]; then echo -e "\n***\n*\n* Encountered a segfault in the c++ unit test executable, attempting to get a backtrace in the remaining time...\n*\n***\n"; fi
- if [ "$TEST_ERROR_CODE" -ge 128 ]; then time gdb -q -batch -ex start -ex continue -ex bt -ex quit --args ./test; fi
notifications:
email: false
irc:
Expand Down

0 comments on commit f5a9508

Please sign in to comment.