ci/msys2: Use builtin b_coverage option

...instead of custom CFLAGS
This commit is contained in:
Luca Bacci
2025-09-10 10:14:54 +02:00
parent 77fe11e8b2
commit f8d00c6458
2 changed files with 10 additions and 3 deletions

View File

@@ -570,7 +570,7 @@ msys2-mingw32:
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
CFLAGS: -coverage -ftest-coverage -fprofile-arcs
COVERAGE: "1"
PYTHONUTF8: "1"
G_DEBUGGER: 'gdb.exe -batch -ex "set logging enabled on" -ex "attach %p" -ex "signal-event %e" -ex "c" -ex "thread apply all bt full" -ex "k"'
script:

View File

@@ -42,6 +42,12 @@ if [[ $(vercmp "$(pacman -Qi "${MINGW_PACKAGE_PREFIX}"-gobject-introspection | g
meson install -C gobject-introspection/build
fi
if [[ -v COVERAGE ]]; then
coverage=true
else
coverage=false
fi
# FIXME: We cant use ${MESON_COMMON_OPTIONS} here because this script installs
# Meson 1.3. See the comment in .gitlab-ci.yml about the same problem on
# FreeBSD.
@@ -50,6 +56,7 @@ meson setup \
--buildtype=debug \
--wrap-mode=nodownload \
--werror \
-Db_coverage=$coverage \
-Ddocumentation=true \
-Dintrospection=enabled \
-Dman-pages=enabled \
@@ -57,7 +64,7 @@ meson setup \
meson compile -C _build
if [[ "$CFLAGS" == *"-coverage"* ]]; then
if [[ -v COVERAGE ]]; then
lcov \
--quiet \
--config-file "${DIR}"/.lcovrc \
@@ -71,7 +78,7 @@ meson test -C _build -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}"
meson test -C _build -v --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
--setup=unstable_tests --suite=failing --suite=flaky || true
if [[ "$CFLAGS" == *"-coverage"* ]]; then
if [[ -v COVERAGE ]]; then
lcov \
--quiet \
--config-file "${DIR}"/.lcovrc \