summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-01-27 11:20:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-01 07:29:44 +0000
commit52766561dbfee625c89393905a85e10d85f69c6c (patch)
tree60c640a5fe3fb921b6c7922021798b47ae245e26 /meta/lib/oeqa
parent4f30b96207efcddfe76d6bf8d4c24f4fb7f80abb (diff)
downloadopenembedded-core-contrib-52766561dbfee625c89393905a85e10d85f69c6c.tar.gz
ltp: update 20210927 -> 20220121
The ltp compliancy parser is rewritten to actually match the logs: they seem to be unstructured, test case names are not printed and the only indication of failure is appearance of FAIL[ED] somewhere. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/logparser.py27
1 files changed, 12 insertions, 15 deletions
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 60e16d500e..879aefca33 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -135,30 +135,27 @@ class LtpComplianceParser(object):
def parse(self, logfile):
test_regex = {}
- test_regex['PASSED'] = re.compile(r"^PASS")
- test_regex['FAILED'] = re.compile(r"^FAIL")
- test_regex['SKIPPED'] = re.compile(r"(?:UNTESTED)|(?:UNSUPPORTED)")
+ test_regex['FAILED'] = re.compile(r"FAIL")
section_regex = {}
- section_regex['test'] = re.compile(r"^Testing")
+ section_regex['test'] = re.compile(r"^Executing")
with open(logfile, errors='replace') as f:
+ name = logfile
+ result = "PASSED"
for line in f:
- result = section_regex['test'].search(line)
- if result:
- self.name = ""
- self.name = line.split()[1].strip()
- self.results[self.name] = "PASSED"
- failed = 0
+ regex_result = section_regex['test'].search(line)
+ if regex_result:
+ name = line.split()[1].strip()
- failed_result = test_regex['FAILED'].search(line)
- if failed_result:
- failed = line.split()[1].strip()
- if int(failed) > 0:
- self.results[self.name] = "FAILED"
+ regex_result = test_regex['FAILED'].search(line)
+ if regex_result:
+ result = "FAILED"
+ self.results[name] = result
for test in self.results:
result = self.results[test]
+ print (self.results)
self.section['log'] = self.section['log'] + ("%s: %s\n" % (result.strip()[:-2], test.strip()))
return self.results, self.section