Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox: add generic xdist factor #4753

Merged
merged 1 commit into from
Feb 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ envlist =

[testenv]
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 report
passenv = USER USERNAME COVERAGE_* TRAVIS
setenv =
_PYTEST_TOX_ARGS=--lsof
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suspect this needs a comment that taking off lsoff for xdist is intended

we still need some thing to run lsoff against tho

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--lsof was not used with the previous py27-xdist / py37-xdist jobs, that's why I've removed it here. Will try to keep it in general.

# 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_EXTRA_DEP=coverage-enable-subprocess
coverage: COVERAGE_FILE={toxinidir}/.coverage
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
xdist: _PYTEST_TOX_ARGS={env:_PYTEST_TOX_ARGS:-n auto}
extras = testing
deps =
xdist: pytest-xdist>=1.13
{env:_PYTEST_TOX_EXTRA_DEP:}

[testenv:py27-subprocess]
Expand All @@ -49,22 +52,6 @@ basepython = python3
deps = pre-commit>=1.11.0
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]
platform = linux|darwin
deps =
Expand Down