Browse Source

Use upper-constraints in tox installs

The tox targets do not currently use upper constaints, resulting in
stable branch test runs pulling down newer library versions than what
should be supported for those releases.

This adds upper-constaints for test environment setup.

Change-Id: I1ff164242901a891fb45da03b1595b2e9246a765
Closes-bug: #1596246
Sean McGinnis 2 years ago
parent
commit
c9e1a1aabc
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      tox.ini

+ 13
- 1
tox.ini View File

@@ -6,7 +6,7 @@ envlist = py34,py27,pep8
6 6
 [testenv]
7 7
 setenv = VIRTUAL_ENV={envdir}
8 8
 usedevelop = True
9
-install_command = pip install {opts} {packages}
9
+install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
10 10
 whitelist_externals = find
11 11
 deps = -r{toxinidir}/requirements.txt
12 12
        -r{toxinidir}/test-requirements.txt
@@ -15,6 +15,10 @@ commands =
15 15
   ostestr {posargs}
16 16
 
17 17
 [testenv:releasenotes]
18
+# NOTE(jaegerandi): This target does not use constraints because
19
+# upstream infra does not yet support it. Once that's fixed, we can
20
+# drop the install_command.
21
+install_command = pip install -U --force-reinstall {opts} {packages}
18 22
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees \
19 23
          -b html releasenotes/source releasenotes/build/html
20 24
 
@@ -55,12 +59,20 @@ commands =
55 59
   oslo-config-generator --config-file etc/oslo-config-generator/manila.conf
56 60
 
57 61
 [testenv:venv]
62
+# NOTE(jaegerandi): This target does not use constraints because
63
+# upstream infra does not yet support it. Once that's fixed, we can
64
+# drop the install_command.
65
+install_command = pip install -U --force-reinstall {opts} {packages}
58 66
 commands = {posargs}
59 67
 
60 68
 [testenv:docs]
61 69
 commands = python setup.py build_sphinx
62 70
 
63 71
 [testenv:cover]
72
+# NOTE(jaegerandi): This target does not use constraints because
73
+# upstream infra does not yet support it. Once that's fixed, we can
74
+# drop the install_command.
75
+install_command = pip install -U --force-reinstall {opts} {packages}
64 76
 commands = {toxinidir}/tools/cover.sh {posargs}
65 77
 
66 78
 [testenv:fast8]

Loading…
Cancel
Save