aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-11-01 15:06:13 -0400
committerNirbheek Chauhan <nirbheek@centricular.com>2022-11-21 15:43:52 +0530
commite9add3b8a719ecb15e38dc1d161f47789f1c5452 (patch)
treef566d4248282a27c2cb3525e0a9b33ba5357aeca
parentb31bd469172f52e67df9f8cb80843fa48b32a74f (diff)
downloadmeson-e9add3b8a719ecb15e38dc1d161f47789f1c5452.zip
meson-e9add3b8a719ecb15e38dc1d161f47789f1c5452.tar.gz
meson-e9add3b8a719ecb15e38dc1d161f47789f1c5452.tar.bz2
fix confusing azure pipelines status for coverage
The coverage report was always the final section of the main test run. This made it hard to scroll around and find exactly what went wrong -- particularly as not everyone realizes that coverage isn't part of the test run, but also because the output from coverage is... excessively long. This mirrors what we do in our other workflows.
-rw-r--r--azure-pipelines.yml5
-rw-r--r--ci/coverage.ps114
-rw-r--r--ci/run.ps119
3 files changed, 20 insertions, 18 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 998d035..ba5b28e 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -112,3 +112,8 @@ jobs:
filePath: .\ci\run.ps1
env:
MESON_CI_JOBNAME: azure-$(System.JobName)
+ - task: PowerShell@2
+ displayName: Gathering coverage report
+ inputs:
+ targetType: 'filePath'
+ filePath: .\ci\coverage.ps1
diff --git a/ci/coverage.ps1 b/ci/coverage.ps1
new file mode 100644
index 0000000..ebd7cd4
--- /dev/null
+++ b/ci/coverage.ps1
@@ -0,0 +1,14 @@
+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 requiring 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
diff --git a/ci/run.ps1 b/ci/run.ps1
index aa37ee1..43e8008 100644
--- a/ci/run.ps1
+++ b/ci/run.ps1
@@ -98,21 +98,4 @@ echo "=== Start running tests ==="
# does that by default so we need to forward it.
cmd /c "python 2>&1 ./tools/run_with_cov.py run_tests.py --backend $env:backend $env:extraargs"
-$result = $LastExitCode
-
-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 requiring 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
-
-exit $result
+exit $LastExitCode