summary refs log tree commit diff
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini29
1 files changed, 22 insertions, 7 deletions
diff --git a/tox.ini b/tox.ini

index 03ddaeb0b7..a0f5486829 100644 --- a/tox.ini +++ b/tox.ini
@@ -7,9 +7,7 @@ deps = mock python-subunit junitxml - - # needed by some of the tests - lxml + coverage # cyptography 2.2 requires setuptools >= 18.5 # @@ -27,10 +25,15 @@ deps = setenv = PYTHONDONTWRITEBYTECODE = no_byte_code + COVERAGE_PROCESS_START = {toxinidir}/.coveragerc [testenv] deps = {[base]deps} +extras = all + +whitelist_externals = + sh setenv = {[base]setenv} @@ -39,7 +42,9 @@ passenv = * commands = /usr/bin/find "{toxinidir}" -name '*.pyc' -delete - "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} + # Add this so that coverage will run on subprocesses + sh -c 'echo "import coverage; coverage.process_startup()" > {envsitepackagesdir}/../sitecustomize.py' + {envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} [testenv:py27] @@ -70,7 +75,7 @@ usedevelop=true usedevelop=true deps = {[base]deps} - psycopg2 + psycopg2 setenv = {[base]setenv} SYNAPSE_POSTGRES = 1 @@ -105,13 +110,14 @@ usedevelop=true usedevelop=true deps = {[base]deps} - psycopg2 + psycopg2 setenv = {[base]setenv} SYNAPSE_POSTGRES = 1 [testenv:packaging] +skip_install=True deps = check-manifest commands = @@ -127,7 +133,7 @@ commands = /bin/sh -c "flake8 synapse tests scripts scripts-dev scripts/hash_pas [testenv:check_isort] skip_install = True deps = isort -commands = /bin/sh -c "isort -c -sp setup.cfg -rc synapse tests" +commands = /bin/sh -c "isort -c -df -sp setup.cfg -rc synapse tests" [testenv:check-newsfragment] skip_install = True @@ -135,3 +141,12 @@ deps = towncrier>=18.6.0rc1 commands = python -m towncrier.check --compare-with=origin/develop basepython = python3.6 + +[testenv:codecov] +skip_install = True +deps = + coverage + codecov +commands = + coverage combine + codecov -X gcov