mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 11:15:56 +00:00
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:
@@ -10,6 +10,7 @@ env:
|
||||
# namepart must match the folder name internal
|
||||
# to boost's .tar.gz.
|
||||
- LCOV_ROOT=$HOME/lcov
|
||||
- GDB_ROOT=$HOME/gdb
|
||||
- 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'
|
||||
|
||||
@@ -27,6 +28,8 @@ addons:
|
||||
- binutils-gold
|
||||
# Provides a backtrace if the unittests crash
|
||||
- gdb
|
||||
# needed to build gdb
|
||||
- texinfo
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,7 @@ dependencies:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get purge -qq libboost1.48-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
|
||||
- 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
|
||||
@@ -16,6 +16,11 @@ dependencies:
|
||||
- gcc --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:
|
||||
pre:
|
||||
- scons clang.debug
|
||||
|
||||
Reference in New Issue
Block a user