X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_util.py;h=3a61d64b28f62a514098b2be20cd62be7137d506;hb=4d769c71a10bb99a1afc369e85d7d444e7b439f3;hp=e7d53668e2b62d3dc8d251eb89af9f6644230510;hpb=dd3c5d250f3cf9712e37e47851ca07401e715f13;p=vpp.git diff --git a/test/test_util.py b/test/test_util.py old mode 100755 new mode 100644 index e7d53668e2b..3a61d64b28f --- a/test/test_util.py +++ b/test/test_util.py @@ -1,14 +1,34 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Test framework utility functions tests""" import unittest -from framework import VppTestRunner +from framework import VppTestRunner, CPUInterface from vpp_papi import mac_pton, mac_ntop -class TestUtil (unittest.TestCase): - """ MAC to binary and back """ +class TestUtil (CPUInterface, 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 + + @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 + + @classmethod + def get_cpus_required(cls): + return 0 + 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)