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

@@ -10,6 +10,7 @@ env:
# namepart must match the folder name internal # namepart must match the folder name internal
# to boost's .tar.gz. # to boost's .tar.gz.
- LCOV_ROOT=$HOME/lcov - LCOV_ROOT=$HOME/lcov
- GDB_ROOT=$HOME/gdb
- BOOST_ROOT=$HOME/boost_1_60_0 - BOOST_ROOT=$HOME/boost_1_60_0
- BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz' - BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz'
@@ -27,6 +28,8 @@ addons:
- binutils-gold - binutils-gold
# Provides a backtrace if the unittests crash # Provides a backtrace if the unittests crash
- gdb - gdb
# needed to build gdb
- texinfo
matrix: matrix:
include: include:

View File

@@ -62,15 +62,19 @@ if [[ $TARGET == "coverage" ]]; then
lcov --no-external -c -i -d . -o baseline.info lcov --no-external -c -i -d . -o baseline.info
fi fi
# Execute unit tests under gdb, printing a call stack if [[ ${TARGET} == debug ]]; then
# if we get a crash. # Execute unit tests under gdb, printing a call stack
gdb -return-child-result -quiet -batch \ # if we get a crash.
-ex "set env MALLOC_CHECK_=3" \ $GDB_ROOT/bin/gdb -return-child-result -quiet -batch \
-ex "set print thread-events off" \ -ex "set env MALLOC_CHECK_=3" \
-ex run \ -ex "set print thread-events off" \
-ex "thread apply all backtrace full" \ -ex run \
-ex "quit" \ -ex "thread apply all backtrace full" \
--args $APP_PATH $APP_ARGS -ex "quit" \
--args $APP_PATH $APP_ARGS
else
$APP_PATH $APP_ARGS
fi
if [[ $TARGET == "coverage" ]]; then if [[ $TARGET == "coverage" ]]; then
# Create test coverage data file # Create test coverage data file

View File

@@ -66,3 +66,16 @@ tar xfvz lcov-1.12.tar.gz -C $HOME
# Set install path # Set install path
mkdir -p $LCOV_ROOT mkdir -p $LCOV_ROOT
cd $HOME/lcov-1.12 && make install PREFIX=$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

View File

@@ -8,7 +8,7 @@ dependencies:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get purge -qq libboost1.48-dev - sudo apt-get purge -qq libboost1.48-dev
- sudo apt-get install -qq libboost1.60-all-dev - sudo apt-get install -qq libboost1.60-all-dev
- sudo apt-get install -qq clang-3.6 gcc-5 g++-5 libobjc-5-dev libgcc-5-dev libstdc++-5-dev libclang1-3.6 libgcc1 libgomp1 libstdc++6 scons protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags - sudo apt-get install -qq clang-3.6 gcc-5 g++-5 libobjc-5-dev libgcc-5-dev libstdc++-5-dev libclang1-3.6 libgcc1 libgomp1 libstdc++6 scons protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags texinfo
- lsb_release -a - lsb_release -a
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 99 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 99
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 99 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 99
@@ -16,6 +16,11 @@ dependencies:
- gcc --version - gcc --version
- clang --version - clang --version
- clang++ --version - clang++ --version
- if [[ ! -e gdb-8.0 ]]; then wget https://ftp.gnu.org/gnu/gdb/gdb-8.0.tar.xz && tar xf gdb-8.0.tar.xz && cd gdb-8.0 && ./configure && make && cd ..; fi
- pushd gdb-8.0 && sudo make install && popd
- gdb --version
cache_directories:
- gdb-8.0
test: test:
pre: pre:
- scons clang.debug - scons clang.debug