- return dash_split[1].split(".", 1)[0]
-
- def add_testcase(file_out, num, **kwargs):
- file_out.write(testcase.generate(num=num, **kwargs))
+ return dash_split[0], dash_split[1].split(".", 1)[0]
+
+ 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
+ :returns: Next testcase number.
+ :rtype: int
+ """
+ # TODO: Is there a better way to disable some combinations?
+ if kwargs["framesize"] == 9000 and "vic1227" in iface:
+ # Not supported in HW.
+ pass
+ elif 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
+ elif ("soak" in suite_id and
+ (kwargs["phy_cores"] != 1
+ or kwargs["framesize"] in (1518, 9000, "IMIX_v4_1"))):
+ # Soak test take too long, do not risk other than tc01.
+ pass
+ else:
+ file_out.write(testcase.generate(num=num, **kwargs))