3b1c7a213e
tox command shows WARNING message as follow. "WARNING:test command found but not installed in testenv" If we use "rm" command in tox.ini, we should put it in the whitelist_externals. This patch changes fix it and remove the Warning message. Change-Id: Icaf76904d4ffb95894c32af9789d9fa4e962475c Closes-Bug: #1719788
75 lines
2.1 KiB
INI
75 lines
2.1 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py35,py27,pypy,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}
|
|
OS_TEST_PATH=./karbor/tests/unit
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.utf-8
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = rm
|
|
commands =
|
|
rm -f .testrepository/times.dbm
|
|
python setup.py test --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:fullstack]
|
|
basepython = python2.7
|
|
setenv = OS_TEST_PATH=./karbor/tests/fullstack
|
|
OS_TEST_TIMEOUT=3600
|
|
commands =
|
|
oslo-config-generator --config-file etc/oslo-config-generator/karbor.conf --output-file etc/karbor.conf
|
|
python setup.py test --slowest --testr-args="--concurrency=4 {posargs}"
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py test --coverage --testr-args='{posargs}'
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
whitelist_externals = rm
|
|
commands = rm -rf doc/build
|
|
rm -rf doc/source/contributor/api
|
|
python setup.py build_sphinx
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t karbor/tests/unit {posargs}
|
|
|
|
[testenv:api-ref]
|
|
# This environment is called from CI scripts to test and publish
|
|
# the API Ref to developer.openstack.org.
|
|
whitelist_externals = rm
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:genconfig]
|
|
commands = oslo-config-generator --config-file etc/oslo-config-generator/karbor.conf
|
|
|
|
[testenv:genpolicy]
|
|
commands = oslopolicy-sample-generator --config-file=etc/karbor-policy-generator.conf
|
|
|
|
[flake8]
|
|
show-source = True
|
|
ignore =
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
|
|
|
|
[hacking]
|
|
import_exceptions = karbor.i18n
|