summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Bragstad <lbragstad@gmail.com>2018-08-31 15:22:25 +0000
committerTony Breeds <tony@bakeyournoodle.com>2018-09-07 13:26:57 +1000
commit9a6875d479c22b81b47f545253f674a8c6221331 (patch)
treef0b097fc145181b3df88316fa302c175b69a5c9f
parent631964c51a668b4b160ca724fd8e03b071e8db44 (diff)
Remove tox_install.sh
As part of removing reliance on the old and deprecated zuul-cloner, we need to shift constraints declaration to the deps line. This means we unfortunately have to duplicate the extras declarations into test-requirements - because otherwise the contraints for keystonemiddleware conflicts with the installation of itself. Change-Id: I8dbb31d1c1fda6df386f456dcf1d8bbed6d168ce
Notes
Notes (review): Code-Review+2: Gage Hugo <gagehugo@gmail.com> Code-Review+2: wangxiyuan <wangxiyuan@huawei.com> Workflow+1: wangxiyuan <wangxiyuan@huawei.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 10 Sep 2018 03:26:59 +0000 Reviewed-on: https://review.openstack.org/599003 Project: openstack/keystonemiddleware Branch: refs/heads/master
-rw-r--r--test-requirements.txt3
-rwxr-xr-xtools/tox_install.sh32
-rw-r--r--tox.ini11
3 files changed, 6 insertions, 40 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index ef2890e..3153d81 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -12,11 +12,12 @@ mock>=2.0.0 # BSD
12oslotest>=3.2.0 # Apache-2.0 12oslotest>=3.2.0 # Apache-2.0
13requests-mock>=1.2.0 # Apache-2.0 13requests-mock>=1.2.0 # Apache-2.0
14stevedore>=1.20.0 # Apache-2.0 14stevedore>=1.20.0 # Apache-2.0
15stestr # Apache-2.0 15stestr>=2.0.0 # Apache-2.0
16testresources>=2.0.0 # Apache-2.0/BSD 16testresources>=2.0.0 # Apache-2.0/BSD
17testtools>=2.2.0 # MIT 17testtools>=2.2.0 # MIT
18python-memcached>=1.56 # PSF 18python-memcached>=1.56 # PSF
19WebTest>=2.0.27 # MIT 19WebTest>=2.0.27 # MIT
20oslo.messaging>=5.29.0 # Apache-2.0
20 21
21# Bandit security code scanner 22# Bandit security code scanner
22bandit>=1.1.0 # Apache-2.0 23bandit>=1.1.0 # Apache-2.0
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index f3423d9..0000000
--- a/tools/tox_install.sh
+++ /dev/null
@@ -1,32 +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
29if [[ -n "$@" ]]; then
30 pip install -c"$localfile" -U "$@"
31fi
32exit $?
diff --git a/tox.ini b/tox.ini
index b0b954c..348687b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,18 +5,16 @@ envlist = py35,py27,pep8,releasenotes
5 5
6[testenv] 6[testenv]
7usedevelop = True 7usedevelop = True
8install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9setenv = VIRTUAL_ENV={envdir} 8setenv = VIRTUAL_ENV={envdir}
10 BRANCH_NAME=master
11 CLIENT_NAME=keystonemiddleware
12 OS_STDOUT_CAPTURE=1 9 OS_STDOUT_CAPTURE=1
13 OS_STDERR_CAPTURE=1 10 OS_STDERR_CAPTURE=1
14 OS_TEST_TIMEOUT=60 11 OS_TEST_TIMEOUT=60
15 TESTS_DIR=./keystonemiddleware/tests/unit/ 12 TESTS_DIR=./keystonemiddleware/tests/unit/
16 13
17deps = -r{toxinidir}/requirements.txt 14deps =
18 -r{toxinidir}/test-requirements.txt 15 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
19 .[audit_notifications] 16 -r{toxinidir}/requirements.txt
17 -r{toxinidir}/test-requirements.txt
20commands = stestr run {posargs} 18commands = stestr run {posargs}
21 19
22[testenv:pep8] 20[testenv:pep8]
@@ -89,4 +87,3 @@ deps =
89 -c{toxinidir}/lower-constraints.txt 87 -c{toxinidir}/lower-constraints.txt
90 -r{toxinidir}/test-requirements.txt 88 -r{toxinidir}/test-requirements.txt
91 -r{toxinidir}/requirements.txt 89 -r{toxinidir}/requirements.txt
92 .[audit_notifications]