summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-02-27 23:14:58 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-03-04 20:24:23 +0900
commit8e87af7a77c68de0ce1428d425ff6e76d11c1c38 (patch)
tree2fcd48ede6fc6145908af809501816920ffb247d /tox.ini
parenteb6d169033c73b80b943c281c6002761146f2393 (diff)
downloadbuildstream-8e87af7a77c68de0ce1428d425ff6e76d11c1c38.tar.gz
tox.ini: Support running tests without coverage present at all
This change simply makes it possible to run the tests without coverage and without any coverage related dependencies present in the tox venvs. To run tests without coverage, simply choose the python version and append "-nocover" to the env name, e.g.: tox -e py36-nocover
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini20
1 files changed, 13 insertions, 7 deletions
diff --git a/tox.ini b/tox.ini
index a54dc55b1..78e491973 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,14 +12,20 @@ skip_missing_interpreters = true
#
[testenv]
commands =
- pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
- - mkdir -p .coverage-reports
- - mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+ # Running with coverage reporting enabled
+ py{35,36,37}-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
+ py{35,36,37}-!nocover: mkdir -p .coverage-reports
+ py{35,36,37}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+
+ # Running with coverage reporting disabled
+ py{35,36,37}-nocover: pytest --basetemp {envtmpdir} {posargs}
deps =
- -rrequirements/requirements.txt
- -rrequirements/dev-requirements.txt
- -rrequirements/cov-requirements.txt
- -rrequirements/plugin-requirements.txt
+ py{35,36,37}: -rrequirements/requirements.txt
+ py{35,36,37}: -rrequirements/dev-requirements.txt
+ py{35,36,37}: -rrequirements/plugin-requirements.txt
+
+ # Only require coverage and pytest-cov when using it
+ !nocover: -rrequirements/cov-requirements.txt
passenv =
BST_FORCE_BACKEND
GI_TYPELIB_PATH