Commit a81bfce3 authored by Leo Iannacone's avatar Leo Iannacone

module: add parser for blhc log

parent 378e5b7f
......@@ -180,6 +180,8 @@ class LogParser():
result = self.parse_autopkgtest()
elif self.extension == 'piuparts':
result = self.parse_piuparts()
elif self.extension == 'blhc':
result = self.parse_blhc()
return result
def parse_lintian(self):
......@@ -218,6 +220,17 @@ class LogParser():
return 'E'
return None
def parse_blhc(self):
tags = defaultdict(int)
with open(self.file, 'r') as fd:
for line in fd:
info = line.split()
if info[1] != 'missing':
continue
tag = info[0].replace('FLAGS', '')
tags[tag] += 1
return sorted(list(tags.keys()))
def _from_tags_to_result(self, tags):
keys = sorted(list(tags.keys()))
result = ["%s%s" % (k, tags[k]) for k in keys]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment