mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
selftest/tinfoil: Filter LogRecords in test_event_wait
As the code stands today, an event mask does not mask LogRecord events since the log levels are controlled separately. We therefore need to accept (and ignore) LogRecord events in this test to avoid errors. (From OE-Core rev: efe1f2c8ad09af3c5ee9c778601c7463c532b012) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
import logging
|
||||||
import bb.tinfoil
|
import bb.tinfoil
|
||||||
|
|
||||||
from oeqa.selftest.case import OESelftestTestCase
|
from oeqa.selftest.case import OESelftestTestCase
|
||||||
@@ -127,6 +128,8 @@ class TinfoilTests(OESelftestTestCase):
|
|||||||
self.assertEqual(pattern, event._pattern)
|
self.assertEqual(pattern, event._pattern)
|
||||||
self.assertIn('qemuarm.conf', event._matches)
|
self.assertIn('qemuarm.conf', event._matches)
|
||||||
eventreceived = True
|
eventreceived = True
|
||||||
|
elif isinstance(event, logging.LogRecord):
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
self.fail('Unexpected event: %s' % event)
|
self.fail('Unexpected event: %s' % event)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user