aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2016-10-11 11:47:09 +0200
committerMatej Klotton <mklotton@cisco.com>2016-10-26 17:42:19 +0200
commitf62ae1288a776527c7f7ba3951531fbd07bc63da (patch)
treeca877f7e3bb7e4f6309cf711fca9de1fcd4865a2 /Makefile
parentf530a5526a1f501462ff4247a5bb38e80c13678d (diff)
refactor test framework
Change-Id: I31da3b1857b6399f9899276a2d99cdd19436296c Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com> Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 20 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 93277bec..54b0f29d 100644
--- a/Makefile
+++ b/Makefile
@@ -188,37 +188,36 @@ plugins-release: $(BR)/.bootstrap.ok
build-vpp-api: $(BR)/.bootstrap.ok
$(call make,$(PLATFORM)_debug,vpp-api-install)
+PYTHON_PATH=$(BR)/python
+
define test
- @make -C test \
- VPP_TEST_BIN=$(BR)/install-$(1)-native/vpp/bin/vpp \
- VPP_TEST_API_TEST_BIN=$(BR)/install-$(1)-native/vpp-api-test/bin/vpp_api_test \
- VPP_TEST_PLUGIN_PATH=$(BR)/install-$(1)-native/plugins/lib64/vpp_plugins \
- V=$(V) TEST=$(TEST)
+ $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-api-install plugins-install vpp-install vpp-api-test-install,)
+ make -C test \
+ VPP_TEST_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \
+ VPP_TEST_API_TEST_BIN=$(BR)/install-$(2)-native/vpp-api-test/bin/vpp_api_test \
+ VPP_TEST_PLUGIN_PATH=$(BR)/install-$(2)-native/plugins/lib64/vpp_plugins \
+ LD_LIBRARY_PATH=$(BR)/install-$(2)-native/vpp-api/lib64/ \
+ WS_ROOT=$(WS_ROOT) I=$(I) V=$(V) TEST=$(TEST) PYTHON_PATH=$(PYTHON_PATH) $(3)
endef
test: bootstrap
-ifeq ($(OS_ID),ubuntu)
- @if ! (dpkg -l python-dev python-scapy &> /dev/null); then \
- sudo -E apt-get $(CONFIRM) $(FORCE) install python-dev python-scapy; \
- fi
-endif
- @make -C $(BR) PLATFORM=vpp_lite TAG=vpp_lite vpp-api-install plugins-install vpp-install vpp-api-test-install
- $(call test,vpp_lite)
+ $(call test,vpp_lite,vpp_lite,test)
test-debug: bootstrap
-ifeq ($(OS_ID),ubuntu)
- @if ! (dpkg -l python-dev python-scapy &> /dev/null); then \
- sudo -E apt-get $(CONFIRM) $(FORCE) install python-dev python-scapy; \
- fi
-endif
- @make -C $(BR) PLATFORM=vpp_lite TAG=vpp_lite_debug vpp-api-install plugins-install vpp-install vpp-api-test-install
- $(call test,vpp_lite_debug)
+ $(call test,vpp_lite,vpp_lite_debug,test)
+
+test-doc:
+ make -C $(BR) PLATFORM=vpp_lite TAG=vpp_lite vpp-api-install plugins-install vpp-install vpp-api-test-install
+ make -C test PYTHON_PATH=$(PYTHON_PATH) LD_LIBRARY_PATH=$(BR)/install-vpp_lite-native/vpp-api/lib64/ doc
+
+test-clean:
+ make -C test clean
retest:
- $(call test,vpp_lite)
+ $(call test,vpp_lite,vpp_lite,retest)
retest-debug:
- $(call test,vpp_lite_debug)
+ $(call test,vpp_lite,vpp_lite_debug,retest)
STARTUP_DIR ?= $(PWD)
ifeq ("$(wildcard $(STARTUP_CONF))","")