[pygobject/pygobject-3-34] CI: make things work with coverage.py 5.x
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/pygobject-3-34] CI: make things work with coverage.py 5.x
- Date: Mon, 30 Dec 2019 11:13:42 +0000 (UTC)
commit da4ad3801ae9503bde1dfe1a0a9ea1301160c1f5
Author: Christoph Reiter <reiter christoph gmail com>
Date: Fri Dec 20 16:48:00 2019 +0100
CI: make things work with coverage.py 5.x
It has changed its internal format to sqlite and still doesn't
provide a way to merge runs from different OSes, see
https://github.com/nedbat/coveragepy/issues/903
.gitlab-ci/coverage-docker.sh | 3 ++-
.gitlab-ci/fixup-covpy-paths.py | 17 +++++++++++++++++
.gitlab-ci/{fixup-cov-paths.py => fixup-lcov-paths.py} | 0
.gitlab-ci/test-msys2.sh | 3 ---
setup.cfg | 1 +
5 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci/coverage-docker.sh b/.gitlab-ci/coverage-docker.sh
index 2a51d036..9b3e12ea 100755
--- a/.gitlab-ci/coverage-docker.sh
+++ b/.gitlab-ci/coverage-docker.sh
@@ -5,7 +5,8 @@ set -e
python -m pip install coverage
# Make the Windows paths match our current layout
-python ./.gitlab-ci/fixup-cov-paths.py coverage/.coverage* coverage/*.lcov
+python ./.gitlab-ci/fixup-lcov-paths.py coverage/*.lcov
+python ./.gitlab-ci/fixup-covpy-paths.py coverage/.coverage*
# Remove external headers (except gi tests)
for path in coverage/*.lcov; do
diff --git a/.gitlab-ci/fixup-covpy-paths.py b/.gitlab-ci/fixup-covpy-paths.py
new file mode 100644
index 00000000..3efdc5a6
--- /dev/null
+++ b/.gitlab-ci/fixup-covpy-paths.py
@@ -0,0 +1,17 @@
+import sys
+import sqlite3
+
+
+def main(argv):
+ paths = argv[1:]
+
+ for path in paths:
+ # https://github.com/nedbat/coveragepy/issues/903
+ conn = sqlite3.connect(path)
+ conn.execute("UPDATE file set path = REPLACE(path, '\\', '/')")
+ conn.commit()
+ conn.close()
+
+
+if __name__ == "__main__":
+ sys.exit(main(sys.argv))
diff --git a/.gitlab-ci/fixup-cov-paths.py b/.gitlab-ci/fixup-lcov-paths.py
similarity index 100%
rename from .gitlab-ci/fixup-cov-paths.py
rename to .gitlab-ci/fixup-lcov-paths.py
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
index 51d7e56c..43fa7da0 100755
--- a/.gitlab-ci/test-msys2.sh
+++ b/.gitlab-ci/test-msys2.sh
@@ -31,9 +31,6 @@ pacman --noconfirm -S --needed \
git \
perl
-# https://github.com/Alexpux/MINGW-packages/issues/4333
-pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-$PYTHON-pathlib2
-
# ccache setup
export PATH="$MSYSTEM/lib/ccache/bin:$PATH"
mkdir -p _ccache
diff --git a/setup.cfg b/setup.cfg
index 33186d68..c165fa29 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,6 +4,7 @@ exclude=subprojects
[coverage:run]
branch=True
+relative_files=True
include=
gi/*
tests/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]