Make travis build and use debug variants for tests

This commit is contained in:
Nicholas Dudfield
2014-10-01 15:33:49 +07:00
committed by Vinnie Falco
parent ec4ec48fb8
commit ca8eda412e

View File

@@ -39,19 +39,26 @@ before_install:
script: script:
# Set so any failing command will abort the build # Set so any failing command will abort the build
- set -e - set -e
# If only we could do -j12 ;) # $CC will be either `clang` or `gcc` (If only we could do -j12 ;)
- scons - scons $CC.debug
# We can be sure we're using the build/$CC.debug variant (-f so never err)
- rm -f build/rippled
- export RIPPLED_PATH="$PWD/build/$CC.debug/rippled"
# See what we've actually built # See what we've actually built
- ldd ./build/rippled - ldd $RIPPLED_PATH
# Run unittests (under gdb) # Run unittests (under gdb)
- | # create gdb script - | # create gdb script
echo "set env MALLOC_CHECK_=3" > script.gdb echo "set env MALLOC_CHECK_=3" > script.gdb
echo "run" >> script.gdb echo "run" >> script.gdb
echo "backtrace full" >> script.gdb echo "backtrace full" >> script.gdb
# gdb --help # gdb --help
- cat script.gdb | gdb --ex 'set print thread-events off' --return-child-result --args ./build/rippled --unittest - cat script.gdb | gdb --ex 'set print thread-events off' --return-child-result --args $RIPPLED_PATH --unittest
# Run integration tests
- npm install - npm install
# Use build/(gcc|clang).debug/rippled
- |
echo "exports.default_server_config = {\"rippled_path\" : \"$RIPPLED_PATH\"};" > test/config.js
# Run integration tests
- npm test - npm test
notifications: notifications:
email: email: