This is a combination of 4 commits to solve the issue created by the
removal of global bindep-fallback.txt.
1. Add a local bindep.txt override
This avoids falling back to the global bindep-fallback.txt which
installs a pretty big environment. Without this change, a lot
of additional but unnecessary packages are installed on the nodepool
workers.
Conflicts:
tox.ini
Note(elod.illes): Due to not having patch
If247add30d8dc4761dacb82c8d02ea4bd71546f0 on stable/ocata
(cherry picked from commit 2db0497fde)
2. Add libssl to bindep
Source builds using cryptography need libssl-dev (and assorted other
platform package names) to compile. Adding package declaration for
dpkg, rpm, and suse.
Closes-bug: #1696262
(cherry picked from commit 9151ea2719)
3. Add thin-provisioning-tools to bindep
If we're going to use auto we should make sure we add
thin-provisioning-tools to bindep. I think RHEL/CentOS
variants include this by default.
(cherry picked from commit c6a4a6b2f2)
4. Add thin provisioning package to install guide
Our installation guide walks through configuring storage nodes
using the LVM driver. LVM now defaults to thinly provisioned,
which requires thing-provisioning-tools to be installed on the
host. So by default, our instructions will result in failure
when we attempt to perform thin provision operations.
This adds mention of installing the required package for each
platform's instructions to get the necessary tools installed.
It also adds device-mapper-persistent-data to bindep for Red
Hat based platforms to get those thin provisioning tools that
were previously missing for these platforms.
Tools appear to be installed by default on Suse platforms.
Closes-bug: #1738409
Closes-bug: #1740262
(cherry picked from commit 78fa04624d)
(cherry picked from commit 8518fe3068)
Conflicts:
doc/source/install/cinder-storage-install-rdo.rst
doc/source/install/cinder-storage-install-ubuntu.rst
Note(elod.illes): conflict is caused by not having these documentation
files on ocata.
Change-Id: I8c581225eada929bc947b13f851bb228000f32fe
143 lines
4.1 KiB
INI
143 lines
4.1 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
skipsdist = True
|
|
envlist = py35,py27,compliance,pep8
|
|
|
|
[testenv]
|
|
# Note the hash seed is set to 0 until cinder can be tested with a
|
|
# random hash seed successfully.
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONHASHSEED=0
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata} {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
# By default ostestr will set concurrency
|
|
# to ncpu, to specify something else use
|
|
# the concurrency=<n> option.
|
|
# call ie: 'tox -epy27 -- --concurrency=4'
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
ostestr {posargs}
|
|
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
passenv = *_proxy *_PROXY
|
|
|
|
[testenv:api-ref]
|
|
# (sheel)This environment is called from CI scripts to test and publish
|
|
# the API Ref to developer.openstack.org.
|
|
whitelist_externals = rm
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:functional]
|
|
setenv =
|
|
OS_TEST_PATH = ./cinder/tests/functional
|
|
|
|
[testenv:functional-py34]
|
|
[testenv:functional-py35]
|
|
basepython=
|
|
py34: python3.4
|
|
py35: python3.5
|
|
setenv =
|
|
{[testenv:functional]setenv}
|
|
|
|
[testenv:compliance]
|
|
setenv =
|
|
OS_TEST_PATH = ./cinder/tests/compliance
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 {posargs} .
|
|
{toxinidir}/tools/config/check_uptodate.sh
|
|
{toxinidir}/tools/check_exec.py {toxinidir}/cinder
|
|
|
|
[testenv:fast8]
|
|
# Use same environment directory as pep8 env to save space and install time
|
|
envdir = {toxworkdir}/pep8
|
|
commands =
|
|
{toxinidir}/tools/fast8.sh
|
|
|
|
[testenv:pylint]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
pylint==0.26.0
|
|
commands = bash tools/lintstack.sh
|
|
|
|
[testenv:cover]
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
# tests conflict with coverage.
|
|
commands =
|
|
python setup.py testr --coverage \
|
|
--testr-args='^(?!.*test.*coverage).*$'
|
|
coverage report
|
|
|
|
[testenv:genconfig]
|
|
sitepackages = False
|
|
envdir = {toxworkdir}/pep8
|
|
commands = oslo-config-generator --config-file=cinder/config/cinder-config-generator.conf
|
|
|
|
[testenv:genopts]
|
|
sitepackages = False
|
|
envdir = {toxworkdir}/pep8
|
|
commands = python cinder/config/generate_cinder_opts.py
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
python setup.py build_sphinx
|
|
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
|
|
|
|
[testenv:gendriverlist]
|
|
sitepackages = False
|
|
envdir = {toxworkdir}/venv
|
|
commands = python {toxinidir}/tools/generate_driver_list.py
|
|
|
|
[testenv:bandit]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r cinder -n5 -x tests -ll
|
|
|
|
[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, and develop mode disabled
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
# further relies on "tox.skipsdist = True" above).
|
|
deps = bindep
|
|
commands = bindep test
|
|
usedevelop = False
|
|
|
|
[flake8]
|
|
# Following checks are ignored on purpose.
|
|
#
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
# reason: no improvement in readability
|
|
ignore = E251
|
|
exclude = .git,.venv,.tox,dist,tools,doc/ext,*egg,build
|
|
max-complexity=30
|
|
|
|
[hacking]
|
|
local-check-factory = cinder.hacking.checks.factory
|
|
import_exceptions = cinder.i18n
|
|
|
|
[testenv:pip-missing-reqs]
|
|
# do not install test-requirements as that will pollute the virtualenv for
|
|
# determining missing packages
|
|
# this also means that pip-missing-reqs must be installed separately, outside
|
|
# of the requirements.txt files
|
|
deps = pip_check_reqs>=2.0.1
|
|
commands = pip-missing-reqs -d --ignore-file=cinder/tests/* cinder
|