summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDmitry Valter <d-valter@yandex-team.com>2024-03-11 10:38:46 +0000
committerDave Wallace <dwallacelf@gmail.com>2024-07-12 15:43:24 +0000
commit34fa0ce8f70a341df432b0baa3deaa1e87c71b95 (patch)
treee9a282b8376dd6aa7fd904238768f77df137b35a /test
parent7b7bc045f83d0094aa927bfd44d1ac157005a34c (diff)
tests: skip more excluded plugin tests
Check and skip VPP_EXCLUDED_PLUGINS tests for most of plugins. Type: improvement Signed-off-by: Dmitry Valter <d-valter@yandex-team.com> Change-Id: I23fd3666729251c639aa8da72a676058e3f5bb4e
Diffstat (limited to 'test')
-rw-r--r--test/asf/test_adl.py2
-rw-r--r--test/asf/test_lb_api.py6
-rw-r--r--test/asf/test_session.py4
-rw-r--r--test/asf/test_tcp.py4
-rw-r--r--test/asf/test_vcl.py36
-rw-r--r--test/asf/test_vhost.py2
-rw-r--r--test/template_ipsec.py10
-rw-r--r--test/test_arping.py4
-rw-r--r--test/test_bond.py7
-rw-r--r--test/test_cdp.py2
-rw-r--r--test/test_cnat.py4
-rw-r--r--test/test_det44.py2
-rw-r--r--test/test_dhcp.py2
-rw-r--r--test/test_dhcp6.py5
-rw-r--r--test/test_dns.py2
-rw-r--r--test/test_dslite.py4
-rw-r--r--test/test_dvr.py2
-rw-r--r--test/test_flowprobe.py22
-rw-r--r--test/test_geneve.py3
-rw-r--r--test/test_gre.py3
-rw-r--r--test/test_gso.py4
-rw-r--r--test/test_gtpu.py3
-rw-r--r--test/test_igmp.py2
-rw-r--r--test/test_interface_crud.py4
-rw-r--r--test/test_ip4.py4
-rw-r--r--test/test_ip6.py13
-rw-r--r--test/test_ip_mcast.py10
-rw-r--r--test/test_ip_session_redirect.py5
-rw-r--r--test/test_ipsec_ah.py4
-rw-r--r--test/test_ipsec_esp.py5
-rw-r--r--test/test_ipsec_spd_fp_input.py7
-rw-r--r--test/test_ipsec_tun_if_esp.py34
-rw-r--r--test/test_l2tp.py4
-rw-r--r--test/test_l3xc.py2
-rw-r--r--test/test_lacp.py3
-rw-r--r--test/test_lb.py3
-rw-r--r--test/test_linux_cp.py3
-rw-r--r--test/test_lisp.py3
-rw-r--r--test/test_lldp.py1
-rw-r--r--test/test_map.py2
-rw-r--r--test/test_map_br.py2
-rw-r--r--test/test_memif.py2
-rw-r--r--test/test_mpls.py4
-rw-r--r--test/test_nat44_ed.py3
-rw-r--r--test/test_nat44_ed_output.py2
-rw-r--r--test/test_nat44_ei.py4
-rw-r--r--test/test_nat64.py2
-rw-r--r--test/test_nat66.py2
-rw-r--r--test/test_npt66.py2
-rw-r--r--test/test_pcap.py4
-rw-r--r--test/test_ping.py4
-rw-r--r--test/test_pipe.py2
-rw-r--r--test/test_pnat.py2
-rw-r--r--test/test_pppoe.py2
-rw-r--r--test/test_reassembly.py22
-rw-r--r--test/test_span.py4
-rw-r--r--test/test_srv6_ad.py2
-rw-r--r--test/test_srv6_ad_flow.py4
-rw-r--r--test/test_srv6_as.py2
-rw-r--r--test/test_srv6_mobile.py15
-rw-r--r--test/test_svs.py2
-rw-r--r--test/test_trace_filter.py4
-rw-r--r--test/test_udp.py4
-rw-r--r--test/test_urpf.py2
-rw-r--r--test/test_vlib.py3
-rw-r--r--test/test_vrrp.py2
-rw-r--r--test/test_vxlan.py4
-rw-r--r--test/test_vxlan6.py2
68 files changed, 351 insertions, 0 deletions
diff --git a/test/asf/test_adl.py b/test/asf/test_adl.py
index 7e5ca8dcbe3..70d32bce9da 100644
--- a/test/asf/test_adl.py
+++ b/test/asf/test_adl.py
@@ -3,8 +3,10 @@
import unittest
from asfframework import VppAsfTestCase, VppTestRunner
+from config import config
+@unittest.skipIf("adl" in config.excluded_plugins, "Exclude ADL plugin tests")
class TestAdl(VppAsfTestCase):
"""Allow/Deny Plugin Unit Test Cases"""
diff --git a/test/asf/test_lb_api.py b/test/asf/test_lb_api.py
index 9608d0473a6..031479eb7f4 100644
--- a/test/asf/test_lb_api.py
+++ b/test/asf/test_lb_api.py
@@ -13,10 +13,14 @@
# limitations under the License.
from asfframework import VppAsfTestCase
+from config import config
+
+import unittest
DEFAULT_VIP = "lb_vip_details(_0=978, context=12, vip=vl_api_lb_ip_addr_t(pfx=IPv6Network(u'::/0'), protocol=<vl_api_ip_proto_t.IP_API_PROTO_RESERVED: 255>, port=0), encap=<vl_api_lb_encap_type_t.LB_API_ENCAP_TYPE_GRE4: 0>, dscp=<vl_api_ip_dscp_t.IP_API_DSCP_CS0: 0>, srv_type=<vl_api_lb_srv_type_t.LB_API_SRV_TYPE_CLUSTERIP: 0>, target_port=0, flow_table_length=0)" # noqa
+@unittest.skipIf("lb" in config.excluded_plugins, "Exclude LB plugin tests")
class TestLbEmptyApi(VppAsfTestCase):
"""TestLbEmptyApi"""
@@ -34,6 +38,7 @@ class TestLbEmptyApi(VppAsfTestCase):
self.assertEqual(rv, [], "Expected: [] Received: %r." % rv)
+@unittest.skipIf("lb" in config.excluded_plugins, "Exclude LB plugin tests")
class TestLbApi(VppAsfTestCase):
"""TestLbApi"""
@@ -55,6 +60,7 @@ class TestLbApi(VppAsfTestCase):
self.vapi.cli("lb vip 2001::/16 del")
+@unittest.skipIf("lb" in config.excluded_plugins, "Exclude LB plugin tests")
class TestLbAsApi(VppAsfTestCase):
"""TestLbAsApi"""
diff --git a/test/asf/test_session.py b/test/asf/test_session.py
index 64f59df5758..741773d6989 100644
--- a/test/asf/test_session.py
+++ b/test/asf/test_session.py
@@ -9,9 +9,13 @@ from asfframework import (
tag_run_solo,
)
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+from config import config
@tag_fixme_vpp_workers
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class TestSession(VppAsfTestCase):
"""Session Test Case"""
diff --git a/test/asf/test_tcp.py b/test/asf/test_tcp.py
index 69fc5c472a5..3edcd718b00 100644
--- a/test/asf/test_tcp.py
+++ b/test/asf/test_tcp.py
@@ -4,8 +4,12 @@ import unittest
from asfframework import VppAsfTestCase, VppTestRunner
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+from config import config
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class TestTCP(VppAsfTestCase):
"""TCP Test Case"""
diff --git a/test/asf/test_vcl.py b/test/asf/test_vcl.py
index a1113b863e8..a0141be80b2 100644
--- a/test/asf/test_vcl.py
+++ b/test/asf/test_vcl.py
@@ -403,6 +403,9 @@ class LDPCutThruTestCase(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLCutThruTestCase(VCLTestCase):
"""VCL Cut Thru Tests"""
@@ -489,6 +492,9 @@ class VCLCutThruTestCase(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackEcho(VCLTestCase):
"""VCL Thru Host Stack Echo"""
@@ -543,6 +549,9 @@ class VCLThruHostStackEcho(VCLTestCase):
self.logger.debug(self.vapi.cli("show app mq"))
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackTLS(VCLTestCase):
"""VCL Thru Host Stack TLS"""
@@ -594,6 +603,9 @@ class VCLThruHostStackTLS(VCLTestCase):
self.logger.debug(self.vapi.cli("show app mq"))
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackEchoInterruptMode(VCLThruHostStackEcho):
"""VCL Thru Host Stack Echo interrupt mode"""
@@ -625,6 +637,9 @@ class VCLThruHostStackTLSInterruptMode(VCLThruHostStackTLS):
super(VCLThruHostStackTLS, cls).setUpClass()
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackDTLS(VCLTestCase):
"""VCL Thru Host Stack DTLS"""
@@ -675,6 +690,9 @@ class VCLThruHostStackDTLS(VCLTestCase):
self.logger.debug(self.vapi.cli("show app mq"))
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackQUIC(VCLTestCase):
"""VCL Thru Host Stack QUIC"""
@@ -726,6 +744,9 @@ class VCLThruHostStackQUIC(VCLTestCase):
self.logger.debug(self.vapi.cli("show app mq"))
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackBidirNsock(VCLTestCase):
"""VCL Thru Host Stack Bidir Nsock"""
@@ -780,6 +801,9 @@ class VCLThruHostStackBidirNsock(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class LDPThruHostStackBidirNsock(VCLTestCase):
"""LDP Thru Host Stack Bidir Nsock"""
@@ -830,6 +854,9 @@ class LDPThruHostStackBidirNsock(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class LDPThruHostStackNsock(VCLTestCase):
"""LDP Thru Host Stack Nsock"""
@@ -879,6 +906,9 @@ class LDPThruHostStackNsock(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLThruHostStackNsock(VCLTestCase):
"""VCL Thru Host Stack Nsock"""
@@ -1125,6 +1155,9 @@ class LDPIpv6CutThruTestCase(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLIpv6CutThruTestCase(VCLTestCase):
"""VCL IPv6 Cut Thru Tests"""
@@ -1220,6 +1253,9 @@ class VCLIpv6CutThruTestCase(VCLTestCase):
)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class VCLIpv6ThruHostStackEcho(VCLTestCase):
"""VCL IPv6 Thru Host Stack Echo"""
diff --git a/test/asf/test_vhost.py b/test/asf/test_vhost.py
index 622716cafe3..f7cdecfa6de 100644
--- a/test/asf/test_vhost.py
+++ b/test/asf/test_vhost.py
@@ -5,8 +5,10 @@ import unittest
from asfframework import VppAsfTestCase, VppTestRunner
from vpp_vhost_interface import VppVhostInterface
+from config import config
+@unittest.skipIf("vhost" in config.excluded_plugins, "Exclude Vhost plugin tests")
class TesVhostInterface(VppAsfTestCase):
"""Vhost User Test Case"""
diff --git a/test/template_ipsec.py b/test/template_ipsec.py
index 7953f603287..d5ef023cb1b 100644
--- a/test/template_ipsec.py
+++ b/test/template_ipsec.py
@@ -24,6 +24,7 @@ from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSpdItfBinding
from ipaddress import ip_address
from re import search
from os import popen
+from config import config
class IPsecIPv4Params:
@@ -323,6 +324,9 @@ class IpsecTcp(object):
self.assert_packet_checksums_valid(decrypted)
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class IpsecTcpTests(IpsecTcp):
def test_tcp_checksum(self):
"""verify checksum correctness for vpp generated packets"""
@@ -1849,6 +1853,9 @@ class IpsecTra4(object):
self._verify_tra_anti_replay_algorithm_no_esn()
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class IpsecTra4Tests(IpsecTra4):
"""UT test methods for Transport v4"""
@@ -2029,6 +2036,9 @@ class IpsecTra6(object):
self.assert_equal(dc[IPv6ExtHdrFragment].id, 2)
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class IpsecTra6Tests(IpsecTra6):
"""UT test methods for Transport v6"""
diff --git a/test/test_arping.py b/test/test_arping.py
index a3e7e041ba1..435b15ee121 100644
--- a/test/test_arping.py
+++ b/test/test_arping.py
@@ -2,6 +2,9 @@ from scapy.layers.l2 import ARP
from scapy.layers.inet6 import ICMPv6ND_NS, ICMPv6ND_NA, IPv6
from framework import VppTestCase
+from config import config
+
+import unittest
""" TestArping is a subclass of VPPTestCase classes.
@@ -10,6 +13,7 @@ Basic test for sanity check of arping.
"""
+@unittest.skipIf("arping" in config.excluded_plugins, "Exclude Arping plugin tests")
class TestArping(VppTestCase):
"""Arping Test Case"""
diff --git a/test/test_bond.py b/test/test_bond.py
index ccd6246bed8..3c0df628470 100644
--- a/test/test_bond.py
+++ b/test/test_bond.py
@@ -10,6 +10,7 @@ from framework import VppTestCase
from asfframework import VppTestRunner
from vpp_bond_interface import VppBondInterface
from vpp_papi import MACAddress, VppEnum
+from config import config
class TestBondInterface(VppTestCase):
@@ -174,6 +175,9 @@ class TestBondInterface(VppTestCase):
bond0.remove_vpp_config()
+ @unittest.skipIf(
+ "lacp" in config.excluded_plugins, "Exclude tests requiring LACP plugin"
+ )
def test_bond_add_member(self):
"""Bond add_member/detach member test"""
@@ -227,6 +231,9 @@ class TestBondInterface(VppTestCase):
bond0.remove_vpp_config()
+ @unittest.skipIf(
+ "lacp" in config.excluded_plugins, "Exclude tests requiring LACP plugin"
+ )
def test_bond(self):
"""Bond add/delete interface test"""
self.logger.info("Bond add interfaces")
diff --git a/test/test_cdp.py b/test/test_cdp.py
index da378dbebe3..8d72e88aa24 100644
--- a/test/test_cdp.py
+++ b/test/test_cdp.py
@@ -17,6 +17,7 @@ from scapy.all import raw
from re import compile
from time import sleep
from util import ppp
+from config import config
import platform
import sys
import unittest
@@ -39,6 +40,7 @@ class CustomTLV(Packet):
]
+@unittest.skipIf("cdp" in config.excluded_plugins, "Exclude CDP plugin tests")
class TestCDP(VppTestCase):
"""CDP Test Case"""
diff --git a/test/test_cnat.py b/test/test_cnat.py
index ff8e1ebbbbb..9e979a4e09e 100644
--- a/test/test_cnat.py
+++ b/test/test_cnat.py
@@ -6,6 +6,7 @@ from framework import VppTestCase
from asfframework import VppTestRunner
from vpp_ip import INVALID_INDEX
from itertools import product
+from config import config
from scapy.packet import Raw
from scapy.layers.l2 import Ether
@@ -335,6 +336,7 @@ class CnatTestContext(object):
# -------------------------------------------------------------------
+@unittest.skipIf("cnat" in config.excluded_plugins, "Exclude CNAT plugin tests")
class TestCNatTranslation(CnatCommonTestCase):
"""CNat Translation"""
@@ -679,6 +681,7 @@ class TestCNatTranslation(CnatCommonTestCase):
self.cnat_fhc_translation()
+@unittest.skipIf("cnat" in config.excluded_plugins, "Exclude CNAT plugin tests")
class TestCNatSourceNAT(CnatCommonTestCase):
"""CNat Source NAT"""
@@ -818,6 +821,7 @@ class TestCNatSourceNAT(CnatCommonTestCase):
self.vapi.cnat_session_purge()
+@unittest.skipIf("cnat" in config.excluded_plugins, "Exclude CNAT plugin tests")
class TestCNatDHCP(CnatCommonTestCase):
"""CNat Translation"""
diff --git a/test/test_det44.py b/test/test_det44.py
index ede80981349..11d33ef0acd 100644
--- a/test/test_det44.py
+++ b/test/test_det44.py
@@ -12,8 +12,10 @@ from scapy.layers.inet import IP, TCP, UDP, ICMP
from scapy.layers.inet import IPerror, UDPerror
from scapy.layers.l2 import Ether
from util import ppp
+from config import config
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestDET44(VppTestCase):
"""Deterministic NAT Test Cases"""
diff --git a/test/test_dhcp.py b/test/test_dhcp.py
index 3924ebc840d..64c4654b418 100644
--- a/test/test_dhcp.py
+++ b/test/test_dhcp.py
@@ -32,6 +32,7 @@ from vpp_papi import mac_pton, VppEnum
from vpp_sub_interface import VppDot1QSubint
from vpp_qos import VppQosEgressMap, VppQosMark
from vpp_dhcp import VppDHCPClient, VppDHCPProxy
+from config import config
DHCP4_CLIENT_PORT = 68
@@ -41,6 +42,7 @@ DHCP6_SERVER_PORT = 546
@tag_run_solo
+@unittest.skipIf("dhcp" in config.excluded_plugins, "Exclude DHCP plugin tests")
class TestDHCP(VppTestCase):
"""DHCP Test Case"""
diff --git a/test/test_dhcp6.py b/test/test_dhcp6.py
index 5c8e4354ab0..dbb550b1725 100644
--- a/test/test_dhcp6.py
+++ b/test/test_dhcp6.py
@@ -24,14 +24,17 @@ from scapy.layers.inet6 import IPv6, Ether, UDP
from framework import VppTestCase
from asfframework import tag_fixme_vpp_workers, tag_run_solo
from vpp_papi import VppEnum
+from config import config
import util
import os
+import unittest
def ip6_normalize(ip6):
return inet_ntop(AF_INET6, inet_pton(AF_INET6, ip6))
+@unittest.skipIf("dhcp" in config.excluded_plugins, "Exclude DHCP plugin tests")
class TestDHCPv6DataPlane(VppTestCase):
"""DHCPv6 Data Plane Test Case"""
@@ -243,6 +246,7 @@ class TestDHCPv6DataPlane(VppTestCase):
@tag_run_solo
+@unittest.skipIf("dhcp" in config.excluded_plugins, "Exclude DHCP plugin tests")
class TestDHCPv6IANAControlPlane(VppTestCase):
"""DHCPv6 IA NA Control Plane Test Case"""
@@ -497,6 +501,7 @@ class TestDHCPv6IANAControlPlane(VppTestCase):
@tag_fixme_vpp_workers
+@unittest.skipIf("dhcp" in config.excluded_plugins, "Exclude DHCP plugin tests")
class TestDHCPv6PDControlPlane(VppTestCase):
"""DHCPv6 PD Control Plane Test Case"""
diff --git a/test/test_dns.py b/test/test_dns.py
index edd1415bb01..77f26d71eaa 100644
--- a/test/test_dns.py
+++ b/test/test_dns.py
@@ -5,12 +5,14 @@ import unittest
from framework import VppTestCase
from asfframework import VppTestRunner
from ipaddress import *
+from config import config
from scapy.layers.inet import IP, UDP
from scapy.layers.l2 import Ether
from scapy.layers.dns import DNS, DNSQR
+@unittest.skipIf("dns" in config.excluded_plugins, "Exclude DNS plugin tests")
class TestDns(VppTestCase):
"""Dns Test Cases"""
diff --git a/test/test_dslite.py b/test/test_dslite.py
index ca481bc2d6b..b88605b3a2f 100644
--- a/test/test_dslite.py
+++ b/test/test_dslite.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import socket
+import unittest
from asfframework import tag_fixme_vpp_workers
from framework import VppTestCase
@@ -17,9 +18,11 @@ from scapy.packet import Raw
from syslog_rfc5424_parser import SyslogMessage, ParseError
from syslog_rfc5424_parser.constants import SyslogSeverity
from vpp_ip_route import VppIpRoute, VppRoutePath
+from config import config
@tag_fixme_vpp_workers
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestDSlite(VppTestCase):
"""DS-Lite Test Cases"""
@@ -233,6 +236,7 @@ class TestDSlite(VppTestCase):
self.logger.info(self.vapi.cli("show dslite sessions"))
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestDSliteCE(VppTestCase):
"""DS-Lite CE Test Cases"""
diff --git a/test/test_dvr.py b/test/test_dvr.py
index e616408e8c7..dcc17f040eb 100644
--- a/test/test_dvr.py
+++ b/test/test_dvr.py
@@ -13,10 +13,12 @@ from scapy.layers.l2 import Ether, Dot1Q
from scapy.layers.inet import IP, UDP
from socket import AF_INET
from ipaddress import IPv4Network
+from config import config
NUM_PKTS = 67
+@unittest.skipIf("acl" in config.excluded_plugins, "Exclude tests requiring ACL plugin")
class TestDVR(VppTestCase):
"""Distributed Virtual Router"""
diff --git a/test/test_flowprobe.py b/test/test_flowprobe.py
index 89ac97ea88c..9622e6158b5 100644
--- a/test/test_flowprobe.py
+++ b/test/test_flowprobe.py
@@ -31,6 +31,7 @@ from vpp_papi.macaddress import mac_ntop
from socket import inet_ntop
from vpp_papi import VppEnum
from vpp_sub_interface import VppDot1ADSubint
+from config import config
TMPL_COMMON_FIELD_COUNT = 6
@@ -384,6 +385,9 @@ class MethodHolder(VppTestCase):
@tag_fixme_vpp_workers
@tag_fixme_ubuntu2204
@tag_fixme_debian11
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class Flowprobe(MethodHolder):
"""Template verification, timer tests"""
@@ -1226,6 +1230,9 @@ class DatapathTestsHolder(object):
self.logger.info("FFP_TEST_FINISH_0002")
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class DatapathTx(MethodHolder, DatapathTestsHolder):
"""Collect info on Ethernet, IP4 and IP6 datapath (TX) (no timers)"""
@@ -1306,6 +1313,9 @@ class DatapathTx(MethodHolder, DatapathTestsHolder):
ipfix.remove_vpp_config()
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class DatapathRx(MethodHolder, DatapathTestsHolder):
"""Collect info on Ethernet, IP4 and IP6 datapath (RX) (no timers)"""
@@ -1316,6 +1326,9 @@ class DatapathRx(MethodHolder, DatapathTestsHolder):
@unittest.skipUnless(config.extended, "part of extended tests")
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class DisableIPFIX(MethodHolder):
"""Disable IPFIX"""
@@ -1364,6 +1377,9 @@ class DisableIPFIX(MethodHolder):
@unittest.skipUnless(config.extended, "part of extended tests")
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class ReenableIPFIX(MethodHolder):
"""Re-enable IPFIX"""
@@ -1431,6 +1447,9 @@ class ReenableIPFIX(MethodHolder):
@unittest.skipUnless(config.extended, "part of extended tests")
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class DisableFP(MethodHolder):
"""Disable Flowprobe feature"""
@@ -1539,6 +1558,9 @@ class DisableFP(MethodHolder):
@unittest.skipUnless(config.extended, "part of extended tests")
+@unittest.skipIf(
+ "flowprobe" in config.excluded_plugins, "Exclude Flowprobe plugin tests"
+)
class ReenableFP(MethodHolder):
"""Re-enable Flowprobe feature"""
diff --git a/test/test_geneve.py b/test/test_geneve.py
index 2b87303e710..f8c135bed10 100644
--- a/test/test_geneve.py
+++ b/test/test_geneve.py
@@ -5,6 +5,7 @@ import unittest
from framework import VppTestCase
from asfframework import VppTestRunner
from template_bd import BridgeDomain
+from config import config
from scapy.layers.l2 import Ether, ARP
from scapy.layers.inet import IP, UDP, ICMP
@@ -15,6 +16,7 @@ from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_ip import INVALID_INDEX
+@unittest.skipIf("geneve" in config.excluded_plugins, "Exclude GENEVE plugin tests")
class TestGeneve(BridgeDomain, VppTestCase):
"""GENEVE Test Case"""
@@ -250,6 +252,7 @@ class TestGeneve(BridgeDomain, VppTestCase):
self.logger.info(self.vapi.cli("show geneve tunnel"))
+@unittest.skipIf("geneve" in config.excluded_plugins, "Exclude GENEVE plugin tests")
class TestGeneveL3(VppTestCase):
"""GENEVE L3 Test Case"""
diff --git a/test/test_gre.py b/test/test_gre.py
index 763fb9d9b99..8b2851baea2 100644
--- a/test/test_gre.py
+++ b/test/test_gre.py
@@ -24,9 +24,11 @@ from vpp_ip_route import (
from vpp_mpls_tunnel_interface import VppMPLSTunnelInterface
from util import ppp, ppc
from vpp_papi import VppEnum
+from config import config
@tag_fixme_vpp_workers
+@unittest.skipIf("gre" in config.excluded_plugins, "Exclude GRE plugin tests")
class TestGREInputNodes(VppTestCase):
"""GRE Input Nodes Test Case"""
@@ -73,6 +75,7 @@ class TestGREInputNodes(VppTestCase):
self.assertEqual(err, err_count)
+@unittest.skipIf("gre" in config.excluded_plugins, "Exclude GRE plugin tests")
class TestGRE(VppTestCase):
"""GRE Test Case"""
diff --git a/test/test_gso.py b/test/test_gso.py
index 3d9ce5fb4ee..c3822b01faa 100644
--- a/test/test_gso.py
+++ b/test/test_gso.py
@@ -25,6 +25,7 @@ from vpp_ip_route import VppIpRoute, VppRoutePath, FibPathProto
from vpp_ipip_tun_interface import VppIpIpTunInterface
from vpp_vxlan_tunnel import VppVxlanTunnel
from vpp_gre_interface import VppGreInterface
+from config import config
from vpp_ipsec import VppIpsecSA, VppIpsecTunProtect
from template_ipsec import (
@@ -378,6 +379,9 @@ class TestGSO(VppTestCase):
sw_if_index=self.pg1.sw_if_index, enable_disable=0
)
+ @unittest.skipIf(
+ "vxlan" in config.excluded_plugins, "Exclude tests requiring VXLAN plugin"
+ )
def test_gso_vxlan(self):
"""GSO VXLAN test"""
self.logger.info(self.vapi.cli("sh int addr"))
diff --git a/test/test_gtpu.py b/test/test_gtpu.py
index 5fe4f36ccb3..d05a1ff89e8 100644
--- a/test/test_gtpu.py
+++ b/test/test_gtpu.py
@@ -5,6 +5,7 @@ import unittest
from framework import VppTestCase
from asfframework import VppTestRunner, tag_fixme_vpp_workers
from template_bd import BridgeDomain
+from config import config
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
@@ -17,6 +18,7 @@ from vpp_ip import INVALID_INDEX
@tag_fixme_vpp_workers
+@unittest.skipIf("gtpu" in config.excluded_plugins, "Exclude GTPU plugin tests")
class TestGtpuUDP(VppTestCase):
"""GTPU UDP ports Test Case"""
@@ -119,6 +121,7 @@ class TestGtpuUDP(VppTestCase):
)
+@unittest.skipIf("gtpu" in config.excluded_plugins, "Exclude GTPU plugin tests")
class TestGtpu(BridgeDomain, VppTestCase):
"""GTPU Test Case"""
diff --git a/test/test_igmp.py b/test/test_igmp.py
index 037f108b897..e0da2b82079 100644
--- a/test/test_igmp.py
+++ b/test/test_igmp.py
@@ -19,6 +19,7 @@ from vpp_igmp import (
wait_for_igmp_event,
)
from vpp_ip_route import find_mroute, VppIpTable
+from config import config
class IgmpMode:
@@ -27,6 +28,7 @@ class IgmpMode:
@tag_fixme_vpp_workers
+@unittest.skipIf("igmp" in config.excluded_plugins, "Exclude IGMP plugin tests")
class TestIgmp(VppTestCase):
"""IGMP Test Case"""
diff --git a/test/test_interface_crud.py b/test/test_interface_crud.py
index c88759d9b59..6565d23a8b6 100644
--- a/test/test_interface_crud.py
+++ b/test/test_interface_crud.py
@@ -18,6 +18,7 @@ from scapy.layers.l2 import Ether
from framework import VppTestCase
from asfframework import VppTestRunner
+from config import config
class TestLoopbackInterfaceCRUD(VppTestCase):
@@ -81,6 +82,9 @@ class TestLoopbackInterfaceCRUD(VppTestCase):
info = (i.local_ip4, request_src_if.remote_ip4, 0, i.sw_if_index)
self.assertIn(info, rcvd_icmp_pkts)
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_crud(self):
# create
loopbacks = self.create_loopback_interfaces(20)
diff --git a/test/test_ip4.py b/test/test_ip4.py
index 5dd82f4aeeb..f4b428df4d3 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -34,6 +34,7 @@ from vpp_papi import vpp_papi, VppEnum
from vpp_neighbor import VppNeighbor
from vpp_lo_interface import VppLoInterface
from vpp_policer import VppPolicer, PolicerAction
+from config import config
NUM_PKTS = 67
@@ -502,6 +503,9 @@ class TestIPv4IfAddrRoute(VppTestCase):
)
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class TestICMPEcho(VppTestCase):
"""ICMP Echo Test Case"""
diff --git a/test/test_ip6.py b/test/test_ip6.py
index 84b060aa7a3..25f2c623a0b 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -67,6 +67,7 @@ from vpp_policer import VppPolicer, PolicerAction
from ipaddress import IPv6Network, IPv6Address
from vpp_gre_interface import VppGreInterface
from vpp_teib import VppTeib
+from config import config
AF_INET6 = socket.AF_INET6
@@ -1368,6 +1369,9 @@ class TestIPv6IfAddrRoute(VppTestCase):
)
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class TestICMPv6Echo(VppTestCase):
"""ICMPv6 Echo Test Case"""
@@ -3324,6 +3328,9 @@ class TestIP6AddrReplace(VppTestCase):
self.assertTrue(pfx.query_vpp_config())
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class TestIP6LinkLocal(VppTestCase):
"""IPv6 Link Local"""
@@ -3416,6 +3423,9 @@ class TestIP6LinkLocal(VppTestCase):
p_echo_request_3.dst = self.pg1.local_mac
self.send_and_expect(self.pg1, [p_echo_request_3], self.pg1)
+ @unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests requiring GRE plugin"
+ )
def test_ip6_ll_p2p(self):
"""IPv6 Link Local P2P (GRE)"""
@@ -3445,6 +3455,9 @@ class TestIP6LinkLocal(VppTestCase):
self.pg0.unconfig_ip4()
gre_if.remove_vpp_config()
+ @unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests requiring GRE plugin"
+ )
def test_ip6_ll_p2mp(self):
"""IPv6 Link Local P2MP (GRE)"""
diff --git a/test/test_ip_mcast.py b/test/test_ip_mcast.py
index 564b4231da9..682e7699210 100644
--- a/test/test_ip_mcast.py
+++ b/test/test_ip_mcast.py
@@ -14,6 +14,7 @@ from vpp_ip_route import (
)
from vpp_gre_interface import VppGreInterface
from vpp_papi import VppEnum
+from config import config
from scapy.packet import Raw
from scapy.layers.l2 import Ether, GRE
@@ -884,6 +885,9 @@ class TestIPMcast(VppTestCase):
signals = self.vapi.mfib_signal_dump()
self.assertEqual(0, len(signals))
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_ip_mcast_vrf(self):
"""IP Multicast Replication in non-default table"""
@@ -976,6 +980,9 @@ class TestIPMcast(VppTestCase):
self.send_and_expect(self.pg8, tx, self.pg8)
+ @unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests requiring GRE plugin"
+ )
def test_ip_mcast_gre(self):
"""IP Multicast Replication over GRE"""
@@ -1056,6 +1063,9 @@ class TestIPMcast(VppTestCase):
self.assertEqual(rx[IP].dst, gre_if_3.t_dst)
self.assert_packet_checksums_valid(rx)
+ @unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests requiring GRE plugin"
+ )
def test_ip6_mcast_gre(self):
"""IP6 Multicast Replication over GRE"""
diff --git a/test/test_ip_session_redirect.py b/test/test_ip_session_redirect.py
index 620b21626a9..3fed62bfade 100644
--- a/test/test_ip_session_redirect.py
+++ b/test/test_ip_session_redirect.py
@@ -13,8 +13,13 @@ from vpp_papi import VppEnum
from vpp_ip_route import VppRoutePath
from framework import VppTestCase
+from config import config
+@unittest.skipIf(
+ "ip_session_redirect" in config.excluded_plugins,
+ "Exclude IP session redirect plugin tests",
+)
class TestIpSessionRedirect(VppTestCase):
"""IP session redirect Test Case"""
diff --git a/test/test_ipsec_ah.py b/test/test_ipsec_ah.py
index 8fece500907..bc31a87abb0 100644
--- a/test/test_ipsec_ah.py
+++ b/test/test_ipsec_ah.py
@@ -28,6 +28,7 @@ from vpp_ipsec import VppIpsecSA, VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSpdItfB
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_ip import DpoProto
from vpp_papi import VppEnum
+from config import config
class ConfigIpsecAH(TemplateIpsec):
@@ -526,6 +527,9 @@ class TestIpsecAhAll(ConfigIpsecAH, IpsecTra4, IpsecTra6, IpsecTun4, IpsecTun6):
def tearDown(self):
super(TestIpsecAhAll, self).tearDown()
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_integ_algs(self):
"""All Engines SHA[1_96, 256, 384, 512] w/ & w/o ESN"""
# foreach VPP crypto engine
diff --git a/test/test_ipsec_esp.py b/test/test_ipsec_esp.py
index 4e1957d8b53..bfdef2a78d7 100644
--- a/test/test_ipsec_esp.py
+++ b/test/test_ipsec_esp.py
@@ -1,4 +1,5 @@
import socket
+import unittest
from scapy.layers.ipsec import ESP
from scapy.layers.inet import IP, ICMP, UDP
from scapy.layers.inet6 import IPv6
@@ -27,6 +28,7 @@ from vpp_ipsec import VppIpsecSpd, VppIpsecSpdEntry, VppIpsecSA, VppIpsecSpdItfB
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_ip import DpoProto
from vpp_papi import VppEnum
+from config import config
NUM_PKTS = 67
engines_supporting_chain_bufs = ["openssl", "async"]
@@ -1075,6 +1077,9 @@ class MyParameters:
}
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class RunTestIpsecEspAll(ConfigIpsecESP, IpsecTra4, IpsecTra6, IpsecTun4, IpsecTun6):
"""Ipsec ESP all Algos"""
diff --git a/test/test_ipsec_spd_fp_input.py b/test/test_ipsec_spd_fp_input.py
index ec4a7c71d7b..eb04df49244 100644
--- a/test/test_ipsec_spd_fp_input.py
+++ b/test/test_ipsec_spd_fp_input.py
@@ -8,6 +8,7 @@ from template_ipsec import IPSecIPv4Fwd
from template_ipsec import IPSecIPv6Fwd
from test_ipsec_esp import TemplateIpsecEsp
from template_ipsec import SpdFastPathTemplate
+from config import config
def debug_signal_handler(signal, frame):
@@ -242,6 +243,9 @@ class IPSec4SpdTestCaseDiscard(SpdFastPathInbound):
self.verify_policy_match(0, policy_1)
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class IPSec4SpdTestCaseProtect(SpdFastPathInboundProtect):
""" IPSec/IPv4 inbound: Policy mode test case with fast path \
(add protect)"""
@@ -830,6 +834,9 @@ class IPSec4SpdTestCaseMultiple(SpdFastPathInbound):
self.verify_policy_match(0, policy_22)
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class IPSec6SpdTestCaseProtect(SpdFastPathIPv6InboundProtect):
""" IPSec/IPv6 inbound: Policy mode test case with fast path \
(add protect)"""
diff --git a/test/test_ipsec_tun_if_esp.py b/test/test_ipsec_tun_if_esp.py
index a7f91b9e967..a17e432ac51 100644
--- a/test/test_ipsec_tun_if_esp.py
+++ b/test/test_ipsec_tun_if_esp.py
@@ -41,6 +41,7 @@ from vpp_papi import VppEnum
from vpp_papi_provider import CliFailedCommandError
from vpp_acl import AclRule, VppAcl, VppAclInterface
from vpp_policer import PolicerAction, VppPolicer, Dir
+from config import config
def config_tun_params(p, encryption_type, tun_if, src=None, dst=None):
@@ -1309,6 +1310,9 @@ class TestIpsec6MultiTunIfEsp(TemplateIpsec6TunProtect, TemplateIpsec, IpsecTun6
self.assertEqual(p.tun_if.get_tx_stats(), 127)
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGreTebIfEsp(TemplateIpsec, IpsecTun4Tests):
"""Ipsec GRE TEB ESP - TUN tests"""
@@ -1433,6 +1437,9 @@ class TestIpsecGreTebIfEsp(TemplateIpsec, IpsecTun4Tests):
super(TestIpsecGreTebIfEsp, self).tearDown()
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGreTebVlanIfEsp(TemplateIpsec, IpsecTun4Tests):
"""Ipsec GRE TEB ESP - TUN tests"""
@@ -1568,6 +1575,9 @@ class TestIpsecGreTebVlanIfEsp(TemplateIpsec, IpsecTun4Tests):
self.pg1_11.remove_vpp_config()
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGreTebIfEspTra(TemplateIpsec, IpsecTun4Tests):
"""Ipsec GRE TEB ESP - Tra tests"""
@@ -1686,6 +1696,9 @@ class TestIpsecGreTebIfEspTra(TemplateIpsec, IpsecTun4Tests):
super(TestIpsecGreTebIfEspTra, self).tearDown()
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGreTebUdpIfEspTra(TemplateIpsec, IpsecTun4Tests):
"""Ipsec GRE TEB UDP ESP - Tra tests"""
@@ -1819,6 +1832,9 @@ class TestIpsecGreTebUdpIfEspTra(TemplateIpsec, IpsecTun4Tests):
super(TestIpsecGreTebUdpIfEspTra, self).tearDown()
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGreIfEsp(TemplateIpsec, IpsecTun4Tests):
"""Ipsec GRE ESP - TUN tests"""
@@ -1931,6 +1947,9 @@ class TestIpsecGreIfEsp(TemplateIpsec, IpsecTun4Tests):
super(TestIpsecGreIfEsp, self).tearDown()
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGreIfEspTra(TemplateIpsec, IpsecTun4Tests):
"""Ipsec GRE ESP - TRA tests"""
@@ -2060,6 +2079,9 @@ class TestIpsecGreIfEspTra(TemplateIpsec, IpsecTun4Tests):
self.assertEqual(err, 1)
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecGre6IfEspTra(TemplateIpsec, IpsecTun6Tests):
"""Ipsec GRE ESP - TRA tests"""
@@ -2174,6 +2196,9 @@ class TestIpsecGre6IfEspTra(TemplateIpsec, IpsecTun6Tests):
super(TestIpsecGre6IfEspTra, self).tearDown()
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecMGreIfEspTra4(TemplateIpsec, IpsecTun4):
"""Ipsec mGRE ESP v4 TRA tests"""
@@ -2329,6 +2354,9 @@ class TestIpsecMGreIfEspTra4(TemplateIpsec, IpsecTun4):
self.verify_tun_44(p, count=N_PKTS)
+@unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests depending on GRE plugin"
+)
class TestIpsecMGreIfEspTra6(TemplateIpsec, IpsecTun6):
"""Ipsec mGRE ESP v6 TRA tests"""
@@ -2591,6 +2619,9 @@ class TestIpsec4TunProtectUdpTfc(TemplateIpsec4TunTfc, TestIpsec4TunProtectUdp):
@tag_fixme_vpp_workers
+@unittest.skipIf(
+ "acl" in config.excluded_plugins, "Exclude tests depending on ACL plugin"
+)
class TestIpsec4TunProtectTun(TemplateIpsec, TemplateIpsec4TunProtect, IpsecTun4):
"""IPsec IPv4 Tunnel protect - tunnel mode"""
@@ -3607,6 +3638,9 @@ class TestIpsecItf6Tfc(TemplateIpsec6TunTfc, TestIpsecItf6):
"""IPsec Interface IPv6 with TFC"""
+@unittest.skipIf(
+ "acl" in config.excluded_plugins, "Exclude tests depending on ACL plugin"
+)
class TestIpsecMIfEsp4(TemplateIpsec, IpsecTun4):
"""Ipsec P2MP ESP v4 tests"""
diff --git a/test/test_l2tp.py b/test/test_l2tp.py
index 172b0b8e0b8..34022629cc6 100644
--- a/test/test_l2tp.py
+++ b/test/test_l2tp.py
@@ -5,9 +5,13 @@ from scapy.layers.inet6 import IPv6
from asfframework import tag_fixme_vpp_workers
from framework import VppTestCase
+from config import config
+
+import unittest
@tag_fixme_vpp_workers
+@unittest.skipIf("l2tp" in config.excluded_plugins, "Exclude L2TP plugin tests")
class TestL2tp(VppTestCase):
"""L2TP Test Case"""
diff --git a/test/test_l3xc.py b/test/test_l3xc.py
index 69267b35817..d94292e5be4 100644
--- a/test/test_l3xc.py
+++ b/test/test_l3xc.py
@@ -11,6 +11,7 @@ from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
from vpp_object import VppObject
+from config import config
NUM_PKTS = 67
@@ -56,6 +57,7 @@ class VppL3xc(VppObject):
return "l3xc-%d" % self.intf.sw_if_index
+@unittest.skipIf("l3xc" in config.excluded_plugins, "Exclude L3XC plugin tests")
class TestL3xc(VppTestCase):
"""L3XC Test Case"""
diff --git a/test/test_lacp.py b/test/test_lacp.py
index af209501184..d8739775f27 100644
--- a/test/test_lacp.py
+++ b/test/test_lacp.py
@@ -10,12 +10,14 @@ from asfframework import VppTestRunner
from vpp_memif import VppSocketFilename, VppMemif
from vpp_bond_interface import VppBondInterface
from vpp_papi import VppEnum
+from config import config
bond_mac = "02:02:02:02:02:02"
lacp_dst_mac = "01:80:c2:00:00:02"
LACP_COLLECTION_AND_DISTRIBUTION_STATE = 63
+@unittest.skipIf("lacp" in config.excluded_plugins, "Exclude LACP plugin tests")
class TestMarker(VppTestCase):
"""LACP Marker Protocol Test Case"""
@@ -147,6 +149,7 @@ class TestMarker(VppTestCase):
bond1.remove_vpp_config()
+@unittest.skipIf("lacp" in config.excluded_plugins, "Exclude LACP plugin tests")
class TestLACP(VppTestCase):
"""LACP Test Case"""
diff --git a/test/test_lb.py b/test/test_lb.py
index e44684ecf2b..fc1674aeedf 100644
--- a/test/test_lb.py
+++ b/test/test_lb.py
@@ -11,6 +11,8 @@ from framework import VppTestCase
from util import ppp
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_ip import INVALID_INDEX
+from config import config
+import unittest
""" TestLB is a subclass of VPPTestCase classes.
@@ -32,6 +34,7 @@ from vpp_ip import INVALID_INDEX
"""
+@unittest.skipIf("lb" in config.excluded_plugins, "Exclude LB plugin tests")
class TestLB(VppTestCase):
"""Load Balancer Test Case"""
diff --git a/test/test_linux_cp.py b/test/test_linux_cp.py
index 95a9f1aca1f..84d5cb6cd88 100644
--- a/test/test_linux_cp.py
+++ b/test/test_linux_cp.py
@@ -20,6 +20,7 @@ from template_ipsec import (
IpsecTun4,
)
from test_ipsec_tun_if_esp import TemplateIpsecItf4
+from config import config
class VppLcpPair(VppObject):
@@ -51,6 +52,7 @@ class VppLcpPair(VppObject):
return False
+@unittest.skipIf("linux-cp" in config.excluded_plugins, "Exclude linux-cp plugin tests")
class TestLinuxCP(VppTestCase):
"""Linux Control Plane"""
@@ -294,6 +296,7 @@ class TestLinuxCP(VppTestCase):
tun6.unconfig_ip6()
+@unittest.skipIf("linux-cp" in config.excluded_plugins, "Exclude linux-cp plugin tests")
class TestLinuxCPIpsec(TemplateIpsec, TemplateIpsecItf4, IpsecTun4):
"""IPsec Interface IPv4"""
diff --git a/test/test_lisp.py b/test/test_lisp.py
index edc316ea7b2..7b6560eb3c2 100644
--- a/test/test_lisp.py
+++ b/test/test_lisp.py
@@ -19,6 +19,7 @@ from lisp import (
LispRemoteLocator,
)
from util import ppp
+from config import config
# From py_lispnetworking.lisp.py: # GNU General Public License v2.0
@@ -157,6 +158,7 @@ class SimpleDriver(Driver):
self.test.pg0.assert_nothing_captured()
+@unittest.skipIf("lisp" in config.excluded_plugins, "Exclude LISP plugin tests")
class TestLisp(VppTestCase):
"""Basic LISP test"""
@@ -206,6 +208,7 @@ class TestLisp(VppTestCase):
self.test_driver.run(self.deid_ip4)
+@unittest.skipIf("lisp" in config.excluded_plugins, "Exclude LISP plugin tests")
class TestLispUT(VppTestCase):
"""Lisp UT"""
diff --git a/test/test_lldp.py b/test/test_lldp.py
index 0a69be7c7b1..8b3f4cf1da2 100644
--- a/test/test_lldp.py
+++ b/test/test_lldp.py
@@ -96,6 +96,7 @@ class TestLldpCli(VppTestCase):
self.assertNotIn("pg0", reply)
+@unittest.skipIf("lldp" in config.excluded_plugins, "Exclude lldp plugin tests")
class TestLldpVapi(VppTestCase):
"""LLDP plugin test [VAPI]"""
diff --git a/test/test_map.py b/test/test_map.py
index c65c5df7cda..ffa9218b0c3 100644
--- a/test/test_map.py
+++ b/test/test_map.py
@@ -8,6 +8,7 @@ from asfframework import VppTestRunner
from vpp_ip import DpoProto
from vpp_ip_route import VppIpRoute, VppRoutePath
from util import fragment_rfc791, fragment_rfc8200
+from config import config
import scapy.compat
from scapy.layers.l2 import Ether
@@ -22,6 +23,7 @@ from scapy.layers.inet6 import (
)
+@unittest.skipIf("map" in config.excluded_plugins, "Exclude MAP plugin tests")
class TestMAP(VppTestCase):
"""MAP Test Case"""
diff --git a/test/test_map_br.py b/test/test_map_br.py
index a2c00d8d8ea..1f1bcccf792 100644
--- a/test/test_map_br.py
+++ b/test/test_map_br.py
@@ -5,6 +5,7 @@ import unittest
from framework import VppTestCase
from asfframework import VppTestRunner
from vpp_ip_route import VppIpRoute, VppRoutePath
+from config import config
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP, ICMP, TCP, IPerror, UDPerror
@@ -12,6 +13,7 @@ from scapy.layers.inet6 import IPv6, ICMPv6TimeExceeded, ICMPv6PacketTooBig
from scapy.layers.inet6 import ICMPv6EchoRequest, ICMPv6EchoReply, IPerror6
+@unittest.skipIf("map" in config.excluded_plugins, "Exclude MAP plugin tests")
class TestMAPBR(VppTestCase):
"""MAP-T Test Cases"""
diff --git a/test/test_memif.py b/test/test_memif.py
index 904343f2775..743c855b943 100644
--- a/test/test_memif.py
+++ b/test/test_memif.py
@@ -14,10 +14,12 @@ from remote_test import RemoteClass, RemoteVppTestCase
from vpp_memif import remove_all_memif_vpp_config, VppSocketFilename, VppMemif
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_papi import VppEnum
+from config import config
@tag_run_solo
@tag_fixme_debian11
+@unittest.skipIf("memif" in config.excluded_plugins, "Exclude Memif plugin tests")
class TestMemif(VppTestCase):
"""Memif Test Case"""
diff --git a/test/test_mpls.py b/test/test_mpls.py
index 0e747ec7cd0..daa0d967d2e 100644
--- a/test/test_mpls.py
+++ b/test/test_mpls.py
@@ -25,6 +25,7 @@ from vpp_ip_route import (
)
from vpp_mpls_tunnel_interface import VppMPLSTunnelInterface
from vpp_papi import VppEnum
+from config import config
import scapy.compat
from scapy.packet import Raw
@@ -1520,6 +1521,9 @@ class TestMPLS(VppTestCase):
rx = self.send_and_expect(self.pg1, tx, self.pg1)
self.verify_capture_ip6(self.pg0, rx, tx)
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_deag(self):
"""MPLS Deagg"""
diff --git a/test/test_nat44_ed.py b/test/test_nat44_ed.py
index 6eb4c665c58..7615312ac31 100644
--- a/test/test_nat44_ed.py
+++ b/test/test_nat44_ed.py
@@ -21,8 +21,10 @@ from vpp_acl import AclRule, VppAcl, VppAclInterface
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_papi import VppEnum
from util import StatsDiff
+from config import config
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44ED(VppTestCase):
"""NAT44ED Test Case"""
@@ -2605,6 +2607,7 @@ class TestNAT44ED(VppTestCase):
@tag_fixme_ubuntu2204
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44EDMW(TestNAT44ED):
"""NAT44ED MW Test Case"""
diff --git a/test/test_nat44_ed_output.py b/test/test_nat44_ed_output.py
index dbf1dc40a75..eea610df70e 100644
--- a/test/test_nat44_ed_output.py
+++ b/test/test_nat44_ed_output.py
@@ -9,6 +9,7 @@ from scapy.data import IP_PROTOS
from framework import VppTestCase
from asfframework import VppTestRunner
from vpp_papi import VppEnum
+from config import config
def get_nat44_ed_in2out_worker_index(ip, vpp_worker_count):
@@ -21,6 +22,7 @@ def get_nat44_ed_in2out_worker_index(ip, vpp_worker_count):
return 1 + h % vpp_worker_count
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44EDOutput(VppTestCase):
"""NAT44 ED output feature Test Case"""
diff --git a/test/test_nat44_ei.py b/test/test_nat44_ei.py
index 4748744ea6a..166044db435 100644
--- a/test/test_nat44_ei.py
+++ b/test/test_nat44_ei.py
@@ -36,6 +36,7 @@ from util import ppp
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_neighbor import VppNeighbor
from vpp_papi import VppEnum
+from config import config
# NAT HA protocol event data
@@ -913,6 +914,7 @@ def get_nat44_ei_in2out_worker_index(ip, vpp_worker_count):
@tag_fixme_debian11
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44EI(MethodHolder):
"""NAT44EI Test Cases"""
@@ -4122,6 +4124,7 @@ class TestNAT44EI(MethodHolder):
i.remove_vpp_config()
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44Out2InDPO(MethodHolder):
"""NAT44EI Test Cases using out2in DPO"""
@@ -4263,6 +4266,7 @@ class TestNAT44Out2InDPO(MethodHolder):
self.verify_capture_in(capture, self.pg0)
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44EIMW(MethodHolder):
"""NAT44EI Test Cases (multiple workers)"""
diff --git a/test/test_nat64.py b/test/test_nat64.py
index c3279655420..a28d7257aa0 100644
--- a/test/test_nat64.py
+++ b/test/test_nat64.py
@@ -36,10 +36,12 @@ from syslog_rfc5424_parser import SyslogMessage, ParseError
from syslog_rfc5424_parser.constants import SyslogSeverity
from util import ppc, ppp
from vpp_papi import VppEnum
+from config import config
@tag_fixme_vpp_workers
@tag_fixme_ubuntu2204
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT64(VppTestCase):
"""NAT64 Test Cases"""
diff --git a/test/test_nat66.py b/test/test_nat66.py
index 44df7222f9d..54f9321d44e 100644
--- a/test/test_nat66.py
+++ b/test/test_nat66.py
@@ -13,8 +13,10 @@ from scapy.layers.inet6 import (
from scapy.layers.l2 import Ether, GRE
from util import ppp
from vpp_papi import VppEnum
+from config import config
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT66(VppTestCase):
"""NAT66 Test Cases"""
diff --git a/test/test_npt66.py b/test/test_npt66.py
index 307dbabc39b..7479d3029b8 100644
--- a/test/test_npt66.py
+++ b/test/test_npt66.py
@@ -4,12 +4,14 @@ import unittest
import ipaddress
from framework import VppTestCase
from asfframework import VppTestRunner
+from config import config
from scapy.layers.inet6 import IPv6, ICMPv6EchoRequest, ICMPv6DestUnreach
from scapy.layers.l2 import Ether
from scapy.packet import Raw
+@unittest.skipIf("npt66" in config.excluded_plugins, "Exclude NPTv6 plugin tests")
class TestNPT66(VppTestCase):
"""NPTv6 Test Case"""
diff --git a/test/test_pcap.py b/test/test_pcap.py
index 72d215cea06..b73a601bcc8 100644
--- a/test/test_pcap.py
+++ b/test/test_pcap.py
@@ -9,8 +9,12 @@ from scapy.packet import Raw
from framework import VppTestCase
from asfframework import VppTestRunner
+from config import config
+@unittest.skipIf(
+ "dispatch-trace" in config.excluded_plugins, "Exclude dispatch trace plugin tests"
+)
class TestPcap(VppTestCase):
"""Pcap Unit Test Cases"""
diff --git a/test/test_ping.py b/test/test_ping.py
index f3da7eb96ca..654d47be161 100644
--- a/test/test_ping.py
+++ b/test/test_ping.py
@@ -3,6 +3,9 @@ from scapy.layers.inet import IP, ICMP
from framework import VppTestCase
from vpp_ip_route import VppIpInterfaceAddress, VppIpRoute, VppRoutePath
from vpp_neighbor import VppNeighbor
+from config import config
+
+import unittest
""" TestPing is a subclass of VPPTestCase classes.
@@ -11,6 +14,7 @@ Basic test for sanity check of the ping.
"""
+@unittest.skipIf("ping" in config.excluded_plugins, "Exclude Ping plugin tests")
class TestPing(VppTestCase):
"""Ping Test Case"""
diff --git a/test/test_pipe.py b/test/test_pipe.py
index 83f5f96c998..01d2f30f494 100644
--- a/test/test_pipe.py
+++ b/test/test_pipe.py
@@ -11,6 +11,7 @@ from asfframework import VppTestRunner
from vpp_interface import VppInterface
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
from vpp_acl import AclRule, VppAcl, VppAclInterface
+from config import config
NUM_PKTS = 67
@@ -63,6 +64,7 @@ class VppPipe(VppInterface):
)
+@unittest.skipIf("acl" in config.excluded_plugins, "Exclude tests requiring ACL plugin")
class TestPipe(VppTestCase):
"""Pipes"""
diff --git a/test/test_pnat.py b/test/test_pnat.py
index a7bd24b612c..45e20240760 100644
--- a/test/test_pnat.py
+++ b/test/test_pnat.py
@@ -6,8 +6,10 @@ from scapy.layers.inet import Ether, IP, UDP, ICMP
from framework import VppTestCase
from asfframework import VppTestRunner
from vpp_papi import VppEnum
+from config import config
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestPNAT(VppTestCase):
"""PNAT Test Case"""
diff --git a/test/test_pppoe.py b/test/test_pppoe.py
index e396250621f..4a6a0251b9f 100644
--- a/test/test_pppoe.py
+++ b/test/test_pppoe.py
@@ -13,8 +13,10 @@ from asfframework import VppTestRunner
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_pppoe_interface import VppPppoeInterface
from util import ppp
+from config import config
+@unittest.skipIf("pppoe" in config.excluded_plugins, "Exclude PPPoE plugin tests")
class TestPPPoE(VppTestCase):
"""PPPoE Test Case"""
diff --git a/test/test_reassembly.py b/test/test_reassembly.py
index 98c50f9bb61..caac7ce4df1 100644
--- a/test/test_reassembly.py
+++ b/test/test_reassembly.py
@@ -25,6 +25,7 @@ from util import ppp, fragment_rfc791, fragment_rfc8200
from vpp_gre_interface import VppGreInterface
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_papi import VppEnum
+from config import config
# 35 is enough to have >257 400-byte fragments
test_packet_count = 35
@@ -588,6 +589,9 @@ Ethernet-Payload.IPv4-Packet.IPv4-Header.Fragment-Offset; Test-case: 5737"""
self.verify_capture(packets, dropped_packet_indexes)
self.src_if.assert_nothing_captured()
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_local_enable_disable(self):
"""local reassembly enabled/disable"""
self.vapi.ip_reassembly_enable_disable(
@@ -1675,6 +1679,9 @@ class TestIPv6Reassembly(VppTestCase):
)
rx = self.send_and_expect(self.pg0, [pkt], self.pg0)
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_one_fragment(self):
"""whole packet in one fragment processed independently"""
pkt = (
@@ -1702,6 +1709,9 @@ class TestIPv6Reassembly(VppTestCase):
rx = self.send_and_expect(self.pg0, frags[1:], self.pg0, n_rx=1)
self.assertNotIn(IPv6ExtHdrFragment, rx)
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_bunch_of_fragments(self):
"""valid fragments followed by rogue fragments and atomic fragment"""
pkt = (
@@ -1731,6 +1741,9 @@ class TestIPv6Reassembly(VppTestCase):
rx = self.send_and_expect(self.pg0, [pkt], self.pg0)
self.assertNotIn(IPv6ExtHdrFragment, rx)
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_local_enable_disable(self):
"""local reassembly enabled/disable"""
self.vapi.ip_reassembly_enable_disable(
@@ -2366,6 +2379,9 @@ class TestIPv4ReassemblyLocalNode(VppTestCase):
index, seen, "Packet with packet_index %d not received" % index
)
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_reassembly(self):
"""basic reassembly"""
@@ -2492,6 +2508,9 @@ class TestFIFReassembly(VppTestCase):
"Packet with packet_index %d not received" % index,
)
+ @unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests requiring GRE plugin"
+ )
def test_fif4(self):
"""Fragments in fragments (4o4)"""
@@ -2567,6 +2586,9 @@ class TestFIFReassembly(VppTestCase):
self.gre4.remove_vpp_config()
self.logger.debug(self.vapi.ppcli("show interface"))
+ @unittest.skipIf(
+ "gre" in config.excluded_plugins, "Exclude tests requiring GRE plugin"
+ )
def test_fif6(self):
"""Fragments in fragments (6o6)"""
# TODO this should be ideally in setUpClass, but then we hit a bug
diff --git a/test/test_span.py b/test/test_span.py
index 8eea1b0661d..31dff682f92 100644
--- a/test/test_span.py
+++ b/test/test_span.py
@@ -14,6 +14,7 @@ from vpp_gre_interface import VppGreInterface
from vpp_vxlan_tunnel import VppVxlanTunnel
from collections import namedtuple
from vpp_papi import VppEnum
+from config import config
Tag = namedtuple("Tag", ["dot1", "vlan"])
@@ -21,6 +22,9 @@ DOT1AD = 0x88A8
DOT1Q = 0x8100
+@unittest.skipIf(
+ "vxlan" in config.excluded_plugins, "Exclude tests requiring VXLAN plugin"
+)
class TestSpan(VppTestCase):
"""SPAN Test Case"""
diff --git a/test/test_srv6_ad.py b/test/test_srv6_ad.py
index 5d7a621a9b8..69bdd313851 100644
--- a/test/test_srv6_ad.py
+++ b/test/test_srv6_ad.py
@@ -15,8 +15,10 @@ from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
from scapy.layers.inet import IP, UDP
from util import ppp
+from config import config
+@unittest.skipIf("srv6-ad" in config.excluded_plugins, "Exclude srv6-ad plugin tests")
class TestSRv6Ad(VppTestCase):
"""SRv6 Dynamic Proxy plugin Test Case"""
diff --git a/test/test_srv6_ad_flow.py b/test/test_srv6_ad_flow.py
index f776c71ac4b..f1e5109f472 100644
--- a/test/test_srv6_ad_flow.py
+++ b/test/test_srv6_ad_flow.py
@@ -14,8 +14,12 @@ from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
from scapy.layers.inet import IP, UDP
from util import ppp
+from config import config
+@unittest.skipIf(
+ "srv6-ad-flow" in config.excluded_plugins, "Exclude srv6-ad-flow plugin tests"
+)
class TestSRv6AdFlow(VppTestCase):
"""SRv6 Flow-based Dynamic Proxy plugin Test Case"""
diff --git a/test/test_srv6_as.py b/test/test_srv6_as.py
index 645cf338596..0f78159dccf 100644
--- a/test/test_srv6_as.py
+++ b/test/test_srv6_as.py
@@ -11,10 +11,12 @@ from scapy.packet import Raw
from scapy.layers.l2 import Ether, Dot1Q
from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
from scapy.layers.inet import IP, UDP
+from config import config
from util import ppp
+@unittest.skipIf("srv6-as" in config.excluded_plugins, "Exclude srv6-as plugin tests")
class TestSRv6As(VppTestCase):
"""SRv6 Static Proxy plugin Test Case"""
diff --git a/test/test_srv6_mobile.py b/test/test_srv6_mobile.py
index 314dfc114e2..7a96e84e34f 100644
--- a/test/test_srv6_mobile.py
+++ b/test/test_srv6_mobile.py
@@ -4,6 +4,7 @@ from framework import VppTestCase
from ipaddress import IPv4Address
from ipaddress import IPv6Address
from vpp_ip_route import VppIpRoute, VppRoutePath, FibPathProto, VppIpTable
+from config import config
from vpp_srv6_mobile import (
SRv6MobileNhtype,
@@ -14,7 +15,12 @@ from vpp_srv6_mobile import (
from scapy.contrib.gtp import *
from scapy.all import *
+import unittest
+
+@unittest.skipIf(
+ "srv6-mobile" in config.excluded_plugins, "Exclude srv6-mobile plugin tests"
+)
class TestSRv6EndMGTP4E(VppTestCase):
"""SRv6 End.M.GTP4.E (SRv6 -> GTP-U)"""
@@ -108,6 +114,9 @@ class TestSRv6EndMGTP4E(VppTestCase):
self.assertEqual(pkt[GTP_U_Header].teid, 0xBBBBBBBB)
+@unittest.skipIf(
+ "srv6-mobile" in config.excluded_plugins, "Exclude srv6-mobile plugin tests"
+)
class TestSRv6TMGTP4D(VppTestCase):
"""SRv6 T.M.GTP4.D (GTP-U -> SRv6)"""
@@ -215,6 +224,9 @@ class TestSRv6TMGTP4D(VppTestCase):
)
+@unittest.skipIf(
+ "srv6-mobile" in config.excluded_plugins, "Exclude srv6-mobile plugin tests"
+)
class TestSRv6EndMGTP6E(VppTestCase):
"""SRv6 End.M.GTP6.E"""
@@ -306,6 +318,9 @@ class TestSRv6EndMGTP6E(VppTestCase):
self.assertEqual(pkt[GTP_U_Header].teid, 0xBBBBBBBB)
+@unittest.skipIf(
+ "srv6-mobile" in config.excluded_plugins, "Exclude srv6-mobile plugin tests"
+)
class TestSRv6EndMGTP6D(VppTestCase):
"""SRv6 End.M.GTP6.D"""
diff --git a/test/test_svs.py b/test/test_svs.py
index 1efc8fc846b..01173a201b7 100644
--- a/test/test_svs.py
+++ b/test/test_svs.py
@@ -12,10 +12,12 @@ from scapy.layers.inet import IP, UDP
from scapy.layers.inet6 import IPv6
from vpp_papi import VppEnum
+from config import config
NUM_PKTS = 67
+@unittest.skipIf("svs" in config.excluded_plugins, "Exclude SVS plugin tests")
class TestSVS(VppTestCase):
"""SVS Test Case"""
diff --git a/test/test_trace_filter.py b/test/test_trace_filter.py
index c188631c200..45718d6f27f 100644
--- a/test/test_trace_filter.py
+++ b/test/test_trace_filter.py
@@ -8,6 +8,7 @@ from framework import VppTestCase
from asfframework import VppTestRunner
from vpp_papi import VppEnum
from vpp_ipsec import VppIpsecSA, VppIpsecSpd, VppIpsecSpdItfBinding, VppIpsecSpdEntry
+from config import config
from scapy.contrib.geneve import GENEVE
from scapy.packet import Raw
@@ -291,6 +292,9 @@ class TestTracefilter(TemplateTraceFilter):
self.assertEqual(len(pcap), 17)
+@unittest.skipIf(
+ "tracenode" in config.excluded_plugins, "Exclude tests requiring tracenode plugin"
+)
class TestTraceFilterInner(TemplateTraceFilter):
"""Packet Tracer Filter Inner Test"""
diff --git a/test/test_udp.py b/test/test_udp.py
index 34307ef1aab..edcd293197f 100644
--- a/test/test_udp.py
+++ b/test/test_udp.py
@@ -17,6 +17,7 @@ from vpp_ip_route import (
)
from vpp_neighbor import VppNeighbor
from vpp_papi import VppEnum
+from config import config
from scapy.packet import Raw
from scapy.layers.l2 import Ether
@@ -679,6 +680,9 @@ class TestUdpEncap(VppTestCase):
@tag_fixme_vpp_workers
+@unittest.skipIf(
+ "hs_apps" in config.excluded_plugins, "Exclude tests requiring hs_apps plugin"
+)
class TestUDP(VppTestCase):
"""UDP Test Case"""
diff --git a/test/test_urpf.py b/test/test_urpf.py
index 1e4a6c5bb34..47a260081cc 100644
--- a/test/test_urpf.py
+++ b/test/test_urpf.py
@@ -11,10 +11,12 @@ from scapy.layers.inet import IP, UDP
from scapy.layers.inet6 import IPv6
from vpp_papi import VppEnum
+from config import config
N_PKTS = 63
+@unittest.skipIf("urpf" in config.excluded_plugins, "Exclude URPF plugin tests")
class TestURPF(VppTestCase):
"""Unicast Reverse Path Forwarding Test Case"""
diff --git a/test/test_vlib.py b/test/test_vlib.py
index 1b92c94a4c4..60c354bccfc 100644
--- a/test/test_vlib.py
+++ b/test/test_vlib.py
@@ -252,6 +252,9 @@ class TestVlibFrameLeak(VppTestCase):
i.unconfig_ip4()
i.admin_down()
+ @unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+ )
def test_vlib_mw_refork_frame_leak(self):
"""Vlib worker thread refork leak test case"""
icmp_id = 0xB
diff --git a/test/test_vrrp.py b/test/test_vrrp.py
index 8575016c326..41b8268e6bc 100644
--- a/test/test_vrrp.py
+++ b/test/test_vrrp.py
@@ -252,6 +252,7 @@ class VppVRRPVirtualRouter(VppObject):
return pkt
+@unittest.skipIf("vrrp" in config.excluded_plugins, "Exclude VRRP plugin tests")
class TestVRRP4(VppTestCase):
"""IPv4 VRRP Test Case"""
@@ -884,6 +885,7 @@ class TestVRRP4(VppTestCase):
self.assertEqual(rx[VRRPv3].addrlist, [vip])
+@unittest.skipIf("vrrp" in config.excluded_plugins, "Exclude VRRP plugin tests")
class TestVRRP6(VppTestCase):
"""IPv6 VRRP Test Case"""
diff --git a/test/test_vxlan.py b/test/test_vxlan.py
index 284e1359116..939a57f7343 100644
--- a/test/test_vxlan.py
+++ b/test/test_vxlan.py
@@ -20,8 +20,10 @@ from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_vxlan_tunnel import VppVxlanTunnel
from vpp_ip import INVALID_INDEX
from vpp_neighbor import VppNeighbor
+from config import config
+@unittest.skipIf("vxlan" in config.excluded_plugins, "Exclude VXLAN plugin tests")
class TestVxlan(BridgeDomain, VppTestCase):
"""VXLAN Test Case"""
@@ -480,6 +482,7 @@ class TestVxlan(BridgeDomain, VppTestCase):
self.logger.info(self.vapi.cli("show vxlan tunnel"))
+@unittest.skipIf("vxlan" in config.excluded_plugins, "Exclude VXLAN plugin tests")
class TestVxlan2(VppTestCase):
"""VXLAN Test Case"""
@@ -527,6 +530,7 @@ class TestVxlan2(VppTestCase):
rx = self.send_and_assert_no_replies(self.pg1, [p])
+@unittest.skipIf("vxlan" in config.excluded_plugins, "Exclude VXLAN plugin tests")
class TestVxlanL2Mode(VppTestCase):
"""VXLAN Test Case"""
diff --git a/test/test_vxlan6.py b/test/test_vxlan6.py
index 1bf01262a48..36e2f26e62f 100644
--- a/test/test_vxlan6.py
+++ b/test/test_vxlan6.py
@@ -14,8 +14,10 @@ import util
from vpp_ip_route import VppIpRoute, VppRoutePath
from vpp_vxlan_tunnel import VppVxlanTunnel
from vpp_ip import INVALID_INDEX
+from config import config
+@unittest.skipIf("vxlan" in config.excluded_plugins, "Exclude VXLAN plugin tests")
class TestVxlan6(BridgeDomain, VppTestCase):
"""VXLAN over IPv6 Test Case"""