Disable leak detection if debug symbols are unavailable
There just doesn't seem to be any way to make this work right now, so handle dbgsym packages installation failure and disable leak detection in this case. Hopefully ddebs.ubuntu.com repository will be updated in the future, allowing this to work again.
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -222,8 +222,15 @@ jobs:
|
||||
if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.use_xvfb
|
||||
run: |
|
||||
if [ ${{ matrix.use_asan }} ]; then
|
||||
export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan
|
||||
export ASAN_OPTIONS=fast_unwind_on_malloc=0
|
||||
# Leak suppression only works if we have debug symbols available,
|
||||
# otherwise we disable it to avoid tons of reports about leaks in
|
||||
# libfontconfig etc.
|
||||
if [ -f wx_dbgsym_available ]; then
|
||||
export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan
|
||||
else
|
||||
ASAN_OPTIONS=detect_leaks=0
|
||||
fi
|
||||
export ASAN_OPTIONS="$ASAN_OPTIONS fast_unwind_on_malloc=0"
|
||||
fi
|
||||
pushd tests
|
||||
xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui
|
||||
|
@@ -43,7 +43,7 @@ case $(uname -s) in
|
||||
wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | $SUDO apt-key add -
|
||||
|
||||
# Install the symbols to allow LSAN suppression list to work.
|
||||
pkg_install='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym'
|
||||
dbgsym_pkgs='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym'
|
||||
fi
|
||||
|
||||
run_apt update
|
||||
@@ -85,7 +85,18 @@ case $(uname -s) in
|
||||
fi
|
||||
done
|
||||
|
||||
run_apt install -y $pkg_install
|
||||
if ! run_apt install -y $pkg_install $dbgsym_pkgs; then
|
||||
if [ -z "$dbgsym_pkgs" ]; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
# Retry without dbgsym packages that currently fail to install
|
||||
# under Ubuntu Focal (20.04).
|
||||
echo 'Installing with dbgsym packages failed, retrying without...'
|
||||
run_apt install -y $pkg_install
|
||||
else
|
||||
touch wx_dbgsym_available
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
Reference in New Issue
Block a user