aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2019-07-23 15:19:28 +0200
committerAloys Augustin <aloaugus@cisco.com>2019-07-23 15:24:43 +0200
commit8adb92be294a10dbdb5cfd374420d74621c57b8f (patch)
treec15e6b758e52997a6a8e6927ae4bed274f1e8889
parentacf878b2e838f64c3aed791d8bce5d69cca03a4c (diff)
tests: pin pip version
New pip releases can break pip-tools. This commit pins the version of pip used in the test virtualenv to prevent uncontrolled breakage. This fixes the current issue in make test: TypeError: __init__() got an unexpected keyword argument 'index_urls' Change-Id: I3b7ecb31e651401ada0d357e2bf093c91c934565 Type: feature Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
-rw-r--r--test/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index e2823ee103e..8a6d69c3a62 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -80,6 +80,7 @@ PYTHON_INTERP=$(PYTHON)
endif
PYTHON_VERSION=$(shell $(PYTHON_INTERP) -c 'import sys; print(sys.version_info.major)')
+PIP_VERSION=19.1.1
PIP_TOOLS_VERSION=3.8.0 # Keep in sync with requirements.txt
PYTHON_DEPENDS=requirements-$(PYTHON_VERSION).txt
SCAPY_SOURCE=$(shell find $(VENV_PATH)/lib/$(PYTHON_INTERP) -name site-packages)
@@ -96,6 +97,9 @@ $(PIP_TOOLS_INSTALL_DONE):
@rm -rf $(VENV_PATH)
@mkdir -p $(TEST_RUN_DIR)
@virtualenv $(VENV_PATH) -p $(PYTHON_INTERP)
+ # pip version pinning
+ @bash -c "source $(VENV_PATH)/bin/activate && \
+ $(PYTHON_INTERP) -m pip install pip===$(PIP_VERSION)"
@bash -c "source $(VENV_PATH)/bin/activate && \
$(PYTHON_INTERP) -m pip install pip-tools===$(PIP_TOOLS_VERSION)"
@touch $@