Skip to content
Snippets Groups Projects
Unverified Commit 4425efa0 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

reshuffle responsibility for different parts of coverage handling

parent dc6125be
No related branches found
No related tags found
1 merge request!147Try to fix coverage collection from nix
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#! nix-shell -i bash -p "python.withPackages (ps: [ ps.codecov ])" #! nix-shell -i bash -p "python.withPackages (ps: [ ps.codecov ])"
find ./result-doc/share/doc find ./result-doc/share/doc
cp ./result-doc/share/doc/*/.coverage.* ./ cp ./result-doc/share/doc/*/.coverage ./
python -m coverage combine
python -m coverage report python -m coverage report
python -m coverage xml python -m coverage xml
codecov --file coverage.xml codecov --file coverage.xml
...@@ -50,7 +50,7 @@ buildPythonPackage rec { ...@@ -50,7 +50,7 @@ buildPythonPackage rec {
runHook preCheck runHook preCheck
"${pyflakes}/bin/pyflakes" src/_zkapauthorizer "${pyflakes}/bin/pyflakes" src/_zkapauthorizer
ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} python -m ${if collectCoverage ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} python -m ${if collectCoverage
then "coverage run --branch --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module" then "coverage run --debug=config --module"
else "" else ""
} twisted.trial ${extraTrialArgs} ${testSuite'} } twisted.trial ${extraTrialArgs} ${testSuite'}
runHook postCheck runHook postCheck
...@@ -58,6 +58,7 @@ buildPythonPackage rec { ...@@ -58,6 +58,7 @@ buildPythonPackage rec {
postCheck = if collectCoverage postCheck = if collectCoverage
then '' then ''
python -m coverage combine
python -m coverage html python -m coverage html
mkdir -p "$doc/share/doc/${name}" mkdir -p "$doc/share/doc/${name}"
cp -vr .coverage htmlcov "$doc/share/doc/${name}" cp -vr .coverage htmlcov "$doc/share/doc/${name}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment