
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>
28 lines
703 B
Python
Executable File
28 lines
703 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Test framework utility functions tests"""
|
|
|
|
import unittest
|
|
from framework import VppTestRunner
|
|
from vpp_papi import mac_pton, mac_ntop
|
|
|
|
|
|
class TestUtil (unittest.TestCase):
|
|
""" Test framework utility tests """
|
|
|
|
@classmethod
|
|
def is_tagged_run_solo(cls):
|
|
""" if the test case class is timing-sensitive - return true """
|
|
return False
|
|
|
|
def test_mac_to_binary(self):
|
|
""" MAC to binary and back """
|
|
mac = 'aa:bb:cc:dd:ee:ff'
|
|
b = mac_pton(mac)
|
|
mac2 = mac_ntop(b)
|
|
self.assertEqual(type(mac), type(mac2))
|
|
self.assertEqual(mac2, mac)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main(testRunner=VppTestRunner)
|