1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00

oeqa/utils/logparser: Simplify ptest log parsing code

logparser is only used by ptest. Its slightly overcomplicated as it was
intended to be reusable but wasn't. Simplify it as a dedicated parser is
likely to me more readable and maintainable.

(From OE-Core rev: c7478345b2b4a85cb1fec40e762633871f0e94cb)

(From OE-Core rev: 1a6fcc97f3842deed3e78ededa8a21da274c0572)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2019-01-29 12:08:26 +00:00
parent 31e10dd927
commit f89486cda1
2 changed files with 10 additions and 57 deletions
+1 -6
View File
@@ -12,12 +12,7 @@ class PtestRunnerTest(OERuntimeTestCase):
# a ptest log parser
def parse_ptest(self, logfile):
parser = Lparser(test_0_pass_regex="^PASS:(.+)",
test_0_fail_regex="^FAIL:(.+)",
test_0_skip_regex="^SKIP:(.+)",
section_0_begin_regex="^BEGIN: .*/(.+)/ptest",
section_0_end_regex="^END: .*/(.+)/ptest")
parser.init()
parser = Lparser()
result = Result()
with open(logfile, errors='replace') as f: