2012-05-08 17:39:08 -04:00
|
|
|
[tox]
|
2017-02-08 14:51:57 +08:00
|
|
|
envlist = py35,py27,pep8
|
2013-12-09 13:53:45 +01:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
2012-05-08 17:39:08 -04:00
|
|
|
|
|
|
|
[testenv]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2016-07-28 22:00:29 +00:00
|
|
|
OS_TEST_PATH=heat/tests
|
|
|
|
TESTR_START_DIR=heat/tests
|
2013-12-09 13:53:45 +01:00
|
|
|
usedevelop = True
|
2016-07-27 14:07:00 +08:00
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2013-05-15 21:48:36 -07:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2013-04-24 20:07:37 -07:00
|
|
|
commands =
|
2016-09-16 12:32:12 +05:30
|
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
2017-02-20 20:51:24 +00:00
|
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
2013-09-09 18:02:49 -05:00
|
|
|
|
2014-12-10 21:04:01 +02:00
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
find
|
2016-01-13 18:06:07 +08:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2014-03-31 21:39:28 +02:00
|
|
|
|
2014-12-25 17:35:26 +02:00
|
|
|
[testenv:py27log]
|
|
|
|
commands =
|
2016-09-16 12:32:12 +05:30
|
|
|
find . -type f -name "*.py[c|o]" -delete
|
2017-04-06 11:41:35 -07:00
|
|
|
ostestr '^(?!heat_integrationtests){posargs}'
|
2014-12-25 17:35:26 +02:00
|
|
|
|
2012-05-08 17:39:08 -04:00
|
|
|
[testenv:pep8]
|
2013-07-10 16:01:00 +02:00
|
|
|
commands =
|
2015-08-25 11:18:05 +12:00
|
|
|
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
|
2016-02-18 12:50:29 +03:00
|
|
|
python tools/custom_guidelines.py --exclude heat/engine/resources/aws
|
2017-03-10 15:32:31 -08:00
|
|
|
# The following bandit tests are being skipped:
|
|
|
|
# B101: Test for use of assert
|
|
|
|
# B104: Test for binding to all interfaces
|
|
|
|
# B107: Test for use of hard-coded password argument defaults
|
|
|
|
# B110: Try, Except, Pass detected.
|
|
|
|
# B310: Audit url open for permitted schemes
|
|
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes
|
|
|
|
# B404: Import of subprocess module
|
|
|
|
# B410: Import of lxml module
|
|
|
|
# B504: Test for SSL use with no version specified
|
|
|
|
# B506: Test for use of yaml load
|
|
|
|
# B603: Test for use of subprocess with shell equals true
|
|
|
|
# B607: Test for starting a process with a partial path
|
|
|
|
bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
|
2012-05-08 17:39:08 -04:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2012-05-17 16:02:04 -04:00
|
|
|
[testenv:cover]
|
2013-04-24 20:07:37 -07:00
|
|
|
commands =
|
2014-12-10 10:44:44 +08:00
|
|
|
python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}'
|
2016-12-30 16:56:00 +08:00
|
|
|
coverage report
|
2013-05-11 14:26:42 -04:00
|
|
|
|
2013-08-23 12:09:58 +10:00
|
|
|
[testenv:docs]
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
sphinxcontrib-httpdomain
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
2016-05-04 15:23:15 -04:00
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
|
|
|
# the API Ref to developer.openstack.org.
|
|
|
|
whitelist_externals = bash
|
|
|
|
rm
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
2017-03-04 09:30:53 +01:00
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
2016-05-04 15:23:15 -04:00
|
|
|
|
2014-10-14 21:17:52 +01:00
|
|
|
[testenv:genconfig]
|
2015-02-04 00:01:26 +05:30
|
|
|
commands =
|
|
|
|
oslo-config-generator --config-file=config-generator.conf
|
2014-10-14 21:17:52 +01:00
|
|
|
|
2015-07-07 18:14:15 -04:00
|
|
|
[testenv:bandit]
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2017-03-10 15:32:31 -08:00
|
|
|
# The following bandit tests are being skipped:
|
|
|
|
# B101: Test for use of assert
|
|
|
|
# B104: Test for binding to all interfaces
|
|
|
|
# B107: Test for use of hard-coded password argument defaults
|
|
|
|
# B110: Try, Except, Pass detected.
|
|
|
|
# B310: Audit url open for permitted schemes
|
|
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purposes
|
|
|
|
# B404: Import of subprocess module
|
|
|
|
# B410: Import of lxml module
|
|
|
|
# B504: Test for SSL use with no version specified
|
|
|
|
# B506: Test for use of yaml load
|
|
|
|
# B603: Test for use of subprocess with shell equals true
|
|
|
|
# B607: Test for starting a process with a partial path
|
|
|
|
commands = bandit -r heat -x tests --skip B101,B104,B107,B110,B310,B311,B404,B410,B504,B506,B603,B607
|
2015-04-23 14:57:28 +05:30
|
|
|
|
2013-05-11 14:26:42 -04:00
|
|
|
[flake8]
|
|
|
|
show-source = true
|
2016-10-09 03:27:07 +05:30
|
|
|
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
|
2014-12-10 20:26:58 +08:00
|
|
|
max-complexity=20
|
2014-10-21 16:11:34 +08:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions = heat.common.i18n
|
2016-03-18 20:29:18 +08:00
|
|
|
local-check-factory = heat.hacking.checks.factory
|
2015-08-19 11:20:54 -04:00
|
|
|
|
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
2015-11-25 20:43:50 +08:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2016-06-03 17:50:26 +02:00
|
|
|
|
|
|
|
[testenv:install-guide]
|
|
|
|
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|