]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
oeqa/logparser: Fix ptest No-section exception
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Jun 2023 15:41:43 +0000 (16:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 17 Jun 2023 10:38:33 +0000 (11:38 +0100)
commitd9bf95d8cfb123f9d992fd2a95099bdcece97be8
tree7cf1acdaf52a04f7fc0f53d95c0be23f01ccf051
parent4a80e95d1f59e0ddcedde3f64d0a0d1dc48a6e4d
oeqa/logparser: Fix ptest No-section exception

Occasionally we see:

  File "/media/build/poky/meta/lib/oeqa/runtime/cases/ptest.py", line 27, in test_ptestrunner_expectfail
    self.do_ptestrunner()
  File "/media/build/poky/meta/lib/oeqa/runtime/cases/ptest.py", line 77, in do_ptestrunner
    results, sections = parser.parse(ptest_runner_log)
  File "/media/build/poky/meta/lib/oeqa/utils/logparser.py", line 80, in parse
    self.results[current_section['name']][result.group(1).strip()] = t
KeyError: 'No-section'

which occurs when there are "results" outside the main log section. The strace
tests do then upon failure as they dump logs there.

Add code to avoid the tracebacks and just make them warnings.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/logparser.py