9d7f71d575
Defcore uses Tempest, which uses Test Repository. This change makes it easier for Defcore to pull functional tests from Swift and run them. Additionally, using testr allows tests to be run in parallel. Concurrency set to 1 for now, >1 causes failures for reasons that are still TBD. With switch to ostestr all the server logs are being sent to stdout which makes it completely unreadable. Suppressing the logs by default now with a flag to enable it if desired. Co-Authored-By: John Dickinson <me@not.mn> Co-Authored-By: Robert Collins <rbtcollins@hpe.com> Co-Authored-By: Matthew Oliver <matt@oliver.net.au> Co-Authored-By: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com> Change-Id: I53ef4a116996a772cf1f3abc2eb0ad60047322d5 Related-Bug: 1177924
77 lines
2.1 KiB
INI
77 lines
2.1 KiB
INI
[tox]
|
|
envlist = py34,py27,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install --allow-external netifaces --allow-insecure netifaces -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = nosetests {posargs:test/unit}
|
|
passenv = SWIFT_* *_proxy
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
NOSE_COVER_HTML=1
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:py34]
|
|
commands =
|
|
nosetests test/unit/common/test_exceptions.py
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs:swift test doc setup.py}
|
|
flake8 --filename=swift* bin
|
|
|
|
[testenv:py3pep8]
|
|
basepython = python3
|
|
install_command = echo {packages}
|
|
commands =
|
|
# Gross hack. There's no other way to get it to /not/ install swift itself
|
|
# (which triggers installing eventlet) but also get flake8 installed.
|
|
pip install flake8
|
|
flake8 swift test doc setup.py
|
|
flake8 --filename=swift* bin
|
|
|
|
[testenv:func]
|
|
commands = ./.functests {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:bandit]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -c bandit.yaml -r swift bin -n 5 -p gate
|
|
|
|
[flake8]
|
|
# it's not a bug that we aren't using all of hacking, ignore:
|
|
# F812: list comprehension redefines ...
|
|
# H101: Use TODO(NAME)
|
|
# H202: assertRaises Exception too broad
|
|
# H233: Python 3.x incompatible use of print operator
|
|
# H301: one import per line
|
|
# H306: imports not in alphabetical order (time, os)
|
|
# H401: docstring should not start with a space
|
|
# H403: multi line docstrings should end on a new line
|
|
# H404: multi line docstring should start without a leading new line
|
|
# H405: multi line docstring summary not separated with an empty line
|
|
# H501: Do not use self.__dict__ for string formatting
|
|
# H703: Multiple positional placeholders
|
|
ignore = F812,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501,H703
|
|
exclude = .venv,.tox,dist,doc,*egg
|
|
show-source = True
|