summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2017-12-01 07:44:18 +0100
committerAndreas Jaeger <jaegerandi@gmail.com>2017-12-02 17:07:13 +0000
commit3c8e42415081b6d25bf89cfb19d1e1cd8f999796 (patch)
tree7f7b401cbfe71111ccc357458adac37f14a2976f
parent7beb27ca30fd165db60c294f6640f1f68c5ecb09 (diff)
Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself and install the project correctly. Thus update tox.ini and remove the now obsolete tools/tox_install.sh file. This follows https://review.openstack.org/#/c/508061 to remove tools/tox_install.sh. Change-Id: Ieec1e7c7a4ae9a89fb413e4aa5288396690ed538
Notes
Notes (review): Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sun, 03 Dec 2017 23:47:15 +0000 Reviewed-on: https://review.openstack.org/524489 Project: openstack/diskimage-builder Branch: refs/heads/master
-rwxr-xr-xtools/tox_install.sh30
-rw-r--r--tox.ini12
2 files changed, 4 insertions, 38 deletions
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 b01f8a5..719cde0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,12 +5,10 @@ skipsdist = True
5 5
6[testenv] 6[testenv]
7usedevelop = True 7usedevelop = True
8setenv = 8install_command = pip install {opts} {packages}
9 VIRTUAL_ENV={envdir} 9deps=
10 BRANCH_NAME=master 10 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
11 CLIENT_NAME=diskimage-builder 11 -r{toxinidir}/requirements.txt
12install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
13deps= -r{toxinidir}/requirements.txt
14 -r{toxinidir}/test-requirements.txt 12 -r{toxinidir}/test-requirements.txt
15commands= 13commands=
16 python setup.py test --slowest --testr-args='{posargs}' 14 python setup.py test --slowest --testr-args='{posargs}'
@@ -33,8 +31,6 @@ envdir = {toxworkdir}/venv
33commands = {toxinidir}/tests/run_functests.sh {posargs} 31commands = {toxinidir}/tests/run_functests.sh {posargs}
34 32
35[testenv:cover] 33[testenv:cover]
36setenv =
37 {[testenv]setenv}
38# NOTE: this is "setup.py test" (*not* testr) which is a pbr wrapper 34# NOTE: this is "setup.py test" (*not* testr) which is a pbr wrapper
39# around testr. This understands --coverage-package-name which we 35# around testr. This understands --coverage-package-name which we
40# need due to underscore issues. 36# need due to underscore issues.