summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-03-09 21:04:36 +0000
committerGerrit Code Review <review@openstack.org>2018-03-09 21:04:36 +0000
commitf40f210017054bf4e30b7393094987078ee8f027 (patch)
treebd7bb03a9d48a2d124e3aa7eff3ebef33f597352
parentc432d9e93884d6962592f6d19aaec3f8f66ac3a2 (diff)
parent621332cf36d80984d3283b13a6830df6fa16e9f7 (diff)
Merge "Remove tox_install.sh and align constraints consumption"4.34.0
-rw-r--r--setup.cfg19
-rw-r--r--test-requirements.txt17
-rwxr-xr-xtools/tox_install.sh30
-rw-r--r--tox.ini10
4 files changed, 22 insertions, 54 deletions
diff --git a/setup.cfg b/setup.cfg
index 5f11ee3..f52322b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,25 +25,6 @@ mysql =
25# or oslo.db[postgresql] 25# or oslo.db[postgresql]
26postgresql = 26postgresql =
27 psycopg2>=2.6.2 # LGPL/ZPL 27 psycopg2>=2.6.2 # LGPL/ZPL
28# Dependencies for testing oslo.db itself.
29test =
30 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
31 coverage!=4.4,>=4.0 # Apache-2.0
32 eventlet!=0.18.3,!=0.20.1,<0.21.0,>=0.18.2 # MIT
33 fixtures>=3.0.0 # Apache-2.0/BSD
34 mock>=2.0.0 # BSD
35 python-subunit>=1.0.0 # Apache-2.0/BSD
36 oslotest>=3.2.0 # Apache-2.0
37 oslo.context>=2.19.2 # Apache-2.0
38 testrepository>=0.0.18 # Apache-2.0/BSD
39 testtools>=2.2.0 # MIT
40 os-testr>=1.0.0 # Apache-2.0
41 bandit>=1.1.0 # Apache-2.0
42fixtures =
43 testresources>=2.0.0 # Apache-2.0/BSD
44 testscenarios>=0.4 # Apache-2.0/BSD
45pifpaf =
46 pifpaf>=0.10.0 # Apache-2.0
47 28
48[files] 29[files]
49packages = 30packages =
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..c632b63
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,17 @@
1hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
2coverage!=4.4,>=4.0 # Apache-2.0
3eventlet!=0.18.3,!=0.20.1,<0.21.0,>=0.18.2 # MIT
4fixtures>=3.0.0 # Apache-2.0/BSD
5mock>=2.0.0 # BSD
6python-subunit>=1.0.0 # Apache-2.0/BSD
7oslotest>=3.2.0 # Apache-2.0
8oslo.context>=2.19.2 # Apache-2.0
9testrepository>=0.0.18 # Apache-2.0/BSD
10testtools>=2.2.0 # MIT
11os-testr>=1.0.0 # Apache-2.0
12bandit>=1.1.0 # Apache-2.0
13testresources>=2.0.0 # Apache-2.0/BSD
14testscenarios>=0.4 # Apache-2.0/BSD
15pifpaf>=0.10.0 # Apache-2.0
16PyMySQL>=0.7.6 # MIT License
17psycopg2>=2.6.2 # LGPL/ZPL
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index e61b63a..0000000
--- a/tools/tox_install.sh
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/usr/bin/env bash
2
3# Client constraint file contains this client version pin that is in conflict
4# with installing the client from source. We should remove the version pin in
5# the constraints file before applying it for from-source installation.
6
7CONSTRAINTS_FILE="$1"
8shift 1
9
10set -e
11
12# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
13# published to logs.openstack.org for easy debugging.
14localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
15
16if [[ "$CONSTRAINTS_FILE" != http* ]]; then
17 CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE"
18fi
19# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
20curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile"
21
22pip install -c"$localfile" openstack-requirements
23
24# This is the main purpose of the script: Allow local installation of
25# the current repo. It is listed in constraints file and thus any
26# install will be constrained and we need to unconstrain it.
27edit-constraints "$localfile" -- "$CLIENT_NAME"
28
29pip install -c"$localfile" -U "$@"
30exit $?
diff --git a/tox.ini b/tox.ini
index 3afe728..6deb9fc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,7 @@ minversion = 2.0
3envlist = py35,py27,pep8,pip-missing-reqs 3envlist = py35,py27,pep8,pip-missing-reqs
4 4
5[testenv] 5[testenv]
6install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} 6install_command = pip install {opts} {packages}
7whitelist_externals = bash 7whitelist_externals = bash
8 env 8 env
9setenv = 9setenv =
@@ -15,10 +15,10 @@ setenv =
15 {postgresql,all}: PIFPAF_POSTGRESQL=pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql -- 15 {postgresql,all}: PIFPAF_POSTGRESQL=pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql --
16 {mysql,all}: PIFPAF_MYSQL=pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql -- 16 {mysql,all}: PIFPAF_MYSQL=pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run mysql --
17 {mysql,postgresql,all}: BASECOMMAND={toxinidir}/tools/run-pifpaf-tests.sh 17 {mysql,postgresql,all}: BASECOMMAND={toxinidir}/tools/run-pifpaf-tests.sh
18 18deps =
19deps = .[test,fixtures,mysql,postgresql] 19 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
20 {postgresql,mysql,all}: .[pifpaf] 20 -r{toxinidir}/test-requirements.txt
21 21 -r{toxinidir}/requirements.txt
22commands = 22commands =
23 {env:PIFPAF_MYSQL:} {env:PIFPAF_POSTGRESQL:} {env:BASECOMMAND:} '{posargs}' 23 {env:PIFPAF_MYSQL:} {env:PIFPAF_POSTGRESQL:} {env:BASECOMMAND:} '{posargs}'
24 24