Files
db9c90584943a02da448531460053492af6886bf
swift /tox.ini

198 lines
7.0 KiB
INI
Raw Normal View History

[testenv]
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
NOSE_COVER_BRANCHES=1
-r{toxinidir}/test-requirements.txt
find . -type d -name "__pycache__" -delete
nosetests {posargs:test/unit}
whitelist_externals = find
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_BRANCHES=1
NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover
# code inadvertedly, we instituted a practice of "py3 ratchet": we convert
# tests file by file, add them into the list below, and never go back.
# This list also serves as a shared task board for those helping with py3.
# But mind that reviews expanding this list may be outstanding in Gerrit.
test/unit/cli/test_ringbuilder.py \
test/unit/cli/test_ringcomposer.py \
test/unit/common/middleware/test_acl.py \
test/unit/common/middleware/test_container_sync.py \
test/unit/common/middleware/test_copy.py \
test/unit/common/middleware/test_crossdomain.py \
test/unit/common/middleware/test_keystoneauth.py \
test/unit/common/middleware/test_list_endpoints.py \
test/unit/common/middleware/test_listing_formats.py \
test/unit/common/middleware/test_memcache.py \
test/unit/common/middleware/test_subrequest_logging.py \
test/unit/common/middleware/test_xprofile.py \
test/unit/common/test_container_sync_realms.py \
test/unit/common/test_db.py \
test/unit/common/test_internal_client.py \
test/unit/common/test_request_helpers.py \
test/unit/common/test_storage_policy.py \
test/unit/common/test_swob.py \
test/unit/container/test_auditor.py \
test/unit/container/test_replicator.py \
test/unit/container/test_sync_store.py \
test/unit/obj/test_replicator.py \
test/unit/proxy/controllers/test_obj.py}
commands = {[testenv:py35]commands}
flake8 {posargs:swift test doc setup.py}
flake8 --filename=swift* bin
basepython = python3
install_command = echo {packages}
# Gross hack. There's no other way to get it to /not/ install swift itself
# (which triggers installing eventlet) but also get flake8 installed.
pip install flake8
flake8 swift test doc setup.py
setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_CONF_LOADER=encryption
[testenv:func-domain-remap-staticweb]
commands = ./.functests {posargs}
setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_CONF_LOADER=domain_remap_staticweb
commands = ./.functests {posargs}
setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_CONF_LOADER=ec
commands = ./.functests {posargs}
setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_CONF_LOADER=s3api
commands = {posargs}
commands = sphinx-build -W -b html doc/source doc/build/html
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
rm -rf api-ref/build
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
deps = -r{toxinidir}/test-requirements.txt
# H101: Use TODO(NAME)
# H202: assertRaises Exception too broad
# H301: one import per line
# H306: imports not in alphabetical order (time, os)
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# H501: Do not use self.__dict__ for string formatting
[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.
commands = bindep test
[testenv:releasenotes]
[testenv:lower-constraints]
# FIXME(dhellmann): We'll want to uncomment this
# when the full test suite works with python 3.
# basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt