mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-31 13:24:13 +02:00
Merge branch 'ci-coverage-include-baseline' into 'master'
CI: Include coverage data of code which isn't executed by the test suite. See merge request GNOME/glib!152
This commit is contained in:
@@ -23,29 +23,38 @@ pacman --noconfirm -S --needed \
|
||||
mingw-w64-$MSYS2_ARCH-toolchain \
|
||||
mingw-w64-$MSYS2_ARCH-zlib
|
||||
|
||||
curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.13/lcov-1.13.tar.gz"
|
||||
echo "44972c878482cc06a05fe78eaa3645cbfcbad6634615c3309858b207965d8a23 lcov-1.13.tar.gz" | sha256sum -c
|
||||
tar -xzf lcov-1.13.tar.gz
|
||||
LCOV="$(pwd)/lcov-1.13/bin/lcov"
|
||||
|
||||
mkdir -p _coverage
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
pip3 install --upgrade --user meson==0.47.0
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export CFLAGS="-coverage -ftest-coverage -fprofile-arcs"
|
||||
DIR="$(pwd)"
|
||||
|
||||
meson --werror --buildtype debug _build
|
||||
cd _build
|
||||
ninja
|
||||
|
||||
"${LCOV}" \
|
||||
--quiet \
|
||||
--rc lcov_branch_coverage=1 \
|
||||
--directory "${DIR}/_build" \
|
||||
--capture \
|
||||
--initial \
|
||||
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
|
||||
|
||||
# FIXME: fix the test suite
|
||||
meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} || true
|
||||
|
||||
cd ..
|
||||
curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.13/lcov-1.13.tar.gz"
|
||||
echo "44972c878482cc06a05fe78eaa3645cbfcbad6634615c3309858b207965d8a23 lcov-1.13.tar.gz" | sha256sum -c
|
||||
tar -xvzf lcov-1.13.tar.gz
|
||||
|
||||
mkdir -p _coverage
|
||||
./lcov-1.13/bin/lcov \
|
||||
"${LCOV}" \
|
||||
--quiet \
|
||||
--rc lcov_branch_coverage=1 \
|
||||
--directory . \
|
||||
--directory "${DIR}/_build" \
|
||||
--capture \
|
||||
--no-external \
|
||||
--output-file "_coverage/${CI_JOB_NAME}.lcov"
|
||||
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
|
||||
|
Reference in New Issue
Block a user