X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2FMakefile;h=5fe86d9f401497d5a77423ceb9af37586237fec0;hb=eb506becd038f081bc7ac340412d3685425bb8b4;hp=cbdcff1a2d5d44ada2c04187cfe744b1e337d8ee;hpb=c701e5718201fbfb205998343da70c816c57795f;p=vpp.git diff --git a/test/Makefile b/test/Makefile index cbdcff1a2d5..5fe86d9f401 100644 --- a/test/Makefile +++ b/test/Makefile @@ -93,20 +93,21 @@ VENV_RUN_DIR:=$(VENV_PATH)/run endif ifeq ($(PYTHON),) -PYTHON_INTERP=python3.6 +PYTHON_INTERP=python3 else 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 +PIP_VERSION=20.1.1 +# Keep in sync with requirements.txt +PIP_TOOLS_VERSION=5.1.2 PYTHON_DEPENDS=requirements-$(PYTHON_VERSION).txt -SCAPY_SOURCE=$(shell find $(VENV_PATH)/lib/$(PYTHON_INTERP) -name site-packages) +SCAPY_SOURCE=$(shell find $(VENV_PATH)/lib/python* -name site-packages) BUILD_COV_DIR=$(TEST_BR)/coverage -PIP_TOOLS_INSTALL_DONE=$(VENV_RUN_DIR)/pip-tools-install-$(PYTHON_VERSION).done -PIP_INSTALL_DONE=$(VENV_RUN_DIR)/pip-install-$(PYTHON_VERSION).done +PIP_TOOLS_INSTALL_DONE=$(VENV_RUN_DIR)/pip-tools-install-$(PYTHON_VERSION)-$(PIP_TOOLS_VERSION).done +PIP_INSTALL_DONE=$(VENV_RUN_DIR)/pip-install-$(PYTHON_VERSION)-$(PIP_VERSION).done PIP_PATCH_DONE=$(VENV_RUN_DIR)/pip-patch-$(PYTHON_VERSION).done PAPI_INSTALL_DONE=$(VENV_RUN_DIR)/papi-install-$(PYTHON_VERSION).done PAPI_PYTHON_SRC_DIR=$(WS_ROOT)/src/vpp-api/python @@ -115,8 +116,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 +127,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 +144,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 $@ @@ -194,7 +193,6 @@ PARALLEL_ILLEGAL=1 endif sanity: test-dep verify-no-running-vpp - @sys_req/dev_shm_size.sh @bash -c "test $(PARALLEL_ILLEGAL) -eq 0 ||\ (echo \"*******************************************************************\" &&\ echo \"* Sanity check failed, TEST_JOBS is not 1 or 'auto' and DEBUG, STEP or PROFILE is set\" &&\ @@ -220,7 +218,7 @@ ext-test-apps: $(BUILD_TEST_SRC): verify-env @mkdir -p $@ - @for file in $(VPP_TEST_SRC); do if [ ! -e $(BUILD_TEST_SRC)/$$(basename $$file) ] ; then ln -s $$file $(BUILD_TEST_SRC) ; fi ; done + @for file in $(VPP_TEST_SRC); do if [ ! -L $$file ] && [ ! -e $(BUILD_TEST_SRC)/$$(basename $$file) ] ; then ln -s $$file $(BUILD_TEST_SRC) ; fi ; done $(FAILED_DIR): reset @mkdir -p $@ @@ -259,7 +257,6 @@ shell: test-dep .PHONY: reset reset: - @rm -f /dev/shm/vpp-unittest-* @rm -rf /tmp/vpp-unittest-* @rm -f /tmp/api_post_mortem.* @rm -rf $(FAILED_DIR) @@ -268,12 +265,11 @@ reset: wipe: reset @make -C ext clean @rm -rf $(VENV_PATH) - @rm -rf $(patsubst %,%/__pycache__, $(VPP_TEST_DIRS) $(BUILD_TEST_SRC)) + @rm -rf $(patsubst %,%/__pycache__, $(VPP_TEST_DIRS)) + @rm -rf $(BUILD_TEST_SRC) -$(TEST_DOC_BR): +$(TEST_DOC_BR): $(PIP_INSTALL_DONE) @mkdir -p $@ - @bash -c "source $(VENV_PATH)/bin/activate && \ - $(PYTHON_INTERP) -m pip install sphinx sphinx-rtd-theme" @bash -c "source $(VENV_PATH)/bin/activate && make -C doc html" .PHONY: doc @@ -382,6 +378,10 @@ help: @echo " TEST='bfd.BFDAPITestCase.test_add_bfd' selects a single test named test_add_bfd from test_bfd.py/BFDAPITestCase" @echo " TEST='*.*.test_add_bfd' selects all test functions named test_add_bfd from all files/classes" @echo "" + @echo " VARIANT= - specify which march node variant to unit test" + @echo " e.g. VARIANT=skx test the skx march variants" + @echo " e.g. VARIANT=icl test the icl march variants" + @echo "" @echo " VPP_ZOMBIE_NOCHECK=1 - skip checking for vpp (zombie) processes (CAUTION)" @echo " COREDUMP_SIZE= - pass as unix { coredump-size } argument to vpp" @echo " e.g. COREDUMP_SIZE=4g" @@ -399,8 +399,6 @@ help: @echo "" @echo " SKIP_AARCH64=1 - skip tests that are failing on the ARM platorm in FD.io CI" @echo "" - @echo " SOCKET=1 - Communicate with VPP over Unix domain socket instead of SHM" - @echo "" @echo " RND_SEED=seed - Seed RND with given seed" @echo "" @echo "Creating test documentation"