Add support for upper-constraints.txt
...and pin us to stable/newton. (I wanted stable/mitaka so it'd match Keystone, but apparently then pbr is too old for Keystone to install a keystone-wsgi-admin script.) This prevents various version conflicts; the most recent was from oslo.service blocking too-new eventlet. Change-Id: I115dc231a9156a5bceacaa21d6242bb934fbbd24 Related-Change: I3b2196fdef9936f1c7d468f9c7c9b9246d3d26fd Related-Change: I6cbbfd7260571f42ea65c6622aa6b410a0e43b28
This commit is contained in:
parent
a8bbdd6646
commit
397ed3ab6a
@ -7,8 +7,6 @@ mock
|
|||||||
pylint
|
pylint
|
||||||
python-openstackclient
|
python-openstackclient
|
||||||
boto
|
boto
|
||||||
requests!=2.12.2,!=2.13.0
|
|
||||||
requests-mock>=0.7.0 # Apache-2.0
|
requests-mock>=0.7.0 # Apache-2.0
|
||||||
fixtures<2.0,>=1.3.1 # Apache-2.0/BSD
|
fixtures<2.0,>=1.3.1 # Apache-2.0/BSD
|
||||||
keystonemiddleware
|
keystonemiddleware
|
||||||
babel!=2.4.0
|
|
||||||
|
38
tools/tox_install.sh
Executable file
38
tools/tox_install.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Client constraint file contains this client version pin that is in conflict
|
||||||
|
# with installing the client from source. We should remove the version pin in
|
||||||
|
# the constraints file before applying it for from-source installation.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ -z "$CONSTRAINTS_FILE" ]]; then
|
||||||
|
echo 'WARNING: expected $CONSTRAINTS_FILE to be set' >&2
|
||||||
|
PIP_FLAGS=(-U)
|
||||||
|
else
|
||||||
|
# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
|
||||||
|
# published to logs.openstack.org for easy debugging.
|
||||||
|
localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
|
||||||
|
|
||||||
|
if [[ "$CONSTRAINTS_FILE" != http* ]]; then
|
||||||
|
CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
|
||||||
|
fi
|
||||||
|
curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
|
||||||
|
|
||||||
|
pip install -c"$localfile" openstack-requirements
|
||||||
|
|
||||||
|
# This is the main purpose of the script: Allow local installation of
|
||||||
|
# the current repo. It is listed in constraints file and thus any
|
||||||
|
# install will be constrained and we need to unconstrain it.
|
||||||
|
edit-constraints "$localfile" -- "$CLIENT_NAME"
|
||||||
|
|
||||||
|
# Also unconstrain eventlet, as our s3tests results rely on a more-recent
|
||||||
|
# version
|
||||||
|
edit-constraints "$localfile" -- eventlet
|
||||||
|
# Swift also hard-depends on a more-recent pyeclib
|
||||||
|
edit-constraints "$localfile" -- pyeclib
|
||||||
|
|
||||||
|
PIP_FLAGS=(-c"$localfile" -U)
|
||||||
|
fi
|
||||||
|
|
||||||
|
pip install "${PIP_FLAGS[@]}" "$@"
|
34
tox.ini
34
tox.ini
@ -6,7 +6,7 @@ skipsdist = True
|
|||||||
[testenv]
|
[testenv]
|
||||||
whitelist_externals =/bin/bash
|
whitelist_externals =/bin/bash
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install {opts} {packages}
|
install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
|
||||||
# swift stable/ocata (about 2.13.0) from openstack.org
|
# swift stable/ocata (about 2.13.0) from openstack.org
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
@ -21,16 +21,18 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
NOSE_OPENSTACK_STDOUT=1
|
NOSE_OPENSTACK_STDOUT=1
|
||||||
NOSE_WITH_COVERAGE=1
|
NOSE_WITH_COVERAGE=1
|
||||||
NOSE_COVER_BRANCHES=1
|
NOSE_COVER_BRANCHES=1
|
||||||
|
CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/newton
|
||||||
|
LOG_DEST={envdir}/log
|
||||||
|
|
||||||
[testenv:tempauth]
|
[testenv:tempauth]
|
||||||
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
||||||
setenv = AUTH=tempauth
|
setenv = {[testenv]setenv}
|
||||||
LOG_DEST={envdir}/log
|
AUTH=tempauth
|
||||||
|
|
||||||
[testenv:keystone]
|
[testenv:keystone]
|
||||||
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
||||||
setenv = AUTH=keystone
|
setenv = {[testenv]setenv}
|
||||||
LOG_DEST={envdir}/log
|
AUTH=keystone
|
||||||
# keystone 9.0.0 from github
|
# keystone 9.0.0 from github
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
@ -38,13 +40,14 @@ deps =
|
|||||||
|
|
||||||
[testenv:s3acl]
|
[testenv:s3acl]
|
||||||
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
||||||
setenv = AUTH=tempauth
|
setenv = {[testenv]setenv}
|
||||||
LOG_DEST={envdir}/log
|
AUTH=tempauth
|
||||||
S3ACL=true
|
S3ACL=true
|
||||||
|
|
||||||
[testenv:s3acl_master]
|
[testenv:s3acl_master]
|
||||||
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
||||||
setenv = AUTH=tempauth
|
setenv = {[testenv]setenv}
|
||||||
|
AUTH=tempauth
|
||||||
S3ACL=true
|
S3ACL=true
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
@ -52,27 +55,30 @@ deps =
|
|||||||
|
|
||||||
[testenv:s3tests_tempauth]
|
[testenv:s3tests_tempauth]
|
||||||
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
||||||
setenv = AUTH=tempauth
|
setenv = {[testenv]setenv}
|
||||||
|
AUTH=tempauth
|
||||||
S3ACL=true
|
S3ACL=true
|
||||||
DNS_BUCKET_NAMES=false
|
DNS_BUCKET_NAMES=false
|
||||||
CHECK_BUCKET_OWNER=true
|
CHECK_BUCKET_OWNER=true
|
||||||
CEPH_TESTS=1
|
CEPH_TESTS=1
|
||||||
LOG_DEST={envdir}/log
|
|
||||||
|
|
||||||
[testenv:s3tests_keystone]
|
[testenv:s3tests_keystone]
|
||||||
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
commands = /bin/bash {posargs:swift3/test/functional/run_test.sh}
|
||||||
setenv = AUTH=keystone
|
setenv = {[testenv]setenv}
|
||||||
|
AUTH=keystone
|
||||||
S3ACL=true
|
S3ACL=true
|
||||||
DNS_BUCKET_NAMES=false
|
DNS_BUCKET_NAMES=false
|
||||||
CHECK_BUCKET_OWNER=true
|
CHECK_BUCKET_OWNER=true
|
||||||
CEPH_TESTS=1
|
CEPH_TESTS=1
|
||||||
LOG_DEST={envdir}/log
|
|
||||||
deps =
|
deps =
|
||||||
{[testenv:keystone]deps}
|
{[testenv:keystone]deps}
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
# Avoid to fail by checking members at lxml dynamically loaded module
|
# Avoid to fail by checking members at lxml dynamically loaded module
|
||||||
commands = pylint -E swift3 --ignored-modules=lxml.etree
|
commands = pylint -E swift3 --ignored-modules=lxml.etree
|
||||||
|
setenv = {[testenv]setenv}
|
||||||
|
# bypass constraints; pylint requires a later astroid
|
||||||
|
CONSTRAINTS_FILE=
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands = flake8
|
||||||
@ -81,9 +87,7 @@ commands = flake8
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = {[testenv]setenv}
|
||||||
NOSE_WITH_COVERAGE=1
|
|
||||||
NOSE_COVER_BRANCHES=1
|
|
||||||
NOSE_COVER_HTML=1
|
NOSE_COVER_HTML=1
|
||||||
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user