2017-10-03 22:13:54 +00:00
|
|
|
[tox]
|
2019-01-21 18:18:58 +00:00
|
|
|
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
|
2019-01-21 18:18:58 +00:00
|
|
|
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
|
2019-01-21 18:18:58 +00:00
|
|
|
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
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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}
|
2019-01-21 18:18:58 +00:00
|
|
|
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
|
|
|
|
2018-07-06 18:35:06 +00:00
|
|
|
[testenv:pylint-salt]
|
2018-07-06 18:24:07 +00:00
|
|
|
basepython = python2.7
|
|
|
|
deps = -r{toxinidir}/requirements/dev.txt
|
|
|
|
commands =
|
2018-07-06 18:35:06 +00:00
|
|
|
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/}
|
2018-07-06 18:35:06 +00:00
|
|
|
sitepackages = False
|
|
|
|
|
2019-01-21 18:18:58 +00:00
|
|
|
|
2018-07-06 18:35:06 +00:00
|
|
|
[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/}
|
2018-07-06 18:24:07 +00:00
|
|
|
sitepackages = False
|
|
|
|
|
2018-06-07 17:48:07 +00:00
|
|
|
[pytest]
|
2019-01-21 18:18:58 +00:00
|
|
|
addopts = --no-print-logs --ssh-tests -ra -sv
|
2018-06-07 17:48:07 +00:00
|
|
|
testpaths = tests
|
|
|
|
norecursedirs = tests/kitchen
|