c6919d5f03
The verification comands used by tox need at least 2.0 version. This patch aims to update tox version from 1.6 to 2.0 which should help with local running of constraints targets. Change-Id: If07beffb428af7a11549d02e83ec8800df4f84b8
110 lines
2.8 KiB
INI
110 lines
2.8 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py27,py35,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONPATH={toxinidir}/StorletSamples/python:{envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
git+git://github.com/openstack/swift.git
|
|
commands =
|
|
find . -type f -name "*.py[c|o]" -delete
|
|
find . -type d -name "__pycache__" -delete
|
|
stestr run --slowest --concurrency 1 {posargs:tests.unit}
|
|
|
|
whitelist_externals = bash
|
|
find
|
|
rm
|
|
|
|
[testenv:pep8python]
|
|
basepython = python3
|
|
commands =
|
|
flake8
|
|
flake8 --filename=* bin --exclude=bin/*.sh
|
|
|
|
[testenv:py35]
|
|
basepython = python3
|
|
commands =
|
|
nosetests -v tests/unit
|
|
|
|
[testenv:py36]
|
|
basepython = python3
|
|
commands = {[testenv:py35]commands}
|
|
|
|
[testenv:func]
|
|
basepython = python2.7
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
git+git://github.com/openstack/swift.git
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
STORLET_SAMPLE_PATH={toxinidir}/StorletSamples
|
|
CLUSTER_CONF_DIR={toxinidir}
|
|
commands = {toxinidir}/.functests jenkins
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source storlets --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:bashate]
|
|
basepython = python3
|
|
# Run bashate check for all bash scripts
|
|
# Ignores the following rules:
|
|
# E003: Indent not multiple of 4 (we prefer to use multiples of 2)
|
|
# E006: Line longer than 79 columns
|
|
commands =
|
|
bash -c "grep --recursive --binary-files=without-match \
|
|
--files-with-match '^.!.*\(ba\)\?sh$' \
|
|
--exclude-dir .tox \
|
|
--exclude-dir .git \
|
|
{toxinidir} | xargs bashate --error . --verbose --ignore=E003,E006"
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# H301: one import per line
|
|
# H306: imports not in alphabetical order (time, os)
|
|
# H404: multi line docstring should start without a leading new line
|
|
# H405: multi line docstring summary not separated with an empty line
|
|
ignore = E123,E125,H301,H306,H404,H405
|
|
show-source = True
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands =
|
|
{[testenv:pep8python]commands}
|
|
{[testenv:bashate]commands}
|
|
passenv =
|
|
HOME
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|