Skip to content

Commit 5b3863a

Browse files
authored
Merge pull request #112 from common-workflow-language/tweak-cov
exclude tests from coverage report
2 parents 5b0b019 + ffc3367 commit 5b3863a

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

Makefile

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ MODULE=schema_salad
2727
# `[[` conditional expressions.
2828
PYSOURCES=$(wildcard ${MODULE}/**.py tests/*.py) setup.py
2929
DEVPKGS=pep8 diff_cover autopep8 pylint coverage pep257 pytest flake8
30+
COVBASE=coverage run --branch --append --source=${MODULE} \
31+
--omit=schema_salad/tests/*
3032

3133
VERSION=$(shell git describe --tags --dirty | sed s/v//)
3234

@@ -103,37 +105,31 @@ diff_pylint_report: pylint_report.txt
103105
diff-quality --violations=pylint pylint_report.txt
104106

105107
.coverage: $(PYSOURCES)
106-
coverage run --branch --source=${MODULE} setup.py test
107-
coverage run --append --branch --source=${MODULE} \
108-
-m schema_salad.main \
108+
rm -f .coverage
109+
$(COVBASE) setup.py test
110+
$(COVBASE) -m schema_salad.main \
109111
--print-jsonld-context schema_salad/metaschema/metaschema.yml \
110112
> /dev/null
111-
coverage run --append --branch --source=${MODULE} \
112-
-m schema_salad.main \
113+
$(COVBASE) -m schema_salad.main \
113114
--print-rdfs schema_salad/metaschema/metaschema.yml \
114115
> /dev/null
115-
coverage run --append --branch --source=${MODULE} \
116-
-m schema_salad.main \
116+
$(COVBASE) -m schema_salad.main \
117117
--print-avro schema_salad/metaschema/metaschema.yml \
118118
> /dev/null
119-
coverage run --append --branch --source=${MODULE} \
120-
-m schema_salad.main \
119+
$(COVBASE) -m schema_salad.main \
121120
--print-rdf schema_salad/metaschema/metaschema.yml \
122121
> /dev/null
123-
coverage run --append --branch --source=${MODULE} \
124-
-m schema_salad.main \
122+
$(COVBASE) -m schema_salad.main \
125123
--print-pre schema_salad/metaschema/metaschema.yml \
126124
> /dev/null
127-
coverage run --append --branch --source=${MODULE} \
128-
-m schema_salad.main \
125+
$(COVBASE) -m schema_salad.main \
129126
--print-index schema_salad/metaschema/metaschema.yml \
130127
> /dev/null
131-
coverage run --append --branch --source=${MODULE} \
132-
-m schema_salad.main \
128+
$(COVBASE) -m schema_salad.main \
133129
--print-metadata schema_salad/metaschema/metaschema.yml \
134130
> /dev/null
135-
coverage run --append --branch --source=${MODULE} \
136-
-m schema_salad.makedoc schema_salad/metaschema/metaschema.yml \
131+
$(COVBASE) -m schema_salad.makedoc \
132+
schema_salad/metaschema/metaschema.yml \
137133
> /dev/null
138134

139135
coverage.xml: .coverage

0 commit comments

Comments
 (0)