Minor update of testing

This commit is contained in:
Miroslav Stampar
2020-01-03 13:46:12 +01:00
parent 8ace3363bd
commit 5d62195a41
3 changed files with 16 additions and 1 deletions

View File

@@ -192,6 +192,15 @@ def smokeTest():
dirtyPatchRandom()
content = open(paths.ERRORS_XML, "r").read()
for regex in re.findall(r'<error regexp="(.+?)"/>', content):
try:
re.compile(regex)
except re.error:
errMsg = "smoke test failed at compiling '%s'" % regex
logger.error(errMsg)
return False
retVal = True
count, length = 0, 0