From: Richard Purdie Date: Mon, 14 Aug 2017 10:04:39 +0000 (+0100) Subject: selftest/tinfoil: Filter LogRecords in test_event_wait X-Git-Tag: 2017-10~630 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=efe1f2c8ad09af3c5ee9c778601c7463c532b012;p=openembedded-core.git 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. Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py index aa1af7e042..471517fb29 100644 --- a/meta/lib/oeqa/selftest/cases/tinfoil.py +++ b/meta/lib/oeqa/selftest/cases/tinfoil.py @@ -1,6 +1,7 @@ import os import re import time +import logging import bb.tinfoil from oeqa.selftest.case import OESelftestTestCase @@ -127,6 +128,8 @@ class TinfoilTests(OESelftestTestCase): self.assertEqual(pattern, event._pattern) self.assertIn('qemuarm.conf', event._matches) eventreceived = True + elif isinstance(event, logging.LogRecord): + continue else: self.fail('Unexpected event: %s' % event)