Commit a81bfce3 authored by Leo Iannacone's avatar Leo Iannacone

module: add parser for blhc log

parent 378e5b7f
...@@ -180,6 +180,8 @@ class LogParser(): ...@@ -180,6 +180,8 @@ class LogParser():
result = self.parse_autopkgtest() result = self.parse_autopkgtest()
elif self.extension == 'piuparts': elif self.extension == 'piuparts':
result = self.parse_piuparts() result = self.parse_piuparts()
elif self.extension == 'blhc':
result = self.parse_blhc()
return result return result
def parse_lintian(self): def parse_lintian(self):
...@@ -218,6 +220,17 @@ class LogParser(): ...@@ -218,6 +220,17 @@ class LogParser():
return 'E' return 'E'
return None 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): def _from_tags_to_result(self, tags):
keys = sorted(list(tags.keys())) keys = sorted(list(tags.keys()))
result = ["%s%s" % (k, tags[k]) for k in 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