Make the low-constraints job work and modify coverage version

Now this style can't make low-constraints job work, because the pip
will constrain a library to the first item it encounters. Then the
version defined in the uppper file will be installed here.

The solution is to put the upper file in the deps.

Example:
When running low-constraints job:
According to the low-constraints file:
Babel==2.5.3[1] should be installed
Actually the log[2] shows that Babel===2.7.0[3] was installed.

Reference Link:
[1]. https://github.com/openstack/freezer/blob/master/lower-constraints.txt#L6
[2]. http://logs.openstack.org/85/657185/2/check/openstack-tox-lower-constraints/f9d0a50/job-output.txt.gz
[3]. https://releases.openstack.org/constraints/upper/master
[4]. https://review.opendev.org/#/c/601188
[5]. http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

The coverage version need >=4.5.0 to support py36:
[1]. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879269
[2]. https://travis-ci.org/agx/git-buildpackage/jobs/534117241

Change-Id: Idf278f4a7aca4470f5996e5166e4724259ef944b
This commit is contained in:
chenke 2019-06-18 11:59:23 +08:00 committed by chenker
parent 232ac73a79
commit 8562e9e8d5
3 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@ cffi==1.11.5
chardet==3.0.4
cliff==2.11.0
cmd2==0.8.1
coverage==4.0
coverage==4.5.1
cryptography==2.1
ddt==1.0.1
debtcollector==1.19.0

View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
flake8<2.6.0,>=2.5.4 # MIT
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
coverage>=4.5.1 # Apache-2.0
ddt>=1.0.1 # MIT
mock>=2.0.0 # BSD
pylint==1.9.2 # GPLv2

View File

@ -5,6 +5,7 @@ skipsdist = True
[testenv]
usedevelop = True
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -21,7 +22,7 @@ passenv =
FREEZER_TEST_NO_LVM
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH = ./freezer/tests/unit