aboutsummaryrefslogtreecommitdiff
path: root/ci/run.ps1
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-06-07 13:00:59 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2021-06-22 21:05:11 +0300
commit765aff5a42d9b7568bbd89f711d52c2da346e91c (patch)
tree11e3b60053d4f5061f3b970dccc4a9b91e313770 /ci/run.ps1
parentedfe24178d86450a8184bd139e03c5cdcad91100 (diff)
downloadmeson-765aff5a42d9b7568bbd89f711d52c2da346e91c.zip
meson-765aff5a42d9b7568bbd89f711d52c2da346e91c.tar.gz
meson-765aff5a42d9b7568bbd89f711d52c2da346e91c.tar.bz2
coverage: Enable coverage reports
Diffstat (limited to 'ci/run.ps1')
-rw-r--r--ci/run.ps119
1 files changed, 17 insertions, 2 deletions
diff --git a/ci/run.ps1 b/ci/run.ps1
index 424af72..961c423 100644
--- a/ci/run.ps1
+++ b/ci/run.ps1
@@ -68,11 +68,26 @@ python --version
# Needed for running unit tests in parallel.
echo ""
-python -m pip --disable-pip-version-check install --upgrade pefile pytest-xdist jsonschema
+python -m pip --disable-pip-version-check install --upgrade pefile pytest-xdist jsonschema coverage
echo ""
echo "=== Start running tests ==="
# Starting from VS2019 Powershell(?) will fail the test run
# if it prints anything to stderr. Python's test runner
# does that by default so we need to forward it.
-cmd /c "python 2>&1 run_tests.py --backend $env:backend $env:extraargs"
+cmd /c "python 2>&1 ./tools/run_with_cov.py run_tests.py --backend $env:backend $env:extraargs"
+
+echo ""
+echo ""
+echo "=== Gathering coverage report ==="
+echo ""
+
+python3 -m coverage combine
+python3 -m coverage xml
+python3 -m coverage report
+
+# Currently codecov.py does not handle Azure, use this fork of a fork to get it
+# working without requireing a token
+git clone https://github.com/mensinda/codecov-python
+python3 -m pip install --ignore-installed ./codecov-python
+python3 -m codecov -f .coverage/coverage.xml -n "VS$env:compiler $env:arch $env:backend" -c $env:SOURCE_VERSION