heat/tox.ini
Pavlo Shchelokovskyy 94a7ec73fc Remove *.pyc files on every tox run
As we start actively moving the code around (e.g. for resources
decoupling) stale *.pyc files might lead to cryptic failures when running
tox locally (and not from the freshly cloned repo as OpenStack Infra
does).
tox installs the package being tested in venv using development mode,
thus the actually tested code is from the repo working tree, so it is
beneficial to have it cleaned from pyc files before the test run.
Now removed run_tests.sh also had similar feature, but for DB migrations
only.

The files from .tox dir are left in place, as that might speedup the
tests run somewhat.

Change-Id: I91adfbc806111e2ab023199c5dea1ea7ebeca5da
2014-12-15 10:56:38 +02:00

60 lines
1.7 KiB
INI

[tox]
envlist = py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
# Note the hash seed is set to 0 until heat can be tested with a
# random hash seed successfully.
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
usedevelop = True
install_command = pip install {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.pyc' -delete
python setup.py testr --slowest --testr-args='^(?!heat_integrationtests){posargs}'
whitelist_externals =
bash
find
[testenv:integration]
commands =
python setup.py testr --slowest --testr-args='--concurrency=1 ^heat_integrationtests{posargs}'
[testenv:pep8]
commands =
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests
# Check that .po and .pot files are valid:
bash -c "find heat -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}'
[testenv:docs]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
sphinxcontrib-httpdomain
commands = python setup.py build_sphinx
[testenv:genconfig]
commands =
bash tools/config/generate_sample.sh -b . -p heat -o etc/heat
[flake8]
# H404 multi line docstring should start with a summary
# H803 no full stop at the end of the commit message
ignore = H404,H803
show-source = true
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
max-complexity=20
[hacking]
import_exceptions = heat.common.i18n