summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2020-06-24 11:33:20 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-06-29 08:21:57 +0000
commit42382f542767c468e461b49cfba265ea2b611f10 (patch)
tree47ba440a0fbb79b44be6bcc4d4d169ac1da2d91f
parent93dd1da259fba344b4620a5241b74be5de8bd254 (diff)
tests: fix deps pinning / patching
This ensures we don't recompute the requirements-{2,3}.txt on each make test run, and skips patching scapy if it is already patched instead of failing. Change-Id: I3da57182ae49f3dd04db139d96734a5d145fedff Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit 8eca60df745b7656b96db16e75b0deda66bfc515)
-rw-r--r--test/Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/Makefile b/test/Makefile
index 7d9d4e92e89..3f4cff3fd7e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -115,8 +115,6 @@ PAPI_WIPE_DIST=$(WS_ROOT)/src/vpp-api/vapi/__pycache__ \
$(PAPI_PYTHON_SRC_DIR)/vpp_papi.egg-info \
$(PAPI_PYTHON_SRC_DIR)/vpp_papi/__pycache__
-PAPI_INSTALL_FLAGS=$(PIP_INSTALL_DONE) $(PIP_PATCH_DONE) $(PAPI_INSTALL_DONE)
-
$(PIP_TOOLS_INSTALL_DONE):
@rm -rf $(VENV_PATH)
@mkdir -p $(VENV_RUN_DIR)
@@ -128,12 +126,12 @@ $(PIP_TOOLS_INSTALL_DONE):
$(PYTHON_INTERP) -m pip install pip-tools===$(PIP_TOOLS_VERSION)"
@touch $@
-$(PYTHON_DEPENDS): $(PIP_TOOLS_INSTALL_DONE) requirements.txt
+$(PYTHON_DEPENDS): requirements.txt
@bash -c "source $(VENV_PATH)/bin/activate && \
CUSTOM_COMPILE_COMMAND='make test-refresh-deps (or update requirements.txt)' \
$(PYTHON_INTERP) -m piptools compile -q --generate-hashes requirements.txt --output-file $@"
-$(PIP_INSTALL_DONE): $(PYTHON_DEPENDS)
+$(PIP_INSTALL_DONE): $(PIP_TOOLS_INSTALL_DONE) $(PYTHON_DEPENDS)
@bash -c "source $(VENV_PATH)/bin/activate && \
$(PYTHON_INTERP) -m piptools sync $(PYTHON_DEPENDS)"
@touch $@
@@ -145,7 +143,7 @@ $(PIP_PATCH_DONE): $(PIP_INSTALL_DONE)
echo Applying patch: $$(basename $$f) ; \
patch --forward -p1 -d $(SCAPY_SOURCE) < $$f ; \
retCode=$$?; \
- [ $$retCode -gt 0 ] && exit $$retCode; \
+ [ $$retCode -gt 1 ] && exit $$retCode; \
done; \
touch $@