Always run unit tests under gdb

This commit is contained in:
Nik Bougalis
2016-04-28 14:06:45 -07:00
committed by Vinnie Falco
parent 0efb929898
commit c28d36b500
2 changed files with 11 additions and 15 deletions

View File

@@ -20,20 +20,20 @@ rm -f build/rippled
# See what we've actually built
ldd $RIPPLED_PATH
# Execute unit tests under gdb, printing a call stack
# if we get a crash.
gdb -return-child-result -quiet -batch \
-ex "set env MALLOC_CHECK_=3" \
-ex "set print thread-events off" \
-ex run \
-ex "thread apply all backtrace full" \
-ex "quit" \
--args $RIPPLED_PATH --unittest
if [[ $TARGET == "coverage" ]]; then
$RIPPLED_PATH --unittest
# We pass along -p to keep path segments so as to avoid collisions
codecov --gcov-args=-p --gcov-source-match='^src/(ripple|beast)'
else
if [[ $CC == "clang" ]]; then
# gdb segfaults with a clang build
$RIPPLED_PATH --unittest
else
# Run unittests (under gdb)
cat $__dirname/unittests.gdb | gdb \
--return-child-result \
--args $RIPPLED_PATH --unittest
fi
fi
# Run NPM tests