diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-02-10 10:09:37 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-10 15:51:15 +0000 |
commit | 947e5260f9f3a68e51ccc456610bad9a8b200224 (patch) | |
tree | 8771459f0c25779aaf256ee098dc9fc2cbe35941 /meta/lib/oeqa/utils/commands.py | |
parent | 400f53003e430e1a5f7302a0a40ed5afbf80904e (diff) | |
download | openembedded-core-contrib-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/utils/commands.py')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 11 |
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 from oeqa.utils import ftools import re import contextlib +import bb class Command(object): def __init__(self, command, bg=False, timeout=None, data=None, **options): @@ -208,6 +209,16 @@ def runqemu(pn, test): # Luckily QemuTarget doesn't need it after the constructor. tinfoil.shutdown() + # Setup bitbake logger as console handler is removed by tinfoil.shutdown + bblogger = logging.getLogger('BitBake') + bblogger.setLevel(logging.INFO) + console = logging.StreamHandler(sys.stdout) + bbformat = bb.msg.BBLogFormatter("%(levelname)s: %(message)s") + if sys.stdout.isatty(): + bbformat.enable_color() + console.setFormatter(bbformat) + bblogger.addHandler(console) + try: qemu.deploy() try: |