Skip to content

Commit

Permalink
improve code comments in travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Oct 17, 2014
1 parent a8e053a commit 537556c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
- ulimit -c

before_script:
# Wet the core file limit to unlimited so they are generated upon crash
# Set the core file limit to unlimited so a core file is generated upon crash
- ulimit -c unlimited -S

script:
Expand All @@ -29,13 +29,12 @@ script:
- g++ -o test might_crash.cpp -g -O0 -DDEBUG
# Run the program to prompt a crash
# Note: we capture the return code of the program here and add
# `|| true` to ensure that travis continues so we can then get
# access to any core file the might exist
# `|| true` to ensure that travis continues past the crash
- RESULT=$(./test > /dev/null)$? || true
- if [[ ${RESULT} == 0 ]]; then echo "\\o/ our test worked without problems"; else echo "ruhroh test returned an errorcode of $RESULT"; fi;
# If the program returned and error code, now we check for a
# If the program returned an error code, now we check for a
# core file in the current working directory and dump the backtrace out
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/test core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
# now we should present travis with the original error code
# so our logs cleanly stop with the original error code
# now we should present travis with the original
# error code so the run cleanly stops
- if [[ ${RESULT} != 0 ]]; then exit $RESULT ; fi;

0 comments on commit 537556c

Please sign in to comment.