summaryrefslogtreecommitdiffstats
path: root/test/test_util.py
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2021-01-20 20:30:36 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2021-02-08 15:32:04 +0000
commitc8eae8d28aa6c9fb946a8be5b1731e0e79d7cdff (patch)
treef181c1f79a2d4c7970761af120285937596d293f /test/test_util.py
parent7f23ecd151be06ac6f234224628ea305c5e0b41c (diff)
tests: allow for externally supplied VPP workers config for tests
Allow to supply the external VPP worker config for tests which do not specify the workers config explicitly, and use the tags infra to flag those that need attention in this configuration. This commit shows one example use of such a tag, there will be a separate commit with the rest of the places needing it, since that change is rather mechanical. Thus, the assumption is that the test should by default be agnostic of the VPP configuration, unless it explicitly specifies so. Type: test Change-Id: I3c0077e4e22a75cb9561fb98d3b783b93486b2be Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'test/test_util.py')
-rwxr-xr-xtest/test_util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_util.py b/test/test_util.py
index eb20531505e..421afce4d5d 100755
--- a/test/test_util.py
+++ b/test/test_util.py
@@ -14,6 +14,15 @@ class TestUtil (unittest.TestCase):
""" if the test case class is timing-sensitive - return true """
return False
+ @classmethod
+ def has_tag(cls, tag):
+ """ if the test case has a given tag - return true """
+ try:
+ return tag in cls.test_tags
+ except AttributeError:
+ pass
+ return False
+
def test_mac_to_binary(self):
""" MAC to binary and back """
mac = 'aa:bb:cc:dd:ee:ff'