salt/tox.ini

236 lines
7.5 KiB
INI
Raw Normal View History

2017-10-03 22:13:54 +00:00
[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
2018-07-06 17:44:47 +00:00
skip_missing_interpreters = True
skipsdist = True
2017-10-03 22:13:54 +00:00
[testenv]
2018-07-10 20:42:50 +00:00
deps = -Ur{toxinidir}/requirements/tests.txt
changedir = {toxinidir}
commands_pre = {envpython} tests/tox-helper.py create-dirs
2018-06-06 17:23:55 +00:00
passenv = LANG HOME
2018-07-06 17:44:47 +00:00
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]
2019-01-25 12:58:52 +00:00
# Add tests/support/coverage to PYTHONPATH in order to get code coverage from subprocesses.
setenv =
PYTHONPATH={toxinidir}/tests/support/coverage
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]
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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]
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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]
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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]
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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]
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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]
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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}
2019-01-25 12:58:52 +00:00
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]
2019-01-25 12:58:52 +00:00
setenv = {[testenv:runtests-coverage]setenv}
commands = {[testenv:pytest-coverage]commands}
commands_pre = {[testenv:pytest-coverage]commands_pre}
commands_post = {[testenv:pytest-coverage]commands_post}
2018-06-07 17:48:07 +00:00
[testenv:pylint-salt]
basepython = python2.7
deps = -r{toxinidir}/requirements/dev.txt
commands =
pylint --version
2018-07-18 16:09:20 +00:00
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
2018-07-18 16:09:20 +00:00
pylint --rcfile=.testing.pylintrc --disable=I,W0232,E1002,W1307,C0411,C0413,W8410,str-format-in-logging {posargs:tests/}
sitepackages = False
2018-06-07 17:48:07 +00:00
[pytest]
addopts = --no-print-logs --ssh-tests -ra -sv
2018-06-07 17:48:07 +00:00
testpaths = tests
norecursedirs = tests/kitchen