
Add a bindep.txt file containing a cross-platform list of dependencies needed for running included tox-based tests. Also include a tox environment for convenience calling the bindep[*] utility to list any missing system requirements. This change is self-testing. For bindep.txt see also http://docs.openstack.org/infra/manual/drivers.html#package-requirements [*] http://docs.openstack.org/infra/bindep/ Change-Id: I736a4e68ab376e64b5f5adf8406c396a631799ee
79 lines
2.1 KiB
INI
79 lines
2.1 KiB
INI
[tox]
|
|
envlist = py27,tempauth,keystone,s3acl,pylint,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
whitelist_externals =/bin/bash
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
# swift 2.7.0 from github
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
http://tarballs.openstack.org/swift/swift-2.7.0.tar.gz
|
|
commands = nosetests {posargs:swift3/test/unit}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_OPENSTACK=1
|
|
NOSE_OPENSTACK_COLOR=1
|
|
NOSE_OPENSTACK_RED=0.05
|
|
NOSE_OPENSTACK_YELLOW=0.025
|
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
NOSE_OPENSTACK_STDOUT=1
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
|
|
[testenv:tempauth]
|
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
|
setenv = AUTH=tempauth
|
|
LOG_DEST={envdir}/log
|
|
|
|
[testenv:keystone]
|
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
|
setenv = AUTH=keystone
|
|
LOG_DEST={envdir}/log
|
|
# keystone 9.0.0 from github
|
|
deps =
|
|
{[testenv]deps}
|
|
http://tarballs.openstack.org/keystone/keystone-9.0.0.tar.gz
|
|
|
|
[testenv:s3acl]
|
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
|
setenv = AUTH=tempauth
|
|
LOG_DEST={envdir}/log
|
|
S3ACL=true
|
|
|
|
[testenv:pylint]
|
|
# Avoid to fail by checking members at lxml dynamically loaded module
|
|
commands = pylint -E swift3 --ignored-modules=lxml.etree
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
NOSE_COVER_HTML=1
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
|
|
|
[flake8]
|
|
# follow the same style guidelines with swift
|
|
ignore = H
|
|
select = F,E,W,H102,H103,H501,H903,H231
|
|
exclude = .venv,.git,.tox,dist,doc,*egg,build
|
|
show-source = True
|
|
|
|
|
|
[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.
|
|
usedevelop = False
|
|
skip_install = True
|
|
deps = bindep
|
|
commands = bindep test
|