1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
[tox]
minversion = 1.6
envlist = py{35,27},pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals =
find
sonar-runner
commands =
find . -type f -name "*.pyc" -delete
[testenv:py27]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python2.7
commands =
{[testenv]commands}
stestr run {posargs}
stestr slowest
[testenv:py35]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python3.5
commands =
{[testenv]commands}
stestr run {posargs}
stestr slowest
[testenv:pep8]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python3
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
# TODO(stephenfin): Remove the PYTHON hack below in favour of a [coverage]
# section once we rely on coverage 4.3+
#
# https://bitbucket.org/ned/coveragepy/issues/519/
setenv =
{[testenv]setenv}
PYTHON=coverage run --source pypowervm --parallel-mode
commands =
{[testenv]commands}
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[flake8]
ignore =
exclude = .venv,.git,.tox,*egg
[hacking]
local-check-factory = pypowervm.hacking.checks.factory
[testenv:pylint]
commands = pylint pypowervm --rcfile=.pylint.rc
[testenv:sonar]
commands = sonar-runner -Dsonar.login={env:SONAR_USER:} -Dsonar.password={env:SONAR_PASSWORD:} -Dsonar.analysis.mode=incremental -Dsonar.scm-stats.enabled=false -Dsonar.scm.enabled=false -Dsonar.host.url=http://{env:SONAR_SERVER:sonar-server}:9000 -Dsonar.jdbc.url=jdbc:mysql://{env:SONAR_SERVER:sonar-server}:3306/sonar
|