From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] oeqa: setup bitbake logger after tinfoil.shutdown
Date: Wed, 10 Feb 2016 10:09:37 +0200 [thread overview]
Message-ID: <1455091777-19181-1-git-send-email-ed.bartosh@linux.intel.com> (raw)
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.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
meta/lib/oeqa/utils/commands.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 08e2cbb..dfb6c21 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:
--
2.1.4
reply other threads:[~2016-02-10 10:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455091777-19181-1-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.