summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-02-10 10:09:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 15:51:15 +0000
commit947e5260f9f3a68e51ccc456610bad9a8b200224 (patch)
tree8771459f0c25779aaf256ee098dc9fc2cbe35941 /meta/lib/oeqa
parent400f53003e430e1a5f7302a0a40ed5afbf80904e (diff)
downloadpoky-947e5260f9f3a68e51ccc456610bad9a8b200224.tar.gz
oeqa: setup bitbake logger after tinfoil.shutdown
Bitbake logger stops working after tinfoil.shutdown removes console handler from it. This makes bb.{error,warn,note,critical} messages disappear from the console. Adding console handler to bitbake logger again should fix this issue. (From OE-Core rev: ef372c1829b5818fd20224d305f6e20fba643acc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/commands.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 08e2cbb906..dfb6c215bb 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -18,6 +18,7 @@ from oeqa.utils import CommandError
18from oeqa.utils import ftools 18from oeqa.utils import ftools
19import re 19import re
20import contextlib 20import contextlib
21import bb
21 22
22class Command(object): 23class Command(object):
23 def __init__(self, command, bg=False, timeout=None, data=None, **options): 24 def __init__(self, command, bg=False, timeout=None, data=None, **options):
@@ -208,6 +209,16 @@ def runqemu(pn, test):
208 # Luckily QemuTarget doesn't need it after the constructor. 209 # Luckily QemuTarget doesn't need it after the constructor.
209 tinfoil.shutdown() 210 tinfoil.shutdown()
210 211
212 # Setup bitbake logger as console handler is removed by tinfoil.shutdown
213 bblogger = logging.getLogger('BitBake')
214 bblogger.setLevel(logging.INFO)
215 console = logging.StreamHandler(sys.stdout)
216 bbformat = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
217 if sys.stdout.isatty():
218 bbformat.enable_color()
219 console.setFormatter(bbformat)
220 bblogger.addHandler(console)
221
211 try: 222 try:
212 qemu.deploy() 223 qemu.deploy()
213 try: 224 try: