7444891218
I found problem as follows in current tox.ini - test-requirements can not be read correctly - some os level command is not in white_list - one rst file does not follow rst syntac - fix lack of gitreview file Purpose of this review request is fixing above problems. Change-Id: I1d2b29bbc7cdc506f5187c2ef6ee03fd2b908f58
58 lines
1.7 KiB
INI
58 lines
1.7 KiB
INI
[tox]
|
|
envlist = py27,docs,pep8
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_OPENSTACK=1
|
|
NOSE_OPENSTACK_COLOR=1
|
|
NOSE_OPENSTACK_RED=0.05
|
|
NOSE_OPENSTACK_YELLOW=0.025
|
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
NOSE_OPENSTACK_STDOUT=1
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
commands=
|
|
py27: {[unit_tests]commands}
|
|
py35: {[unit_tests]commands}
|
|
whitelist_externals = find
|
|
rm
|
|
|
|
[testenv:pep8]
|
|
deps = http://tarballs.openstack.org/swift/swift-stable-queens.tar.gz
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
deps = http://tarballs.openstack.org/swift/swift-stable-queens.tar.gz
|
|
-r{toxinidir}/test-requirements.txt
|
|
setenv = SWIFT_TEST_CONFIG_FILE={toxinidir}/test/sample.conf
|
|
SWIFT_PROXY_TEST_CONFIG_FILE={toxinidir}/test/sample.proxy-server.conf
|
|
commands =
|
|
{[unit_tests]commands}
|
|
|
|
[unit_tests]
|
|
commands = find . -type f -name "*.py[c|o]" -delete
|
|
find . -type d -name "__pycache__" -delete
|
|
nosetests {posargs:test/unit}
|
|
|
|
[flake8]
|
|
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,dash_template
|
|
max-complexity = 20
|
|
|
|
[testenv:docs]
|
|
deps = http://tarballs.openstack.org/swift/swift-stable-queens.tar.gz
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = python setup.py build_sphinx
|
|
|
|
[doc8]
|
|
# File extensions to check
|
|
extensions = .rst, .yaml
|
|
# Maximal line length should be 80 but we have some overlong lines.
|
|
# Let's not get far more in.
|
|
max-line-length = 80
|
|
# Disable some doc8 checks:
|
|
# D000: Check RST validity
|
|
# - cannot handle "none" for code-block directive
|
|
ignore = D000
|