2012-01-31 13:45:53 -05:00
|
|
|
[tox]
|
2016-04-20 00:05:58 +00:00
|
|
|
minversion = 2.3.1
|
2013-09-23 20:26:26 -04:00
|
|
|
skipsdist = True
|
2017-04-20 21:44:08 +00:00
|
|
|
envlist = py35,py27,pep8,api-ref,docs,genconfig,genpolicy,releasenotes
|
2012-01-31 13:45:53 -05:00
|
|
|
|
|
|
|
[testenv]
|
2013-09-23 20:26:26 -04:00
|
|
|
usedevelop = True
|
2016-04-17 12:37:04 -04:00
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2012-02-28 00:46:14 -08:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2015-08-31 10:41:11 +10:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
.[ldap,memcache,mongodb]
|
2016-03-01 11:17:11 -05:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
2017-02-09 14:40:29 +01:00
|
|
|
ostestr '{posargs}'
|
2016-03-07 18:43:00 -06:00
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
find
|
2015-09-17 13:29:13 +10:00
|
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY PBR_VERSION
|
2012-01-31 13:45:53 -05:00
|
|
|
|
2016-05-23 18:07:59 -03:00
|
|
|
[testenv:api-ref]
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
2016-08-08 19:47:52 -05:00
|
|
|
whitelist_externals =
|
|
|
|
rm
|
2016-05-23 18:07:59 -03:00
|
|
|
|
2016-02-10 21:06:05 +01:00
|
|
|
[testenv:pep8]
|
2016-01-08 10:09:28 +01:00
|
|
|
deps =
|
|
|
|
.[bandit]
|
|
|
|
{[testenv]deps}
|
2014-08-13 14:25:53 +04:00
|
|
|
commands =
|
2016-01-18 20:34:03 +01:00
|
|
|
flake8
|
2016-02-10 21:06:05 +01:00
|
|
|
# Run bash8 during pep8 runs to ensure violations are caught by
|
2014-06-28 00:23:39 -07:00
|
|
|
# the check and gate queues
|
2016-08-08 18:51:24 -05:00
|
|
|
bashate devstack/plugin.sh
|
2016-01-08 10:09:28 +01:00
|
|
|
# Run security linter
|
2016-03-08 16:27:05 -08:00
|
|
|
bandit -r keystone -x tests
|
2012-01-31 13:45:53 -05:00
|
|
|
|
2016-02-17 14:00:33 -08:00
|
|
|
[testenv:bandit]
|
|
|
|
# NOTE(browne): This is required for the integration test job of the bandit
|
|
|
|
# project. Please do not remove.
|
|
|
|
deps = .[bandit]
|
2016-03-08 16:27:05 -08:00
|
|
|
commands = bandit -r keystone -x tests
|
2016-02-17 14:00:33 -08:00
|
|
|
|
2012-02-28 00:46:14 -08:00
|
|
|
[testenv:cover]
|
2016-04-17 12:37:04 -04:00
|
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
|
|
# tests conflict with coverage.
|
2016-03-01 11:17:11 -05:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
2012-02-28 00:46:14 -08:00
|
|
|
|
2016-03-17 12:14:19 -05:00
|
|
|
[testenv:patch_cover]
|
|
|
|
commands =
|
|
|
|
bash tools/cover.sh
|
|
|
|
|
2012-02-28 00:46:14 -08:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
2012-12-22 15:36:34 -06:00
|
|
|
|
2013-10-31 12:29:38 -05:00
|
|
|
[testenv:debug]
|
2016-03-01 11:17:11 -05:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
|
|
|
oslo_debug_helper {posargs}
|
2015-07-17 16:16:37 +00:00
|
|
|
passenv =
|
|
|
|
KSTEST_ADMIN_URL
|
|
|
|
KSTEST_ADMIN_USERNAME
|
|
|
|
KSTEST_ADMIN_PASSWORD
|
|
|
|
KSTEST_ADMIN_DOMAIN_ID
|
|
|
|
KSTEST_PUBLIC_URL
|
|
|
|
KSTEST_USER_USERNAME
|
|
|
|
KSTEST_USER_PASSWORD
|
|
|
|
KSTEST_USER_DOMAIN_ID
|
|
|
|
KSTEST_PROJECT_ID
|
2013-10-31 12:29:38 -05:00
|
|
|
|
2017-01-05 15:21:49 -08:00
|
|
|
[testenv:debug-py35]
|
|
|
|
basepython = python3.5
|
2016-03-17 14:22:37 -05:00
|
|
|
commands =
|
|
|
|
# Cleanup *pyc
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
|
|
|
oslo_debug_helper {posargs}
|
|
|
|
|
2015-01-27 17:05:28 +00:00
|
|
|
[testenv:functional]
|
2017-01-05 15:21:49 -08:00
|
|
|
basepython = python3.5
|
2015-07-02 11:32:29 +12:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2015-01-27 17:05:28 +00:00
|
|
|
setenv = OS_TEST_PATH=./keystone/tests/functional
|
2016-03-01 11:17:11 -05:00
|
|
|
commands =
|
|
|
|
find keystone -type f -name "*.pyc" -delete
|
|
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
2015-07-17 16:16:37 +00:00
|
|
|
passenv =
|
|
|
|
KSTEST_ADMIN_URL
|
|
|
|
KSTEST_ADMIN_USERNAME
|
|
|
|
KSTEST_ADMIN_PASSWORD
|
|
|
|
KSTEST_ADMIN_DOMAIN_ID
|
|
|
|
KSTEST_PUBLIC_URL
|
|
|
|
KSTEST_USER_USERNAME
|
|
|
|
KSTEST_USER_PASSWORD
|
|
|
|
KSTEST_USER_DOMAIN_ID
|
|
|
|
KSTEST_PROJECT_ID
|
2015-01-27 17:05:28 +00:00
|
|
|
|
2013-05-11 14:48:00 -04:00
|
|
|
[flake8]
|
2015-11-24 19:08:14 -05:00
|
|
|
filename= *.py,keystone-manage
|
2013-05-11 14:48:00 -04:00
|
|
|
show-source = true
|
2017-07-17 13:39:19 +08:00
|
|
|
enable-extensions = H203,H904
|
2013-05-23 10:50:01 -05:00
|
|
|
|
2015-10-01 00:13:00 +00:00
|
|
|
# D100: Missing docstring in public module
|
|
|
|
# D101: Missing docstring in public class
|
|
|
|
# D102: Missing docstring in public method
|
|
|
|
# D103: Missing docstring in public function
|
|
|
|
# D104: Missing docstring in public package
|
2016-06-03 08:45:45 -05:00
|
|
|
# D203: 1 blank line required before class docstring (deprecated in pep257)
|
|
|
|
ignore = D100,D101,D102,D103,D104,D203
|
2013-05-23 10:50:01 -05:00
|
|
|
|
2016-08-02 20:52:32 +08:00
|
|
|
exclude=.venv,.git,.tox,build,dist,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
|
2014-10-16 23:10:13 -07:00
|
|
|
max-complexity=24
|
2013-10-21 14:10:27 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
commands=
|
2015-07-20 22:31:45 -07:00
|
|
|
bash -c "rm -rf doc/build"
|
|
|
|
bash -c "rm -rf doc/source/api"
|
2013-10-21 14:10:27 +00:00
|
|
|
python setup.py build_sphinx
|
2014-02-11 17:12:17 -08:00
|
|
|
|
2015-11-09 03:12:37 -05:00
|
|
|
[testenv:releasenotes]
|
2015-11-25 14:28:44 -05:00
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2015-11-09 03:12:37 -05:00
|
|
|
|
2015-05-15 10:10:28 -05:00
|
|
|
[testenv:genconfig]
|
2014-08-13 09:13:04 -05:00
|
|
|
commands = oslo-config-generator --config-file=config-generator/keystone.conf
|
2013-11-29 16:46:08 +02:00
|
|
|
|
2017-03-08 22:53:24 +00:00
|
|
|
[testenv:genpolicy]
|
2017-04-21 20:20:51 +02:00
|
|
|
commands = oslopolicy-sample-generator --config-file config-generator/keystone-policy-generator.conf
|
2017-03-08 22:53:24 +00:00
|
|
|
|
2013-11-29 16:46:08 +02:00
|
|
|
[hacking]
|
2014-07-02 18:02:08 -05:00
|
|
|
import_exceptions =
|
|
|
|
keystone.i18n
|
2015-04-23 15:04:23 +00:00
|
|
|
six.moves
|
2015-07-17 06:17:30 +00:00
|
|
|
local-check-factory = keystone.tests.hacking.checks.factory
|
2016-10-29 22:26:03 +08:00
|
|
|
|
|
|
|
[testenv:bindep]
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
# separately, outside of the requirements files.
|
|
|
|
deps = bindep
|
|
|
|
commands = bindep test
|