ironic/tox.ini
Jay Faulkner 4da03e0faf Add a basic install guide
This installs the basic directories and content pointing to the current
Ironic Installation Guide. Simply having this in our repo will not lead
to it being published, this is only the first step. Having these items
in our repository is a good first step to building out our install
guide.

Change-Id: I6a0e69bd3b6f5074ae61505f82f27bcf9df84bab
Partial-bug: #1612278
2016-09-07 08:40:48 -04:00

96 lines
2.8 KiB
INI

[tox]
minversion = 1.8
skipsdist = True
envlist = py35,py34,py27,pep8
[testenv]
usedevelop = True
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
TESTS_DIR=./ironic/tests/unit/
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:genstates]
deps = {[testenv]deps}
pydot2
commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/states.svg --format svg
[testenv:pep8]
whitelist_externals = bash
commands =
bash tools/flake8wrap.sh {posargs}
# Run bashate during pep8 runs to ensure violations are caught by
# the check and gate queues.
{toxinidir}/tools/run_bashate.sh {toxinidir}/devstack
# Check that .po and .pot files are valid:
bash -c "find ironic -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
# Check the *.rst files
doc8 README.rst CONTRIBUTING.rst doc/source install-guide/ --ignore D001
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US
commands =
coverage erase
python setup.py testr --coverage --omit='*test*' --testr-args='{posargs}'
coverage report --omit='*test*'
[testenv:checkconfig]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
{toxinidir}/tools/config/check_uptodate.sh
[testenv:genconfig]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslo-config-generator --config-file=tools/config/ironic-config-generator.conf
[testenv:genpolicy]
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslopolicy-sample-generator --namespace=ironic.api --output-file=etc/ironic/policy.json.sample
[testenv:debug]
commands = oslo_debug_helper -t ironic/tests/unit {posargs}
[testenv:docs]
setenv = PYTHONHASHSEED=0
sitepackages = False
envdir = {toxworkdir}/venv
commands =
python setup.py build_sphinx
[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
whitelist_externals = bash
commands =
bash -c '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 -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:install-guide]
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
[testenv:venv]
setenv = PYTHONHASHSEED=0
commands = {posargs}
[flake8]
ignore = E129
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
max-complexity=17
[hacking]
import_exceptions = testtools.matchers, ironic.common.i18n