diff options
author | Peter Mikus <pmikus@cisco.com> | 2018-09-06 07:35:36 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-09-20 06:42:28 +0000 |
commit | 8de6fce0a2974ea44d4817e81e54ce2ca31ca45e (patch) | |
tree | 763494f6b7b139df38bc3603093c43c508152c35 /resources/libraries | |
parent | a6b255ae4d1f9ad416dda10cbeeb0258bfce2721 (diff) |
CSIT-1205 Create AVF driver test - Add Tests L2BD L2XC
Change-Id: Ia74a87346fe2c0a170b881b510f1b0558a538f3c
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r-- | resources/libraries/python/autogen/Regenerator.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py index 7a576764a2..1c265c3f3c 100644 --- a/resources/libraries/python/autogen/Regenerator.py +++ b/resources/libraries/python/autogen/Regenerator.py @@ -75,16 +75,18 @@ class Regenerator(object): dash_split = dash_split[1].split("-", 1) return dash_split[0], dash_split[1].split(".", 1)[0] - def add_testcase(testcase, iface, file_out, num, **kwargs): + def add_testcase(testcase, iface, suite_id, file_out, num, **kwargs): """Add testcase to file. :param testcase: Testcase class. :param iface: Interface. + :param suite_id: Suite ID. :param file_out: File to write testcases to. :param num: Testcase number. :param kwargs: Key-value pairs used to construct testcase. :type testcase: Testcase :type iface: str + :type suite_id: str :type file_out: file :type num: int :type kwargs: dict @@ -92,25 +94,35 @@ class Regenerator(object): :rtype: int """ # TODO: Is there a better way to disable some combinations? - if kwargs["framesize"] != 9000 or "vic1227" not in iface: + if kwargs["framesize"] == 9000 and "vic1227" in iface: + # Not supported in HW. + pass + else if kwargs["framesize"] == 9000 and "avf" in suite_id: + # Not supported by AVF driver. + # https://git.fd.io/vpp/tree/src/plugins/avf/README.md + pass + else: file_out.write(testcase.generate(num=num, **kwargs)) return num + 1 - def add_testcases(testcase, iface, file_out, tc_kwargs_list): + def add_testcases(testcase, iface, suite_id, file_out, tc_kwargs_list): """Add testcases to file. :param testcase: Testcase class. :param iface: Interface. + :param suite_id: Suite ID. :param file_out: File to write testcases to. - :param tc_kwargs_list: Key-value pairs used to construct testcase. + :param tc_kwargs_list: Key-value pairs used to construct testcases. :type testcase: Testcase :type iface: str + :type suite_id: str :type file_out: file :type tc_kwargs_list: dict """ num = 1 for tc_kwargs in tc_kwargs_list: - num = add_testcase(testcase, iface, file_out, num, **tc_kwargs) + num = add_testcase(testcase, iface, suite_id, file_out, num, + **tc_kwargs) print "Regenerator starts at {cwd}".format(cwd=getcwd()) min_framesize = protocol_to_min_framesize[protocol] @@ -137,6 +149,6 @@ class Regenerator(object): testcase = self.testcase_class(suite_id) with open(filename, "w") as file_out: file_out.write(text_prolog) - add_testcases(testcase, iface, file_out, kwargs_list) + add_testcases(testcase, iface, suite_id, file_out, kwargs_list) print "Regenerator ends." print # To make autogen check output more readable. |