=== modified file 'lava_test/test_definitions/gtkperf.py'
@@ -27,14 +27,14 @@
RUNSTEPS = ["LANG=C gtkperf %s" % gtkperf_options]
class GtkTestParser(TestParser):
- def parse(self):
+ def parse(self, artifacts):
PAT1 = "^(?P<test_case_id>\w+) - (?P<subtest>\w*\W*\w*) - time:\W+(?P<measurement>\d+\.\d+)"
PAT2 = "^(?P<test_case_id>\w+) - time:\W+(?P<measurement>\d+\.\d+)"
filename = "testoutput.log"
pat1 = re.compile(PAT1)
pat2 = re.compile(PAT2)
with open(filename) as fd:
- for line in fd:
+ for lineno, line in enumerate(fd, 1):
match = pat1.search(line)
if match:
d = match.groupdict()
@@ -42,15 +42,21 @@
d['subtest'])
d.pop('subtest')
d['test_case_id'] = d['test_case_id'].replace(" ", "_")
- self.results['test_results'].append(d)
+ d["log_filename"] = filename
+ d["log_lineno"] = lineno
+ self.results['test_results'].append(
+ self.analyze_test_result(d))
else:
match = pat2.search(line)
if match:
- self.results['test_results'].append(match.groupdict())
- self.appendtoall({'units':'seconds', 'result':'pass'})
- self.fixmeasurements()
-
-parse = GtkTestParser()
+ d = match.groupdict()
+ d["log_filename"] = filename
+ d["log_lineno"] = lineno
+ self.results['test_results'].append(
+ self.analyze_test_result(d))
+
+
+parse = GtkTestParser(appendall={'units':'seconds', 'result':'pass'})
inst = TestInstaller(deps=["gtkperf"])
run = TestRunner(RUNSTEPS)
=== modified file 'lava_test/test_definitions/posixtestsuite.py'
@@ -51,19 +51,21 @@
class PosixParser(TestParser):
- def parse(self):
+ def parse(self, artifacts):
filename = "testoutput.log"
pat = re.compile(self.pattern)
with open(filename) as fd:
- for line in fd:
+ for lineno, line in enumerate(fd, 1):
match = pat.match(line)
- if match:
- results = match.groupdict()
- test_case_id = results['test_case_id']
- results['test_case_id'] = test_case_id.replace("/", ".")
- self.results['test_results'].append(results)
- if self.fixupdict:
- self.fixresults(self.fixupdict)
+ if not match:
+ continue
+ results = match.groupdict()
+ test_case_id = results['test_case_id']
+ results['test_case_id'] = test_case_id.replace("/", ".")
+ results["log_filename"] = "testoutput.log"
+ results["log_lineno"] = lineno
+ self.results['test_results'].append(
+ self.analyze_test_result(results))
posix_inst = TestInstaller(INSTALLSTEPS, deps=DEPS,
url=URL, md5=MD5)