mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
239 lines
7.7 KiB
INI
239 lines
7.7 KiB
INI
[tox]
|
|
envlist =
|
|
py{27,34,35,36},
|
|
py{27,34,35,36}-coverage,
|
|
py{27,34,35,36}-pytest,
|
|
py{27,34,35,36}-runtests,
|
|
py{27,34,35,36}-pytest-coverage,
|
|
py{27,34,35,36}-runtests-coverage,
|
|
pylint-salt,
|
|
pylint-tests
|
|
skip_missing_interpreters = True
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
deps = -Ur{toxinidir}/requirements/tests.txt
|
|
changedir = {toxinidir}
|
|
commands_pre = {envpython} tests/tox-helper.py create-dirs
|
|
passenv = LANG HOME
|
|
sitepackages = True
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:runtests]
|
|
deps =
|
|
{[testenv]deps}
|
|
unittest-xml-reporting
|
|
commands = {envpython} {toxinidir}/tests/runtests.py --tests-logfile={toxinidir}/artifacts/logs/runtests.log {posargs}
|
|
|
|
[testenv:pytest]
|
|
commands = pytest --rootdir {toxinidir} --log-file={toxinidir}/artifacts/logs/runtests.log {posargs}
|
|
|
|
[testenv:runtests-coverage]
|
|
# Add tests/support/coverage to PYTHONPATH in order to get code coverage from subprocesses.
|
|
# Additional, set the COVERAGE_PROCESS_START environment variable so that the coverage library
|
|
# knows it's supposed to track subprocesses.
|
|
setenv =
|
|
PYTHONPATH={toxinidir}/tests/support/coverage
|
|
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
|
commands_pre =
|
|
- coverage erase
|
|
commands =
|
|
coverage run -m tests.runtests {posargs}
|
|
commands_post =
|
|
- coverage combine
|
|
- coverage xml -o {toxinidir}/artifacts/coverage/coverage.xml
|
|
|
|
[testenv:pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands = coverage run -m py.test --rootdir {toxinidir} {posargs}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py2-pytest]
|
|
commands = {[testenv:pytest]commands}
|
|
|
|
[testenv:py2-runtests]
|
|
deps = {[testenv:runtests]deps}
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:py2-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py2-runtests-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py2-pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:pytest-coverage]commands}
|
|
commands_pre = {[testenv:pytest-coverage]commands_pre}
|
|
commands_post = {[testenv:pytest-coverage]commands_post}
|
|
|
|
[testenv:py27-pytest]
|
|
commands = {[testenv:pytest]commands}
|
|
|
|
[testenv:py27-runtests]
|
|
deps = {[testenv:runtests]deps}
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:py27-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py27-runtests-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py27-pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:pytest-coverage]commands}
|
|
commands_pre = {[testenv:pytest-coverage]commands_pre}
|
|
commands_post = {[testenv:pytest-coverage]commands_post}
|
|
|
|
[testenv:py3-pytest]
|
|
commands = {[testenv:pytest]commands}
|
|
|
|
[testenv:py3-runtests]
|
|
deps = {[testenv:runtests]deps}
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:py3-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py3-runtests-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py3-pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:pytest-coverage]commands}
|
|
commands_pre = {[testenv:pytest-coverage]commands_pre}
|
|
commands_post = {[testenv:pytest-coverage]commands_post}
|
|
|
|
|
|
[testenv:py34-pytest]
|
|
commands = {[testenv:pytest]commands}
|
|
|
|
[testenv:py34-runtests]
|
|
deps = {[testenv:runtests]deps}
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:py34-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py34-runtests-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py34-pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:pytest-coverage]commands}
|
|
commands_pre = {[testenv:pytest-coverage]commands_pre}
|
|
commands_post = {[testenv:pytest-coverage]commands_post}
|
|
|
|
|
|
[testenv:py35-pytest]
|
|
commands = {[testenv:pytest]commands}
|
|
|
|
[testenv:py35-runtests]
|
|
deps = {[testenv:runtests]deps}
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:py35-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py35-runtests-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py35-pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:pytest-coverage]commands}
|
|
commands_pre = {[testenv:pytest-coverage]commands_pre}
|
|
commands_post = {[testenv:pytest-coverage]commands_post}
|
|
|
|
|
|
[testenv:py36-pytest]
|
|
commands = {[testenv:pytest]commands}
|
|
|
|
[testenv:py36-runtests]
|
|
deps = {[testenv:runtests]deps}
|
|
commands = {[testenv:runtests]commands}
|
|
|
|
[testenv:py36-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py36-runtests-coverage]
|
|
deps = {[testenv:runtests]deps}
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:runtests-coverage]commands}
|
|
commands_pre = {[testenv:runtests-coverage]commands_pre}
|
|
commands_post = {[testenv:runtests-coverage]commands_post}
|
|
|
|
[testenv:py36-pytest-coverage]
|
|
setenv = {[testenv:runtests-coverage]setenv}
|
|
commands = {[testenv:pytest-coverage]commands}
|
|
commands_pre = {[testenv:pytest-coverage]commands_pre}
|
|
commands_post = {[testenv:pytest-coverage]commands_post}
|
|
|
|
|
|
[testenv:pylint-salt]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/dev.txt
|
|
commands =
|
|
pylint --version
|
|
pylint --rcfile=.testing.pylintrc --disable=I,W1307,C0411,C0413,W8410,str-format-in-logging {posargs:setup.py salt/}
|
|
sitepackages = False
|
|
|
|
|
|
[testenv:pylint-tests]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/dev.txt
|
|
commands =
|
|
pylint --version
|
|
pylint --rcfile=.testing.pylintrc --disable=I,W0232,E1002,W1307,C0411,C0413,W8410,str-format-in-logging {posargs:tests/}
|
|
sitepackages = False
|
|
|
|
[pytest]
|
|
addopts = --no-print-logs --ssh-tests -ra -sv
|
|
testpaths = tests
|
|
norecursedirs = tests/kitchen
|