aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/autogen
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2018-07-20 13:13:06 +0200
committerPeter Mikus <pmikus@cisco.com>2018-07-24 08:42:53 +0000
commite62f26bad019fcdbf53b4fbace71d9bfafe2220f (patch)
treedf8df654236d3f1ce9ac585665b3f1a3fac6cf46 /resources/libraries/python/autogen
parent0759425f08bd7b8a003f4fb2ab9b443216517d8f (diff)
CSIT-1097: Migrate Vts suite to NDRPDR
Change-Id: Iaac913bb4b15d743a2e9d565e25d31c089cee3e8 Signed-off-by: Vratko Polak <vrpolak@cisco.com> (cherry picked from commit 298d0a61d75cded31fc0f09d408e7b3e3f9ee4f7)
Diffstat (limited to 'resources/libraries/python/autogen')
-rw-r--r--resources/libraries/python/autogen/DefaultTestcase.py2
-rw-r--r--resources/libraries/python/autogen/Regenerator.py12
2 files changed, 10 insertions, 4 deletions
diff --git a/resources/libraries/python/autogen/DefaultTestcase.py b/resources/libraries/python/autogen/DefaultTestcase.py
index 9878289bd1..3c11cb073e 100644
--- a/resources/libraries/python/autogen/DefaultTestcase.py
+++ b/resources/libraries/python/autogen/DefaultTestcase.py
@@ -13,7 +13,7 @@
"""Module with utilities for autogeneration of non-customizable testcases."""
-from Testcase import Testcase
+from .Testcase import Testcase
class DefaultTestcase(Testcase):
diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py
index 30dc7b7e89..4ed123ae7c 100644
--- a/resources/libraries/python/autogen/Regenerator.py
+++ b/resources/libraries/python/autogen/Regenerator.py
@@ -36,7 +36,7 @@ class Regenerator(object):
"""
self.testcase_class = testcase_class
- def regenerate_glob(self, pattern, is_ip6=False, tc_kwargs_list=None):
+ def regenerate_glob(self, pattern, protocol="ip4", tc_kwargs_list=None):
"""Regenerate files matching glob pattern based on arguments.
In the current working directory, find all files matching
@@ -56,6 +56,12 @@ class Regenerator(object):
:type tc_kwargs_list: list of tuple or None
"""
+ protocol_to_min_framesize = {
+ "ip4": 64,
+ "ip6": 78,
+ "vxlan+ip4": 114
+ }
+
def get_suite_id(filename):
dash_split = filename.split("-", 1)
if len(dash_split[0]) <= 4:
@@ -73,8 +79,8 @@ class Regenerator(object):
num = add_testcase(file_out, num, **tc_kwargs)
print "Regenerator starts at {cwd}".format(cwd=getcwd())
- min_framesize = 78 if is_ip6 else 64
- kwargs_list = tc_kwargs_list if tc_kwargs_list is not None else [
+ min_framesize = protocol_to_min_framesize[protocol]
+ kwargs_list = tc_kwargs_list if tc_kwargs_list else [
{"framesize": min_framesize, "phy_cores": 1},
{"framesize": min_framesize, "phy_cores": 2},
{"framesize": min_framesize, "phy_cores": 4},