mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 13:26:16 +01:00
Merge branch 'add-back-win32-coverage' into 'master'
CI: Re-enable code coverage reporting for MSYS2 builds See merge request GNOME/glib!1673
This commit is contained in:
commit
a36c98fe83
@ -1,6 +1,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import io
|
import io
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
@ -12,11 +13,7 @@ def main(argv):
|
|||||||
print("cov-fixup:", path)
|
print("cov-fixup:", path)
|
||||||
text = io.open(path, "r", encoding="utf-8").read()
|
text = io.open(path, "r", encoding="utf-8").read()
|
||||||
text = text.replace("\\\\", "/")
|
text = text.replace("\\\\", "/")
|
||||||
glib_dir = "/glib/"
|
old_root = re.search(":(.*?)/glib/.*?$", text, re.MULTILINE).group(1)
|
||||||
end = text.index(glib_dir)
|
|
||||||
start = text[:end].rindex(":") + 1
|
|
||||||
old_root = text[start:end]
|
|
||||||
assert os.path.basename(os.getcwd()) == "glib"
|
|
||||||
new_root = os.path.dirname(os.getcwd())
|
new_root = os.path.dirname(os.getcwd())
|
||||||
if old_root != new_root:
|
if old_root != new_root:
|
||||||
print("replacing %r with %r" % (old_root, new_root))
|
print("replacing %r with %r" % (old_root, new_root))
|
||||||
|
@ -13,6 +13,7 @@ pacman --noconfirm -Suy
|
|||||||
|
|
||||||
pacman --noconfirm -S --needed \
|
pacman --noconfirm -S --needed \
|
||||||
base-devel \
|
base-devel \
|
||||||
|
lcov \
|
||||||
mingw-w64-$MSYS2_ARCH-ccache \
|
mingw-w64-$MSYS2_ARCH-ccache \
|
||||||
mingw-w64-$MSYS2_ARCH-gettext \
|
mingw-w64-$MSYS2_ARCH-gettext \
|
||||||
mingw-w64-$MSYS2_ARCH-libffi \
|
mingw-w64-$MSYS2_ARCH-libffi \
|
||||||
@ -24,12 +25,6 @@ pacman --noconfirm -S --needed \
|
|||||||
mingw-w64-$MSYS2_ARCH-zlib \
|
mingw-w64-$MSYS2_ARCH-zlib \
|
||||||
mingw-w64-$MSYS2_ARCH-libelf
|
mingw-w64-$MSYS2_ARCH-libelf
|
||||||
|
|
||||||
curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz"
|
|
||||||
echo "14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a lcov-1.14.tar.gz" | sha256sum -c
|
|
||||||
tar -xzf lcov-1.14.tar.gz
|
|
||||||
# FIXME: not currently using lcov, see below
|
|
||||||
#LCOV="$(pwd)/lcov-1.14/bin/lcov"
|
|
||||||
|
|
||||||
mkdir -p _coverage
|
mkdir -p _coverage
|
||||||
mkdir -p _ccache
|
mkdir -p _ccache
|
||||||
CCACHE_BASEDIR="$(pwd)"
|
CCACHE_BASEDIR="$(pwd)"
|
||||||
@ -47,15 +42,13 @@ meson --werror --buildtype debug _build
|
|||||||
cd _build
|
cd _build
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
# FIXME: lcov doesn't support gcc9 yet:
|
lcov \
|
||||||
# https://github.com/linux-test-project/lcov/issues/58
|
--quiet \
|
||||||
#"${LCOV}" \
|
--config-file "${DIR}"/.gitlab-ci/lcovrc \
|
||||||
# --quiet \
|
--directory "${DIR}/_build" \
|
||||||
# --config-file "${DIR}"/.gitlab-ci/lcovrc \
|
--capture \
|
||||||
# --directory "${DIR}/_build" \
|
--initial \
|
||||||
# --capture \
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
|
||||||
# --initial \
|
|
||||||
# --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
|
|
||||||
|
|
||||||
# FIXME: fix the test suite
|
# FIXME: fix the test suite
|
||||||
meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true
|
meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true
|
||||||
@ -66,10 +59,9 @@ python3 "${DIR}"/.gitlab-ci/meson-junit-report.py \
|
|||||||
--output "${DIR}/_build/${CI_JOB_NAME}-report.xml" \
|
--output "${DIR}/_build/${CI_JOB_NAME}-report.xml" \
|
||||||
"${DIR}/_build/meson-logs/testlog.json"
|
"${DIR}/_build/meson-logs/testlog.json"
|
||||||
|
|
||||||
# FIXME: see above
|
lcov \
|
||||||
#"${LCOV}" \
|
--quiet \
|
||||||
# --quiet \
|
--config-file "${DIR}"/.gitlab-ci/lcovrc \
|
||||||
# --config-file "${DIR}"/.gitlab-ci/lcovrc \
|
--directory "${DIR}/_build" \
|
||||||
# --directory "${DIR}/_build" \
|
--capture \
|
||||||
# --capture \
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
|
||||||
# --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user