summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2020-04-14 14:46:21 +0100
committerClark Boylan <clark.boylan@gmail.com>2020-08-05 15:01:15 -0700
commit73c11c626726ddadc0f43a57e5b7007236da38c5 (patch)
tree7fac435ef40ab7045276adc46b02ba308746af9e /tools
parent9257b6843568052be1dc1a5f3df6f629795e08b2 (diff)
downloadpbr-73c11c626726ddadc0f43a57e5b7007236da38c5.tar.gz
Add support for virtualenv 20.x
virtualenv is undergoing a rewrite and has changed how the programmatic API works [1]. Switch to the "new way". While we're here, we also need to get Python 2.7 tests passing again. That requires dropping support for upper-constraints and using our own, limited local constraints based on supported Python versions. We also need to migrate integration tests since those run with Python 3 now. Update the scenarios for pip/setuptools in integration testing similarly. Finally clean up the installation of all devstack repos as requirements are managed different now. Instead of worrying about syncing them we use constraints. [1] https://github.com/pypa/virtualenv/issues/1585#issuecomment-585228492 Change-Id: I493e88985d2c4d09612fea4d20d8ffa20043a0cb Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Depends-On: https://review.opendev.org/739014
Diffstat (limited to 'tools')
-rw-r--r--tools/integration.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/integration.sh b/tools/integration.sh
index 6c4dc16..ff337ef 100644
--- a/tools/integration.sh
+++ b/tools/integration.sh
@@ -97,10 +97,6 @@ name = test_project
[entry_points]
console_scripts =
test_cmd = test_project:main
-
-[global]
-setup-hooks =
- pbr.hooks.setup_hook
EOF
cat <<EOF > setup.py
@@ -115,18 +111,19 @@ from socket import error as SocketError
try:
setuptools.setup(
setup_requires=['pbr'],
- pbr=True)
+ pbr=True,
+ )
except (SocketError, Timeout):
setuptools.setup(
setup_requires=['pbr'],
- pbr=True)
-
+ pbr=True,
+ )
EOF
mkdir test_project
cat <<EOF > test_project/__init__.py
def main():
- print "Test cmd"
+ print("Test cmd")
EOF
epvenv=$eptest/venv
@@ -165,6 +162,8 @@ export REPODIR
export WHEELHOUSE
export OS_TEST_TIMEOUT=600
cd $REPODIR/pbr
-tox -epy27 --notest
-.tox/py27/bin/python -m pip install ${REPODIR}/requirements
-tox -epy27 -- test_integration
+mkvenv .venv
+source .venv/bin/activate
+pip install -r test-requirements.txt
+pip install ${REPODIR}/requirements
+stestr run --suppress-attachments test_integration