mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-01 17:02:18 +01:00
ci/msys2: Use builtin b_coverage option
...instead of custom CFLAGS
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 can’t 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 \
|
||||
|
||||
Reference in New Issue
Block a user