tests: add generalized tags for tests, use them for run-solo tests

We have accumulated several scenarios in prod or wishlists
where it would be useful to have a general infra to say yes/no
about a certain test, and potentially make decisions based on that,
for example:

- runs solo (aka 'time-dependent')
- (wishlist) part of quick smoke-test set
- (wishlist) intermittent failure unrelated to timing
- (wishlist) test broken with a multi-worker config in vpp

Refactor the current "run-solo" code to allow for this extension.

Type: test

Change-Id: Ia5b3810e57c0543753c8e0dc4dc0cfb4a30b36ac
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:
Andrew Yourtchenko
2021-01-14 10:19:08 +00:00
parent b8f6122b4f
commit 06f328129a
10 changed files with 54 additions and 58 deletions
+2 -4
View File
@@ -6,6 +6,7 @@ import struct
import six
from framework import VppTestCase, VppTestRunner, running_extended_tests
from framework import tag_run_solo
from vpp_neighbor import VppNeighbor
from vpp_ip_route import find_route, VppIpTable
from util import mk_ll_addr
@@ -32,13 +33,10 @@ DHCP6_CLIENT_PORT = 547
DHCP6_SERVER_PORT = 546
@tag_run_solo
class TestDHCP(VppTestCase):
""" DHCP Test Case """
@classmethod
def force_solo(cls):
return True
@classmethod
def setUpClass(cls):
super(TestDHCP, cls).setUpClass()
+2 -4
View File
@@ -9,6 +9,7 @@ from scapy.layers.inet6 import IPv6, Ether, UDP
from scapy.utils6 import in6_mactoifaceid
from framework import VppTestCase
from framework import tag_run_solo
from vpp_papi import VppEnum
import util
import os
@@ -220,13 +221,10 @@ class TestDHCPv6DataPlane(VppTestCase):
self.vapi.dhcp6_clients_enable_disable(enable=0)
@tag_run_solo
class TestDHCPv6IANAControlPlane(VppTestCase):
""" DHCPv6 IA NA Control Plane Test Case """
@classmethod
def force_solo(cls):
return True
@classmethod
def setUpClass(cls):
super(TestDHCPv6IANAControlPlane, cls).setUpClass()