summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/runqemu.py
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2023-03-14 15:20:27 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-21 22:44:00 +0000
commit312db493eead16c9ce0a069c0ae5b7496b87b149 (patch)
treea8e30fc72464f8c7af7afd61e8752aca249a3692 /scripts/lib/devtool/runqemu.py
parentf475ef04ca169944155cc06c5e294b0da22e32f8 (diff)
downloadpoky-312db493eead16c9ce0a069c0ae5b7496b87b149.tar.gz
bitbake: build: Make python output print to stdout when running with -v (verbose)
When tasks are run with -v (verbose) on the bitbake commandline, shell tasks print their stdout, python tasks do not. This change redirects the python task's print output to an in memory buffer. After the task is executed the output is printed to stdout via the logger. This makes the python task behavior match the shell task behavior when running with -v. The contents of the task's log files remain unchanged after this change. This approach should keep the correct order in most cases, however, if the python task accesses the logger directly, that content will appear before other output. On the other hand, this change should negate the need for python tasks to access the logger directly. Special care is taken to save/restore the existing stdout and stderr and preventing sending output directly to the logger when there are "recursive" calls, for instance when a python function calls a shell function, avoiding printing things potentially out of order and/or multiple times. The logging-test.bb in meta-selftest can be used to review this change. This has been tested with the full bblogging oeqa tests. [Yocto #14544] (Bitbake rev: 81a58647b2f4fc0a2589b2978fc9d81b2bfe6aec) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/runqemu.py')
0 files changed, 0 insertions, 0 deletions