ci: Set CFLAGS on msys2-mingw32 in yaml file as it happens for other jobs

Be consistent, and based on this also perform the lcov job or not
This commit is contained in:
Marco Trevisan (Treviño) 2022-10-29 04:12:21 +02:00
parent e2560d1681
commit fdaa8a334a
2 changed files with 18 additions and 14 deletions

View File

@ -303,6 +303,7 @@ msys2-mingw32:
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
CFLAGS: -coverage -ftest-coverage -fprofile-arcs
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
- C:\msys64\usr\bin\bash .gitlab-ci/show-execution-environment.sh

View File

@ -34,7 +34,6 @@ export CCACHE_BASEDIR CCACHE_DIR
pip3 install --upgrade --user meson==0.60.3
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
CFLAGS="-coverage -ftest-coverage -fprofile-arcs"
DIR="$(pwd)"
export PATH CFLAGS
@ -42,6 +41,7 @@ meson --werror --buildtype debug _build
cd _build
ninja
if [[ "$CFLAGS" == *"-coverage"* ]]; then
lcov \
--quiet \
--config-file "${DIR}"/.lcovrc \
@ -49,13 +49,16 @@ lcov \
--capture \
--initial \
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
fi
# FIXME: fix the test suite
meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true
if [[ "$CFLAGS" == *"-coverage"* ]]; then
lcov \
--quiet \
--config-file "${DIR}"/.lcovrc \
--directory "${DIR}/_build" \
--capture \
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
fi