2012-10-26 13:21:45 -04:00
|
|
|
[tox]
|
2015-09-21 16:11:55 +02:00
|
|
|
envlist = py34,py27,pep8,checkbuild,checklinks
|
2013-12-09 15:27:35 +02:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
2012-09-04 21:07:13 -05:00
|
|
|
|
2012-10-26 13:21:45 -04:00
|
|
|
[testenv]
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2013-12-09 15:27:35 +02:00
|
|
|
usedevelop = True
|
2016-03-29 12:07:14 -04:00
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
|
2013-06-03 18:42:06 -04:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2015-11-16 14:11:00 -06:00
|
|
|
commands = find ./trove -type f -name "*.pyc" -delete
|
2015-10-14 15:07:59 -05:00
|
|
|
{envpython} run_tests.py
|
2014-08-21 16:03:36 -04:00
|
|
|
python setup.py testr --slowest
|
2014-11-17 13:51:24 -06:00
|
|
|
{envpython} generate_examples.py
|
2014-03-31 22:34:57 +02:00
|
|
|
whitelist_externals = bash
|
2015-11-17 10:08:28 +09:00
|
|
|
find
|
2012-05-23 09:32:49 -05:00
|
|
|
|
2012-10-26 13:21:45 -04:00
|
|
|
[tox:jenkins]
|
|
|
|
sitepackages = True
|
|
|
|
|
|
|
|
[testenv:pep8]
|
2014-03-31 22:34:57 +02:00
|
|
|
commands =
|
|
|
|
flake8
|
|
|
|
# Check that .po and .pot files are valid:
|
|
|
|
bash -c "find trove -type f -regex '.*\.pot?' -print0 | \
|
|
|
|
xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
2012-10-26 13:21:45 -04:00
|
|
|
|
2016-02-11 15:25:07 +01:00
|
|
|
[testenv:py34]
|
2016-07-18 17:27:36 +00:00
|
|
|
commands = rm -f .testrepository/times.dbm
|
|
|
|
ostestr --blacklist_file=blacklist-py3.txt --serial
|
|
|
|
whitelist_externals = rm
|
2016-05-02 21:17:17 +02:00
|
|
|
|
2016-02-11 15:25:07 +01:00
|
|
|
|
2016-01-09 17:26:33 +08:00
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2012-10-26 13:21:45 -04:00
|
|
|
[testenv:cover]
|
2013-02-12 11:21:30 -06:00
|
|
|
basepython = python2.7
|
2012-11-16 11:50:34 -06:00
|
|
|
commands =
|
2013-01-23 11:46:29 -08:00
|
|
|
coverage erase
|
2013-02-28 11:02:50 -08:00
|
|
|
python setup.py testr --coverage
|
2013-03-06 18:24:17 -06:00
|
|
|
coverage run -a run_tests.py
|
|
|
|
coverage html
|
2015-07-10 16:43:17 -05:00
|
|
|
coverage xml
|
2013-01-23 11:46:29 -08:00
|
|
|
coverage report
|
2012-11-16 11:50:34 -06:00
|
|
|
|
2012-05-23 09:32:49 -05:00
|
|
|
|
2012-10-26 13:21:45 -04:00
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
2013-05-16 10:07:14 -07:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
show-source = True
|
2015-05-20 19:53:12 +00:00
|
|
|
# H301 is ignored on purpose.
|
2014-10-22 20:50:38 +02:00
|
|
|
# The rest of the ignores are TODOs.
|
2015-07-16 11:11:30 +08:00
|
|
|
ignore = F821,H237,H238,H301,H404,H405,H501
|
2013-05-16 10:07:14 -07:00
|
|
|
builtins = _
|
2016-04-20 15:34:08 +02:00
|
|
|
exclude=.venv,.tox,.git,dist,doc,openstack,*egg,tools,etc,build,*.po,*.pot
|
2013-08-22 10:01:42 -05:00
|
|
|
filename=*.py,trove-*
|
2014-04-24 14:41:40 -05:00
|
|
|
|
2016-08-17 13:27:51 -04:00
|
|
|
[testenv:api-ref]
|
|
|
|
# This environment is called from CI scripts to test and publish
|
|
|
|
# the API Ref to developer.openstack.org.
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
whitelist_externals = rm
|
|
|
|
|
2015-11-03 17:43:44 -06:00
|
|
|
[testenv:releasenotes]
|
2015-12-02 13:13:19 -06:00
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2016-02-22 09:33:58 -05:00
|
|
|
|
|
|
|
[testenv:bandit]
|
|
|
|
commands = bandit -r trove -n5 -x tests
|
2016-06-16 15:20:28 +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
|