JIRA: DOVETAIL-404
1. IPV6 sub-testcase's name includes [id], which will affects the regex.
2. Remove the [id] from the name of the sub_testcases.
Change-Id: I51b567e8382fa4e701f8b32ba7ea195d49fd31eb
Signed-off-by: xudan <xudan16@huawei.com>
def get_sub_testcase(sub_testcase, result):
if not result:
return False
+ sub_testcase = re.sub("\[.*?\]", "", sub_testcase)
reg = sub_testcase + '[\s+\d+]'
find_reg = re.compile(reg)
match = find_reg.findall(result)
+ if match:
+ return True
+ reg = sub_testcase + '$'
+ find_reg = re.compile(reg)
+ match = find_reg.findall(result)
if match:
return True
return False