Install gdb 8 for CI:

A bug in gdb is crashing when demangling some symbols. Gdb needs to be updated
to at least gdb 8.

Only run the debug build under gdb (other builds can time out).
This commit is contained in:
seelabs
2017-07-11 10:31:03 -04:00
parent 2821624ede
commit 5b9e8a77ca
4 changed files with 35 additions and 10 deletions

View File

@@ -62,15 +62,19 @@ if [[ $TARGET == "coverage" ]]; then
lcov --no-external -c -i -d . -o baseline.info
fi
# 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 $APP_PATH $APP_ARGS
if [[ ${TARGET} == debug ]]; then
# Execute unit tests under gdb, printing a call stack
# if we get a crash.
$GDB_ROOT/bin/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 $APP_PATH $APP_ARGS
else
$APP_PATH $APP_ARGS
fi
if [[ $TARGET == "coverage" ]]; then
# Create test coverage data file

View File

@@ -66,3 +66,16 @@ tar xfvz lcov-1.12.tar.gz -C $HOME
# Set install path
mkdir -p $LCOV_ROOT
cd $HOME/lcov-1.12 && make install PREFIX=$LCOV_ROOT
if [[ ${TARGET} == debug ]]; then
#install gdb
pushd $HOME
wget https://ftp.gnu.org/gnu/gdb/gdb-8.0.tar.xz
tar xf gdb-8.0.tar.xz
pushd gdb-8.0
./configure CFLAGS='-w -O2' CXXFLAGS='-std=gnu++11 -g -O2 -w' --prefix=$GDB_ROOT
make -j2
make install
popd
popd
fi