selfcheck.py: parse warnings from error log correctly

This commit is contained in:
Oleg Kalachev
2021-11-25 22:49:31 +03:00
parent fe588e7af9
commit 528be179e6

View File

@@ -648,13 +648,13 @@ def check_clover_service():
elif 'failed' in output:
failure('service failed to run, check your launch-files')
r = re.compile(r'^(.*)\[(FATAL|ERROR)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
r = re.compile(r'^(.*)\[(FATAL|ERROR| WARN)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$')
error_count = OrderedDict()
try:
for line in open('/tmp/clover.err', 'r'):
node_error = r.search(line)
if node_error:
msg = node_error.groups()[1] + ': ' + node_error.groups()[2]
msg = node_error.groups()[1].strip() + ': ' + node_error.groups()[2]
if msg in error_count:
error_count[msg] += 1
else: