summaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2016-11-15 09:46:51 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-22 21:26:55 +0000
commit177bbdcd8fa4e7621c5bdd3afd8c6e74b603e096 (patch)
treecf234b5bf8d79dac6a43570a903a11de44e26497 /test/Makefile
parent7afe9e38269a30682a5e392b0e876e18d1465c31 (diff)
GRE tests and fixes
Change-Id: I234240e9bdd4b69ad64a17b1449ae1e81c0edaca Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile30
1 files changed, 26 insertions, 4 deletions
diff --git a/test/Makefile b/test/Makefile
index aac637d3e5f..de6aaa7a793 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -6,23 +6,45 @@ ifndef VPP_PYTHON_PREFIX
endif
PYTHON_VENV_PATH=$(VPP_PYTHON_PREFIX)/virtualenv
-PYTHON_DEPENDS=scapy pexpect
+PYTHON_DEPENDS=scapy==2.3.3 pexpect
+SCAPY_SOURCE=$(WS_ROOT)/build-root/python/virtualenv/lib/python2.7/site-packages/
-test: wipe verify-python-path
+
+.pip-install.ok:
@virtualenv $(PYTHON_VENV_PATH)
@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS)"
+ @touch $@
+
+.pip-patch.ok: .pip-install.ok
+ @echo --- patching ---
+ for f in $(CURDIR)/patches/scapy-2.3.3/*.patch ; do \
+ echo Applying patch: $$(basename $$f) ; \
+ patch -p1 -d $(SCAPY_SOURCE) < $$f ; \
+ done
+ @touch $@
+
+.install.ok: .pip-patch.ok
@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && cd $(WS_ROOT)/vpp-api/python && python setup.py install"
+ @touch $@
+
+PHONIES=.install.ok .pip-patch.ok .pip-install.ok
+.PHONY: $(PHONIES)
+
+test: reset verify-python-path .install.ok
@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python run_tests.py discover -p test_$(TEST)\"*.py\""
-retest: wipe verify-python-path
+retest: reset verify-python-path
@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python run_tests.py discover -p test_$(TEST)\"*.py\""
.PHONY: wipe doc
-wipe:
+reset:
@rm -f /dev/shm/vpp-unittest-*
@rm -rf /tmp/vpp-unittest-*
+wipe: reset
+ @rm -f $(PHONIES)
+
doc: verify-python-path
@virtualenv $(PYTHON_VENV_PATH)
@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS) sphinx"