Merge pull request #4753 from blueyed/tox-xdist
tox: add generic xdist factor
This commit is contained in:
commit
31c948184a
21
tox.ini
21
tox.ini
|
@ -20,18 +20,21 @@ envlist =
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
commands =
|
||||||
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof {posargs}
|
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {env:_PYTEST_TOX_ARGS:} {posargs}
|
||||||
coverage: coverage combine
|
coverage: coverage combine
|
||||||
coverage: coverage report
|
coverage: coverage report
|
||||||
passenv = USER USERNAME COVERAGE_* TRAVIS
|
passenv = USER USERNAME COVERAGE_* TRAVIS
|
||||||
setenv =
|
setenv =
|
||||||
|
_PYTEST_TOX_ARGS=--lsof
|
||||||
# configuration if a user runs tox with a "coverage" factor, for example "tox -e py37-coverage"
|
# configuration if a user runs tox with a "coverage" factor, for example "tox -e py37-coverage"
|
||||||
coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -m
|
coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -m
|
||||||
coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
|
coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
|
||||||
coverage: COVERAGE_FILE={toxinidir}/.coverage
|
coverage: COVERAGE_FILE={toxinidir}/.coverage
|
||||||
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
||||||
|
xdist: _PYTEST_TOX_ARGS={env:_PYTEST_TOX_ARGS:-n auto}
|
||||||
extras = testing
|
extras = testing
|
||||||
deps =
|
deps =
|
||||||
|
xdist: pytest-xdist>=1.13
|
||||||
{env:_PYTEST_TOX_EXTRA_DEP:}
|
{env:_PYTEST_TOX_EXTRA_DEP:}
|
||||||
|
|
||||||
[testenv:py27-subprocess]
|
[testenv:py27-subprocess]
|
||||||
|
@ -49,22 +52,6 @@ basepython = python3
|
||||||
deps = pre-commit>=1.11.0
|
deps = pre-commit>=1.11.0
|
||||||
commands = pre-commit run --all-files --show-diff-on-failure
|
commands = pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
||||||
[testenv:py27-xdist]
|
|
||||||
extras = testing
|
|
||||||
deps =
|
|
||||||
pytest-xdist>=1.13
|
|
||||||
{env:_PYTEST_TOX_EXTRA_DEP:}
|
|
||||||
commands =
|
|
||||||
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto {posargs}
|
|
||||||
|
|
||||||
[testenv:py37-xdist]
|
|
||||||
# NOTE: copied from above due to https://github.com/tox-dev/tox/issues/706.
|
|
||||||
extras = testing
|
|
||||||
deps =
|
|
||||||
pytest-xdist>=1.13
|
|
||||||
{env:_PYTEST_TOX_EXTRA_DEP:}
|
|
||||||
commands = {[testenv:py27-xdist]commands}
|
|
||||||
|
|
||||||
[testenv:py27-pexpect]
|
[testenv:py27-pexpect]
|
||||||
platform = linux|darwin
|
platform = linux|darwin
|
||||||
deps =
|
deps =
|
||||||
|
|
Loading…
Reference in New Issue