REGEX_MRR = re.compile(r'MaxReceivedRate_Results\s\[pkts/(\d*)sec\]:\s'
r'tx\s(\d*),\srx\s(\d*)')
- REGEX_BMRR = re.compile(r'Maximum Receive Rate Results \[(.*)\]')
+ REGEX_BMRR = re.compile(r'Maximum Receive Rate trial results'
+ r' in packets per second: \[(.*)\]')
REGEX_TC_TAG = re.compile(r'\d+[tT]\d+[cC]')
REGEX_TC_NAME_NEW = re.compile(r'-\d+[cC]-')
+ REGEX_TC_NUMBER = re.compile(r'tc[0-9]{2}-')
+
def __init__(self, metadata):
"""Initialisation.
tags = [str(tag) for tag in test.tags]
test_result = dict()
test_result["name"] = test.name.lower()
+ # Remove TC number from the TC name (not needed):
+ test_result["name"] = re.sub(self.REGEX_TC_NUMBER, "",
+ test.name.lower())
test_result["parent"] = test.parent.name.lower()
test_result["tags"] = tags
doc_str = test.doc.replace('"', "'").replace('\n', ' '). \
test_result["msg"] = test.message.replace('\n', ' |br| '). \
replace('\r', '').replace('"', "'")
test_result["status"] = test.status
- self._test_ID = test.longname.lower()
+ # Remove TC number from the TC long name (backward compatibility):
+ self._test_ID = re.sub(self.REGEX_TC_NUMBER, "", test.longname.lower())
+
if test.status == "PASS" and ("NDRPDRDISC" in tags or
"TCP" in tags or
"MRR" in tags or
elif "FRMOBL" in tags or "BMRR" in tags:
test_type = "BMRR"
else:
+ test_result["status"] = "FAIL"
+ self._data["tests"][self._test_ID] = test_result
return
test_result["type"] = test_type
count=1)
else:
test_result["status"] = "FAIL"
+ self._data["tests"][self._test_ID] = test_result
logging.error("The test '{0}' has no or more than one "
"multi-threading tags.".format(self._test_ID))
return