X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2FMakefile;h=00d70400076bc09969eac01194789819aa223fc5;hb=a74b7419bd6c7c5b23f59253b0b0b6c0d683794d;hp=da77accc5222c886aed4ab28531822ce4e08c764;hpb=25dc16715ee3fc0a600e2f58841173249bfae501;p=vpp.git diff --git a/test/Makefile b/test/Makefile index da77accc522..00d70400076 100644 --- a/test/Makefile +++ b/test/Makefile @@ -91,8 +91,16 @@ endef .PHONY: sanity +ifeq ($(SANITY),no) +SANITY_IMPORT_VPP_PAPI_CMD=true +SANITY_RUN_VPP_CMD=true +else +SANITY_IMPORT_VPP_PAPI_CMD=source $(PYTHON_VENV_PATH)/bin/activate && python sanity_import_vpp_papi.py +SANITY_RUN_VPP_CMD=source $(PYTHON_VENV_PATH)/bin/activate && python sanity_run_vpp.py +endif + sanity: verify-no-running-vpp - @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python sanity_import_vpp_papi.py ||\ + @bash -c "$(SANITY_IMPORT_VPP_PAPI_CMD) ||\ (echo \"*******************************************************************\" &&\ echo \"* Sanity check failed, cannot import vpp_papi\" &&\ echo \"* to debug: \" &&\ @@ -100,7 +108,7 @@ sanity: verify-no-running-vpp echo \"* 2. execute debugger: gdb python -ex 'run sanity_import_vpp_papi.py'\" &&\ echo \"*******************************************************************\" &&\ false)" - @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python sanity_run_vpp.py ||\ + @bash -c "$(SANITY_RUN_VPP_CMD) ||\ (echo \"*******************************************************************\" &&\ echo \"* Sanity check failed, cannot run vpp\" &&\ echo \"*******************************************************************\" &&\ @@ -202,6 +210,7 @@ help: @echo " V=[0|1|2] - set test verbosity level" @echo " FAILFAST=[0|1] - fail fast if 1, complete all tests if 0" @echo " TIMEOUT= - fail test suite if any single test takes longer than to finish" + @echo " RETRIES= - retry failed tests times" @echo " DEBUG= - set VPP debugging kind" @echo " DEBUG=core - detect coredump and load it in gdb on crash" @echo " DEBUG=gdb - allow easy debugging by printing VPP PID " @@ -210,6 +219,7 @@ help: @echo " DEBUG=gdbserver - run gdb inside a gdb server, otherwise " @echo " same as above" @echo " STEP=[yes|no] - ease debugging by stepping through a testcase " + @echo " SANITY=[yes|no] - perform sanity import of vpp-api/sanity vpp run before running tests (default: yes)" @echo " TEST= - filter the set of tests:" @echo " by file-name - only run tests from specified file, e.g. TEST=test_bfd selects all tests from test_bfd.py" @echo " by file-suffix - same as file-name, but 'test_' is omitted e.g. TEST=bfd selects all tests from test_bfd.py"