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
diff --git a/test/asf/test_adl.py b/test/asf/test_adl.py
index 7e5ca8d..70d32bc 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 9608d04..031479e 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 @@
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 @@
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 64f59df..741773d 100644
--- a/test/asf/test_session.py
+++ b/test/asf/test_session.py
@@ -9,9 +9,13 @@
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 69fc5c4..3edcd71 100644
--- a/test/asf/test_tcp.py
+++ b/test/asf/test_tcp.py
@@ -4,8 +4,12 @@
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 a1113b8..a0141be 100644
--- a/test/asf/test_vcl.py
+++ b/test/asf/test_vcl.py
@@ -403,6 +403,9 @@
)
+@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 @@
)
+@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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
)
+@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 @@
)
+@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 @@
)
+@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 @@
)
+@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 @@
)
+@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 622716c..f7cdecf 100644
--- a/test/asf/test_vhost.py
+++ b/test/asf/test_vhost.py
@@ -5,8 +5,10 @@
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 7953f60..d5ef023 100644
--- a/test/template_ipsec.py
+++ b/test/template_ipsec.py
@@ -24,6 +24,7 @@
from ipaddress import ip_address
from re import search
from os import popen
+from config import config
class IPsecIPv4Params:
@@ -323,6 +324,9 @@
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 @@
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 @@
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 a3e7e04..435b15e 100644
--- a/test/test_arping.py
+++ b/test/test_arping.py
@@ -2,6 +2,9 @@
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 @@
"""
+@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 ccd6246..3c0df62 100644
--- a/test/test_bond.py
+++ b/test/test_bond.py
@@ -10,6 +10,7 @@
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 @@
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 @@
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 da378db..8d72e88 100644
--- a/test/test_cdp.py
+++ b/test/test_cdp.py
@@ -17,6 +17,7 @@
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 @@
]
+@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 ff8e1eb..9e979a4 100644
--- a/test/test_cnat.py
+++ b/test/test_cnat.py
@@ -6,6 +6,7 @@
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 @@
# -------------------------------------------------------------------
+@unittest.skipIf("cnat" in config.excluded_plugins, "Exclude CNAT plugin tests")
class TestCNatTranslation(CnatCommonTestCase):
"""CNat Translation"""
@@ -679,6 +681,7 @@
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 @@
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 ede8098..11d33ef 100644
--- a/test/test_det44.py
+++ b/test/test_det44.py
@@ -12,8 +12,10 @@
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 3924ebc..64c4654 100644
--- a/test/test_dhcp.py
+++ b/test/test_dhcp.py
@@ -32,6 +32,7 @@
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 @@
@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 5c8e435..dbb550b 100644
--- a/test/test_dhcp6.py
+++ b/test/test_dhcp6.py
@@ -24,14 +24,17 @@
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 @@
@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 @@
@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 edd1415..77f26d7 100644
--- a/test/test_dns.py
+++ b/test/test_dns.py
@@ -5,12 +5,14 @@
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 ca481bc..b88605b 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 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 @@
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 e616408..dcc17f0 100644
--- a/test/test_dvr.py
+++ b/test/test_dvr.py
@@ -13,10 +13,12 @@
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 89ac97e..9622e61 100644
--- a/test/test_flowprobe.py
+++ b/test/test_flowprobe.py
@@ -31,6 +31,7 @@
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 @@
@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 @@
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 @@
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 @@
@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 @@
@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 @@
@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 @@
@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 2b87303..f8c135b 100644
--- a/test/test_geneve.py
+++ b/test/test_geneve.py
@@ -5,6 +5,7 @@
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 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 @@
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 763fb9d..8b2851b 100644
--- a/test/test_gre.py
+++ b/test/test_gre.py
@@ -24,9 +24,11 @@
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 @@
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 3d9ce5f..c3822b0 100644
--- a/test/test_gso.py
+++ b/test/test_gso.py
@@ -25,6 +25,7 @@
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 @@
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 5fe4f36..d05a1ff 100644
--- a/test/test_gtpu.py
+++ b/test/test_gtpu.py
@@ -5,6 +5,7 @@
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 @@
@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 @@
)
+@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 037f108..e0da2b8 100644
--- a/test/test_igmp.py
+++ b/test/test_igmp.py
@@ -19,6 +19,7 @@
wait_for_igmp_event,
)
from vpp_ip_route import find_mroute, VppIpTable
+from config import config
class IgmpMode:
@@ -27,6 +28,7 @@
@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 c88759d..6565d23 100644
--- a/test/test_interface_crud.py
+++ b/test/test_interface_crud.py
@@ -18,6 +18,7 @@
from framework import VppTestCase
from asfframework import VppTestRunner
+from config import config
class TestLoopbackInterfaceCRUD(VppTestCase):
@@ -81,6 +82,9 @@
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 5dd82f4..f4b428d 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -34,6 +34,7 @@
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 @@
)
+@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 84b060a..25f2c62 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -67,6 +67,7 @@
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 @@
)
+@unittest.skipIf(
+ "ping" in config.excluded_plugins, "Exclude tests requiring Ping plugin"
+)
class TestICMPv6Echo(VppTestCase):
"""ICMPv6 Echo Test Case"""
@@ -3324,6 +3328,9 @@
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 @@
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 @@
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 564b423..682e769 100644
--- a/test/test_ip_mcast.py
+++ b/test/test_ip_mcast.py
@@ -14,6 +14,7 @@
)
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 @@
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 @@
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 @@
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 620b216..3fed62b 100644
--- a/test/test_ip_session_redirect.py
+++ b/test/test_ip_session_redirect.py
@@ -13,8 +13,13 @@
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 8fece50..bc31a87 100644
--- a/test/test_ipsec_ah.py
+++ b/test/test_ipsec_ah.py
@@ -28,6 +28,7 @@
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 @@
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 4e1957d..bfdef2a 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_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 @@
}
+@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 ec4a7c7..eb04df4 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 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 @@
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 @@
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 a7f91b9..a17e432 100644
--- a/test/test_ipsec_tun_if_esp.py
+++ b/test/test_ipsec_tun_if_esp.py
@@ -41,6 +41,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
@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 @@
"""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 172b0b8..3402262 100644
--- a/test/test_l2tp.py
+++ b/test/test_l2tp.py
@@ -5,9 +5,13 @@
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 69267b3..d94292e 100644
--- a/test/test_l3xc.py
+++ b/test/test_l3xc.py
@@ -11,6 +11,7 @@
from scapy.layers.inet import IP, UDP
from vpp_object import VppObject
+from config import config
NUM_PKTS = 67
@@ -56,6 +57,7 @@
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 af20950..d873977 100644
--- a/test/test_lacp.py
+++ b/test/test_lacp.py
@@ -10,12 +10,14 @@
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 @@
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 e44684e..fc1674a 100644
--- a/test/test_lb.py
+++ b/test/test_lb.py
@@ -11,6 +11,8 @@
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 @@
"""
+@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 95a9f1a..84d5cb6 100644
--- a/test/test_linux_cp.py
+++ b/test/test_linux_cp.py
@@ -20,6 +20,7 @@
IpsecTun4,
)
from test_ipsec_tun_if_esp import TemplateIpsecItf4
+from config import config
class VppLcpPair(VppObject):
@@ -51,6 +52,7 @@
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 @@
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 edc316e..7b6560e 100644
--- a/test/test_lisp.py
+++ b/test/test_lisp.py
@@ -19,6 +19,7 @@
LispRemoteLocator,
)
from util import ppp
+from config import config
# From py_lispnetworking.lisp.py: # GNU General Public License v2.0
@@ -157,6 +158,7 @@
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 @@
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 0a69be7..8b3f4cf 100644
--- a/test/test_lldp.py
+++ b/test/test_lldp.py
@@ -96,6 +96,7 @@
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 c65c5df..ffa9218 100644
--- a/test/test_map.py
+++ b/test/test_map.py
@@ -8,6 +8,7 @@
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 @@
)
+@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 a2c00d8..1f1bccc 100644
--- a/test/test_map_br.py
+++ b/test/test_map_br.py
@@ -5,6 +5,7 @@
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 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 904343f..743c855 100644
--- a/test/test_memif.py
+++ b/test/test_memif.py
@@ -14,10 +14,12 @@
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 0e747ec..daa0d96 100644
--- a/test/test_mpls.py
+++ b/test/test_mpls.py
@@ -25,6 +25,7 @@
)
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 @@
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 6eb4c66..7615312 100644
--- a/test/test_nat44_ed.py
+++ b/test/test_nat44_ed.py
@@ -21,8 +21,10 @@
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 @@
@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 dbf1dc4..eea610d 100644
--- a/test/test_nat44_ed_output.py
+++ b/test/test_nat44_ed_output.py
@@ -9,6 +9,7 @@
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 @@
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 4748744..166044d 100644
--- a/test/test_nat44_ei.py
+++ b/test/test_nat44_ei.py
@@ -36,6 +36,7 @@
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 @@
@tag_fixme_debian11
+@unittest.skipIf("nat" in config.excluded_plugins, "Exclude NAT plugin tests")
class TestNAT44EI(MethodHolder):
"""NAT44EI Test Cases"""
@@ -4122,6 +4124,7 @@
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 @@
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 c327965..a28d725 100644
--- a/test/test_nat64.py
+++ b/test/test_nat64.py
@@ -36,10 +36,12 @@
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 44df722..54f9321 100644
--- a/test/test_nat66.py
+++ b/test/test_nat66.py
@@ -13,8 +13,10 @@
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 307dbab..7479d30 100644
--- a/test/test_npt66.py
+++ b/test/test_npt66.py
@@ -4,12 +4,14 @@
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 72d215c..b73a601 100644
--- a/test/test_pcap.py
+++ b/test/test_pcap.py
@@ -9,8 +9,12 @@
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 f3da7eb..654d47b 100644
--- a/test/test_ping.py
+++ b/test/test_ping.py
@@ -3,6 +3,9 @@
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 @@
"""
+@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 83f5f96..01d2f30 100644
--- a/test/test_pipe.py
+++ b/test/test_pipe.py
@@ -11,6 +11,7 @@
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 @@
)
+@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 a7bd24b..45e2024 100644
--- a/test/test_pnat.py
+++ b/test/test_pnat.py
@@ -6,8 +6,10 @@
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 e396250..4a6a025 100644
--- a/test/test_pppoe.py
+++ b/test/test_pppoe.py
@@ -13,8 +13,10 @@
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 98c50f9..caac7ce 100644
--- a/test/test_reassembly.py
+++ b/test/test_reassembly.py
@@ -25,6 +25,7 @@
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 @@
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 @@
)
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 @@
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 @@
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 @@
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 @@
"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 @@
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 8eea1b0..31dff68 100644
--- a/test/test_span.py
+++ b/test/test_span.py
@@ -14,6 +14,7 @@
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 @@
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 5d7a621..69bdd31 100644
--- a/test/test_srv6_ad.py
+++ b/test/test_srv6_ad.py
@@ -15,8 +15,10 @@
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 f776c71..f1e5109 100644
--- a/test/test_srv6_ad_flow.py
+++ b/test/test_srv6_ad_flow.py
@@ -14,8 +14,12 @@
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 645cf33..0f78159 100644
--- a/test/test_srv6_as.py
+++ b/test/test_srv6_as.py
@@ -11,10 +11,12 @@
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 314dfc1..7a96e84 100644
--- a/test/test_srv6_mobile.py
+++ b/test/test_srv6_mobile.py
@@ -4,6 +4,7 @@
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 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 @@
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 @@
)
+@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 @@
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 1efc8fc..01173a2 100644
--- a/test/test_svs.py
+++ b/test/test_svs.py
@@ -12,10 +12,12 @@
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 c188631..45718d6 100644
--- a/test/test_trace_filter.py
+++ b/test/test_trace_filter.py
@@ -8,6 +8,7 @@
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 @@
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 34307ef..edcd293 100644
--- a/test/test_udp.py
+++ b/test/test_udp.py
@@ -17,6 +17,7 @@
)
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 @@
@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 1e4a6c5..47a2600 100644
--- a/test/test_urpf.py
+++ b/test/test_urpf.py
@@ -11,10 +11,12 @@
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 1b92c94..60c354b 100644
--- a/test/test_vlib.py
+++ b/test/test_vlib.py
@@ -252,6 +252,9 @@
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 8575016..41b8268 100644
--- a/test/test_vrrp.py
+++ b/test/test_vrrp.py
@@ -252,6 +252,7 @@
return pkt
+@unittest.skipIf("vrrp" in config.excluded_plugins, "Exclude VRRP plugin tests")
class TestVRRP4(VppTestCase):
"""IPv4 VRRP Test Case"""
@@ -884,6 +885,7 @@
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 284e135..939a57f 100644
--- a/test/test_vxlan.py
+++ b/test/test_vxlan.py
@@ -20,8 +20,10 @@
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 @@
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 @@
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 1bf0126..36e2f26 100644
--- a/test/test_vxlan6.py
+++ b/test/test_vxlan6.py
@@ -14,8 +14,10 @@
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"""