diff options
author | Aloys Augustin <aloaugus@cisco.com> | 2020-06-24 11:33:20 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-08-07 20:49:18 +0000 |
commit | 193c9e36a4191e9f9cfa232f67c198e73bb84fe2 (patch) | |
tree | 3f939c6d149889b3f592b02f9e8f78b49c074c16 | |
parent | ecc98b54f273cd3be260dd0d5deffd8171f154ec (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/Makefile | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/Makefile b/test/Makefile index 48cbb605b4e..e4ba2e82a1f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -95,8 +95,6 @@ PIP_INSTALL_DONE=$(TEST_RUN_DIR)/pip-install-$(PYTHON_VERSION).done PIP_PATCH_DONE=$(TEST_RUN_DIR)/pip-patch-$(PYTHON_VERSION).done PAPI_INSTALL_DONE=$(TEST_RUN_DIR)/papi-install-$(PYTHON_VERSION).done -PAPI_INSTALL_FLAGS=$(PIP_INSTALL_DONE) $(PIP_PATCH_DONE) $(PAPI_INSTALL_DONE) - $(PIP_TOOLS_INSTALL_DONE): @rm -rf $(VENV_PATH) @mkdir -p $(TEST_RUN_DIR) @@ -108,12 +106,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 $@ |