aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-10-17 07:59:31 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-10-19 12:36:03 +0000
commit41a9e51f65aae3639771d9af53e810b43a5aee19 (patch)
tree902928df6265811702359c61680c17cdbb9ff205 /test
parent5e5028ed577ac1641f2a8d00136abe13b2fb15c5 (diff)
make test: control sanity via SANITY=yes|no option
Allow skipping sanity when using DEBUG=gdb/gdbserver options to speed up development process by supplying SANITY=no option to make test. Change-Id: I6e619229f6866b22bdeb75654b4e750232ae22bd Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile
index 870d2af10ed..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 \"*******************************************************************\" &&\
@@ -211,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> - 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"