129 lines
4.8 KiB
INI
129 lines
4.8 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py26,py27,py33,pep8,pylint
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
sitepackages = False
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
# Use the lockutils wrapper to ensure that external locking works correctly
|
|
# NOTE(bnemec): Due to dependencies between tests in the rpc module, those
|
|
# tests cannot currently be run in parallel. Because that module is
|
|
# deprecated, spending a lot of time fixing them would not be useful.
|
|
# Since we want to test everything else in parallel, however, we need
|
|
# to do two test runs: one in parallel with everything but rpc, and one
|
|
# serialized for the rpc module.
|
|
python -m openstack.common.lockutils python setup.py test --slowest --testr-args='(?!tests.unit.rpc)tests {posargs}'
|
|
python -m openstack.common.lockutils python setup.py test --slowest --testr-args='tests.unit.rpc --concurrency=1 {posargs}'
|
|
{toxinidir}/tools/config/generate_sample.sh -p openstack
|
|
|
|
# As long as we are filtering tests based on whether they run in parallel or
|
|
# not, it will not be possible to specify tests for tox to run by using the
|
|
# normal "tox -e py27 -- test_name". The "all" target allows that behavior
|
|
# to be used again: tox -e all -- test_name
|
|
[testenv:all]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
commands = python -m openstack.common.lockutils python setup.py test --slowest --testr-args='{posargs}'
|
|
|
|
[flake8]
|
|
show-source = True
|
|
ignore = H803
|
|
exclude = .venv,.tox,dist,doc,*.egg,.update-venv
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 {posargs}
|
|
python ./tools/check_maintainers.py
|
|
|
|
[testenv:pylint]
|
|
deps = pylint>=0.26.0
|
|
commands = python ./tools/lint.py ./openstack
|
|
python ./tools/lint.py ./tests
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
commands =
|
|
# due to dependencies between tests (bug 1192207) we use `--concurrency=1` option
|
|
# Use the lockutils wrapper to ensure that external locking works correctly
|
|
python -m openstack.common.lockutils python setup.py test --coverage --testr-args='--concurrency=1 {posargs}'
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:py33]
|
|
deps = -r{toxinidir}/requirements-py3.txt
|
|
-r{toxinidir}/test-requirements-py3.txt
|
|
setenv = PYTHONHASHSEED=0
|
|
commands =
|
|
python -m openstack.common.lockutils \
|
|
python -m testtools.run \
|
|
tests.unit.apiclient.test_auth \
|
|
tests.unit.apiclient.test_base \
|
|
tests.unit.apiclient.test_client \
|
|
tests.unit.apiclient.test_exceptions \
|
|
tests.unit.cache.test_cache \
|
|
tests.unit.cache.test_memory \
|
|
tests.unit.config.test_generator \
|
|
tests.unit.crypto.test_utils \
|
|
tests.unit.db.sqlalchemy.test_models \
|
|
tests.unit.db.sqlalchemy.test_options \
|
|
tests.unit.db.test_api \
|
|
tests.unit.fixture.test_config \
|
|
tests.unit.fixture.test_logging \
|
|
tests.unit.fixture.test_mockpatch \
|
|
tests.unit.middleware.test_catch_errors \
|
|
tests.unit.middleware.test_correlation_id \
|
|
tests.unit.middleware.test_notifier \
|
|
tests.unit.middleware.test_request_id \
|
|
tests.unit.middleware.test_sizelimit \
|
|
tests.unit.reports.test_base_report \
|
|
tests.unit.reports.test_guru_meditation_report \
|
|
tests.unit.reports.test_openstack_generators \
|
|
tests.unit.reports.test_views \
|
|
tests.unit.rpc.test_dispatcher \
|
|
tests.unit.scheduler.test_base_filter \
|
|
tests.unit.scheduler.test_host_filters \
|
|
tests.unit.scheduler.test_weights \
|
|
tests.unit.test_cfgfilter \
|
|
tests.unit.test_cliutils \
|
|
tests.unit.test_context \
|
|
tests.unit.test_deprecated \
|
|
tests.unit.test_excutils \
|
|
tests.unit.test_fileutils \
|
|
tests.unit.test_funcutils \
|
|
tests.unit.test_hooks \
|
|
tests.unit.test_imageutils \
|
|
tests.unit.test_importutils \
|
|
tests.unit.test_jsonutils \
|
|
tests.unit.test_local \
|
|
tests.unit.test_memorycache \
|
|
tests.unit.test_network_utils \
|
|
tests.unit.test_notifier \
|
|
tests.unit.test_periodic \
|
|
tests.unit.test_policy \
|
|
tests.unit.test_quota \
|
|
tests.unit.test_request_utils \
|
|
tests.unit.test_sslutils \
|
|
tests.unit.test_systemd \
|
|
tests.unit.test_timeutils \
|
|
tests.unit.test_units \
|
|
tests.unit.test_uuidutils \
|
|
tests.unit.test_versionutils \
|
|
tests.unit.test_xmlutils
|
|
|
|
[testenv:pyflakes]
|
|
commands = flake8
|
|
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
openstack.common.gettextutils
|
|
six.moves.mox
|