[oe-commits] [openembedded-core] 42/49: selftest/tinfoil: Filter LogRecords in test_event_wait

git at git.openembedded.org git at git.openembedded.org
Mon Aug 14 13:21:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit dc7f6b110942531b250e0e80a8efe312e3b8319d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Aug 14 11:04:39 2017 +0100

    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 <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/tinfoil.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py
index aa1af7e..471517f 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)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list