summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2019-08-22 00:32:29 +0000
committerDave Wallace <dwallacelf@gmail.com>2019-08-23 17:31:08 -0400
commit9e25c7723d96412a139d4f1b73f9fad020f3e7a9 (patch)
tree1a39ac7b3965afbfa25ffd9f9f2437bab0c7a7f8
parent46441cb9cde2044c4e3e743d69418cecc897a63a (diff)
tests: move plugin tests to src/plugins/*/test
- Relocate plugin tests for 'make test' into src/plugins/*/test so that plugin test cases are co-located with the plugin source code. Type: refactor Ticket: VPP-1754 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I503e6a43528e14981799b735fa65674155713f67 (cherry picked from commit a43c93f8554ad7418e31be3791b3fb71232f60ac)
-rw-r--r--src/plugins/abf/test/test_abf.py (renamed from test/test_abf.py)0
-rw-r--r--src/plugins/acl/test/test_acl_plugin.py (renamed from test/test_acl_plugin.py)0
-rw-r--r--src/plugins/acl/test/test_acl_plugin_conns.py (renamed from test/test_acl_plugin_conns.py)0
-rw-r--r--src/plugins/acl/test/test_acl_plugin_l2l3.py (renamed from test/test_acl_plugin_l2l3.py)0
-rw-r--r--src/plugins/acl/test/test_acl_plugin_macip.py (renamed from test/test_acl_plugin_macip.py)0
-rw-r--r--src/plugins/acl/test/test_classify_l2_acl.py (renamed from test/test_classify_l2_acl.py)0
-rw-r--r--src/plugins/cdp/test/test_cdp.py (renamed from test/test_cdp.py)0
-rw-r--r--src/plugins/flowprobe/test/test_flowprobe.py (renamed from test/test_flowprobe.py)0
-rw-r--r--src/plugins/gbp/test/test_gbp.py (renamed from test/test_gbp.py)0
-rw-r--r--src/plugins/gtpu/test/test_gtpu.py (renamed from test/test_gtpu.py)0
-rw-r--r--src/plugins/igmp/test/test_igmp.py (renamed from test/test_igmp.py)0
-rw-r--r--src/plugins/igmp/test/vpp_igmp.py (renamed from test/vpp_igmp.py)0
-rw-r--r--src/plugins/l3xc/test/test_l3xc.py (renamed from test/test_l3xc.py)0
-rw-r--r--src/plugins/lb/test/test_lb.py (renamed from test/test_lb.py)0
-rw-r--r--src/plugins/lb/test/test_lb_api.py (renamed from test/test_lb_api.py)0
-rw-r--r--src/plugins/lb/test/vpp_lb.py (renamed from test/vpp_lb.py)0
-rw-r--r--src/plugins/mactime/test/test_mactime.py (renamed from test/test_mactime.py)0
-rw-r--r--src/plugins/map/test/test_map.py (renamed from test/test_map.py)0
-rw-r--r--src/plugins/memif/test/test_memif.py (renamed from test/test_memif.py)0
-rw-r--r--src/plugins/memif/test/vpp_memif.py (renamed from test/vpp_memif.py)0
-rw-r--r--src/plugins/nat/test/test_ipsec_nat.py (renamed from test/test_ipsec_nat.py)0
-rw-r--r--src/plugins/nat/test/test_nat.py (renamed from test/test_nat.py)0
-rw-r--r--src/plugins/pppoe/test/test_pppoe.py (renamed from test/test_pppoe.py)0
-rw-r--r--src/plugins/pppoe/test/vpp_pppoe_interface.py (renamed from test/vpp_pppoe_interface.py)0
-rw-r--r--src/plugins/quic/test/test_quic.py (renamed from test/test_quic.py)0
-rw-r--r--src/plugins/sctp/test/test_sctp.py (renamed from test/test_sctp.py)0
-rw-r--r--src/plugins/srv6-ad/test/test_srv6_ad.py (renamed from test/test_srv6_ad.py)0
-rw-r--r--src/plugins/srv6-ad/test/vpp_srv6.py (renamed from test/vpp_srv6.py)0
-rw-r--r--src/plugins/srv6-am/test/test_srv6.py (renamed from test/test_srv6.py)0
l---------src/plugins/srv6-am/test/vpp_srv6.py1
-rwxr-xr-xsrc/plugins/srv6-as/test/test_srv6_as.py (renamed from test/test_srv6_as.py)0
l---------src/plugins/srv6-as/test/vpp_srv6.py1
-rw-r--r--src/plugins/svs/test/test_svs.py (renamed from test/test_svs.py)0
-rw-r--r--test/Makefile9
34 files changed, 10 insertions, 1 deletions
diff --git a/test/test_abf.py b/src/plugins/abf/test/test_abf.py
index 221a793fed3..221a793fed3 100644
--- a/test/test_abf.py
+++ b/src/plugins/abf/test/test_abf.py
diff --git a/test/test_acl_plugin.py b/src/plugins/acl/test/test_acl_plugin.py
index eca02316bf6..eca02316bf6 100644
--- a/test/test_acl_plugin.py
+++ b/src/plugins/acl/test/test_acl_plugin.py
diff --git a/test/test_acl_plugin_conns.py b/src/plugins/acl/test/test_acl_plugin_conns.py
index 58c44e68262..58c44e68262 100644
--- a/test/test_acl_plugin_conns.py
+++ b/src/plugins/acl/test/test_acl_plugin_conns.py
diff --git a/test/test_acl_plugin_l2l3.py b/src/plugins/acl/test/test_acl_plugin_l2l3.py
index 31b4058fc69..31b4058fc69 100644
--- a/test/test_acl_plugin_l2l3.py
+++ b/src/plugins/acl/test/test_acl_plugin_l2l3.py
diff --git a/test/test_acl_plugin_macip.py b/src/plugins/acl/test/test_acl_plugin_macip.py
index 41735251792..41735251792 100644
--- a/test/test_acl_plugin_macip.py
+++ b/src/plugins/acl/test/test_acl_plugin_macip.py
diff --git a/test/test_classify_l2_acl.py b/src/plugins/acl/test/test_classify_l2_acl.py
index 8ba7181aef1..8ba7181aef1 100644
--- a/test/test_classify_l2_acl.py
+++ b/src/plugins/acl/test/test_classify_l2_acl.py
diff --git a/test/test_cdp.py b/src/plugins/cdp/test/test_cdp.py
index 7f77b4bbb01..7f77b4bbb01 100644
--- a/test/test_cdp.py
+++ b/src/plugins/cdp/test/test_cdp.py
diff --git a/test/test_flowprobe.py b/src/plugins/flowprobe/test/test_flowprobe.py
index 9ffe84b8c2c..9ffe84b8c2c 100644
--- a/test/test_flowprobe.py
+++ b/src/plugins/flowprobe/test/test_flowprobe.py
diff --git a/test/test_gbp.py b/src/plugins/gbp/test/test_gbp.py
index 0c9cdb415dd..0c9cdb415dd 100644
--- a/test/test_gbp.py
+++ b/src/plugins/gbp/test/test_gbp.py
diff --git a/test/test_gtpu.py b/src/plugins/gtpu/test/test_gtpu.py
index 957181a71e4..957181a71e4 100644
--- a/test/test_gtpu.py
+++ b/src/plugins/gtpu/test/test_gtpu.py
diff --git a/test/test_igmp.py b/src/plugins/igmp/test/test_igmp.py
index f1c49acba4c..f1c49acba4c 100644
--- a/test/test_igmp.py
+++ b/src/plugins/igmp/test/test_igmp.py
diff --git a/test/vpp_igmp.py b/src/plugins/igmp/test/vpp_igmp.py
index 8f78a9b909a..8f78a9b909a 100644
--- a/test/vpp_igmp.py
+++ b/src/plugins/igmp/test/vpp_igmp.py
diff --git a/test/test_l3xc.py b/src/plugins/l3xc/test/test_l3xc.py
index 696e23507ac..696e23507ac 100644
--- a/test/test_l3xc.py
+++ b/src/plugins/l3xc/test/test_l3xc.py
diff --git a/test/test_lb.py b/src/plugins/lb/test/test_lb.py
index 4603bd10db8..4603bd10db8 100644
--- a/test/test_lb.py
+++ b/src/plugins/lb/test/test_lb.py
diff --git a/test/test_lb_api.py b/src/plugins/lb/test/test_lb_api.py
index 70d41d432a7..70d41d432a7 100644
--- a/test/test_lb_api.py
+++ b/src/plugins/lb/test/test_lb_api.py
diff --git a/test/vpp_lb.py b/src/plugins/lb/test/vpp_lb.py
index d755cef70e5..d755cef70e5 100644
--- a/test/vpp_lb.py
+++ b/src/plugins/lb/test/vpp_lb.py
diff --git a/test/test_mactime.py b/src/plugins/mactime/test/test_mactime.py
index ab3d5371815..ab3d5371815 100644
--- a/test/test_mactime.py
+++ b/src/plugins/mactime/test/test_mactime.py
diff --git a/test/test_map.py b/src/plugins/map/test/test_map.py
index f1388b39c65..f1388b39c65 100644
--- a/test/test_map.py
+++ b/src/plugins/map/test/test_map.py
diff --git a/test/test_memif.py b/src/plugins/memif/test/test_memif.py
index aae5b3c1efb..aae5b3c1efb 100644
--- a/test/test_memif.py
+++ b/src/plugins/memif/test/test_memif.py
diff --git a/test/vpp_memif.py b/src/plugins/memif/test/vpp_memif.py
index 7fa45092740..7fa45092740 100644
--- a/test/vpp_memif.py
+++ b/src/plugins/memif/test/vpp_memif.py
diff --git a/test/test_ipsec_nat.py b/src/plugins/nat/test/test_ipsec_nat.py
index 07670d71b03..07670d71b03 100644
--- a/test/test_ipsec_nat.py
+++ b/src/plugins/nat/test/test_ipsec_nat.py
diff --git a/test/test_nat.py b/src/plugins/nat/test/test_nat.py
index 773eb51d4ee..773eb51d4ee 100644
--- a/test/test_nat.py
+++ b/src/plugins/nat/test/test_nat.py
diff --git a/test/test_pppoe.py b/src/plugins/pppoe/test/test_pppoe.py
index 54378673eb4..54378673eb4 100644
--- a/test/test_pppoe.py
+++ b/src/plugins/pppoe/test/test_pppoe.py
diff --git a/test/vpp_pppoe_interface.py b/src/plugins/pppoe/test/vpp_pppoe_interface.py
index 9be92327dcf..9be92327dcf 100644
--- a/test/vpp_pppoe_interface.py
+++ b/src/plugins/pppoe/test/vpp_pppoe_interface.py
diff --git a/test/test_quic.py b/src/plugins/quic/test/test_quic.py
index ed15cdcd8ed..ed15cdcd8ed 100644
--- a/test/test_quic.py
+++ b/src/plugins/quic/test/test_quic.py
diff --git a/test/test_sctp.py b/src/plugins/sctp/test/test_sctp.py
index 75bbb23f31f..75bbb23f31f 100644
--- a/test/test_sctp.py
+++ b/src/plugins/sctp/test/test_sctp.py
diff --git a/test/test_srv6_ad.py b/src/plugins/srv6-ad/test/test_srv6_ad.py
index aa4b8d3c088..aa4b8d3c088 100644
--- a/test/test_srv6_ad.py
+++ b/src/plugins/srv6-ad/test/test_srv6_ad.py
diff --git a/test/vpp_srv6.py b/src/plugins/srv6-ad/test/vpp_srv6.py
index b6dbc014207..b6dbc014207 100644
--- a/test/vpp_srv6.py
+++ b/src/plugins/srv6-ad/test/vpp_srv6.py
diff --git a/test/test_srv6.py b/src/plugins/srv6-am/test/test_srv6.py
index b3e69724028..b3e69724028 100644
--- a/test/test_srv6.py
+++ b/src/plugins/srv6-am/test/test_srv6.py
diff --git a/src/plugins/srv6-am/test/vpp_srv6.py b/src/plugins/srv6-am/test/vpp_srv6.py
new file mode 120000
index 00000000000..78f756605fc
--- /dev/null
+++ b/src/plugins/srv6-am/test/vpp_srv6.py
@@ -0,0 +1 @@
+../../srv6-ad/test/vpp_srv6.py \ No newline at end of file
diff --git a/test/test_srv6_as.py b/src/plugins/srv6-as/test/test_srv6_as.py
index 2be7865d5bd..2be7865d5bd 100755
--- a/test/test_srv6_as.py
+++ b/src/plugins/srv6-as/test/test_srv6_as.py
diff --git a/src/plugins/srv6-as/test/vpp_srv6.py b/src/plugins/srv6-as/test/vpp_srv6.py
new file mode 120000
index 00000000000..78f756605fc
--- /dev/null
+++ b/src/plugins/srv6-as/test/vpp_srv6.py
@@ -0,0 +1 @@
+../../srv6-ad/test/vpp_srv6.py \ No newline at end of file
diff --git a/test/test_svs.py b/src/plugins/svs/test/test_svs.py
index 9a9ac57016b..9a9ac57016b 100644
--- a/test/test_svs.py
+++ b/src/plugins/svs/test/test_svs.py
diff --git a/test/Makefile b/test/Makefile
index 3a92f1413b5..66c8f8a9bb7 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -135,8 +135,15 @@ refresh-deps: clean-deps $(PYTHON_DEPENDS)
clean-deps:
@rm -f $(PYTHON_DEPENDS)
+ifneq ($(EXTERN_PLUGIN_SRC_DIR),)
+PLUGIN_SRC_DIR=$(EXTERN_PLUGIN_SRC_DIR)
+else
+PLUGIN_SRC_DIR=$(WS_ROOT)/src/plugins
+endif
+PLUGIN_TEST_DIRS=$(shell find $(PLUGIN_SRC_DIR) -type d -name test -exec echo -n " -d {}" \;)
+
define retest-func
-@env FORCE_FOREGROUND=$(FORCE_FOREGROUND) FAILED_DIR=$(FAILED_DIR) VENV_PATH=$(VENV_PATH) scripts/setsid_wrapper.sh $(FORCE_FOREGROUND) $(VENV_PATH)/bin/activate $(PYTHON_INTERP) $(PYTHON_PROFILE_OPTS) run_tests.py -d $(TEST_DIR) $(UNITTEST_EXTRA_OPTS) || env FAILED_DIR=$(FAILED_DIR) COMPRESS_FAILED_TEST_LOGS=$(COMPRESS_FAILED_TEST_LOGS) scripts/compress_failed.sh
+@env FORCE_FOREGROUND=$(FORCE_FOREGROUND) FAILED_DIR=$(FAILED_DIR) VENV_PATH=$(VENV_PATH) scripts/setsid_wrapper.sh $(FORCE_FOREGROUND) $(VENV_PATH)/bin/activate $(PYTHON_INTERP) $(PYTHON_PROFILE_OPTS) run_tests.py -d $(TEST_DIR)$(PLUGIN_TEST_DIRS) $(UNITTEST_EXTRA_OPTS) || env FAILED_DIR=$(FAILED_DIR) COMPRESS_FAILED_TEST_LOGS=$(COMPRESS_FAILED_TEST_LOGS) scripts/compress_failed.sh
endef
.PHONY: sanity