aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2018-07-17 17:21:52 +0200
committerVratko Polak <vrpolak@cisco.com>2018-07-18 12:39:42 +0200
commitf1ec30ef61d430fb47d2e1a8bcc1305975500699 (patch)
tree966acbb36f0d5ddb8d097df019132648e167c793 /resources
parentac6cc22910ea0d3bda42c227d799f2d4e89bc9d0 (diff)
CSIT-1097: Ip6 NDRPDR and edited MRR suites
Change-Id: I912017c6d1eab5530eecb2326887ffd057916ee8 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/autogen/Regenerator.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py
index 85e8b60dd5..30dc7b7e89 100644
--- a/resources/libraries/python/autogen/Regenerator.py
+++ b/resources/libraries/python/autogen/Regenerator.py
@@ -56,6 +56,13 @@ class Regenerator(object):
:type tc_kwargs_list: list of tuple or None
"""
+ def get_suite_id(filename):
+ dash_split = filename.split("-", 1)
+ if len(dash_split[0]) <= 4:
+ # It was something like "2n1l", we need one more split.
+ dash_split = dash_split[1].split("-", 1)
+ return dash_split[1].split(".", 1)[0]
+
def add_testcase(file_out, num, **kwargs):
file_out.write(testcase.generate(num=num, **kwargs))
return num + 1
@@ -86,7 +93,7 @@ class Regenerator(object):
text = file_in.read()
text_prolog = "".join(text.partition("*** Test Cases ***")[:-1])
# TODO: Make the following work for 2n suites.
- suite_id = filename.split("-", 1)[1].split(".", 1)[0]
+ suite_id = get_suite_id(filename)
print "Regenerating suite_id:", suite_id
testcase = self.testcase_class(suite_id)
with open(filename, "w") as file_out: