On Mon, 2020-07-27 at 21:35 -0400, Chris Laplante via lists.openembedded.org 
wrote:
> This patch series turns on color compiler diagnostics. It is especially
> useful when doing edit-compile-test development work with devtool.
> 
> It is based on one I've been using internally for about a
> year now.
> 
> Limitation: Note that the *.nocolor and *.color logs will only contain the
>  output of the task itself, not any prefuncs or postfuncs. This is
>  because the color filtering is implemented using progress handlers,
>  which don't see prefunc or postfunc output.
> 
> Chris Laplante (3):
>   lib/oe/log_colorizer.py: add LogColorizerProxyProgressHandler
>   base.bbclass: make oe.log_colorizer available in global context
>   log-colorizer.bbclass: add new class
> 
>  meta/classes/base.bbclass          |  2 +-
>  meta/classes/log-colorizer.bbclass | 49 +++++++++++++++++
>  meta/lib/oe/log_colorizer.py       | 86 ++++++++++++++++++++++++++++++
>  3 files changed, 136 insertions(+), 1 deletion(-)
>  create mode 100644 meta/classes/log-colorizer.bbclass
>  create mode 100644 meta/lib/oe/log_colorizer.py

This looks interesting. Could we add something to the manual about how
to use it and maybe a test for it as well please?

I did write something similar in a different context recently which
applies here near enough as well:

"""
By documentation, I mean that kernel-fitimage.bbclass has no
information in the reference manual:

https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-classes-kernel-fitimage

generated from:
http://git.yoctoproject.org/cgit.cgi/yocto-docs/tree/documentation/ref-manual/ref-classes.xml

and also there is also no header at the start of the class saying what
it does or how to use it.

Could we add something to these locations to give more information
about the class?

For testing, have a look at
meta/lib/oeqa/selftest/cases/imagefeatures.py. Its testing target image
rootfs settings but I believe the concept is similar to how you'd test
something like the kernel-fitimage class.

You can run these tests individually with "oe-selftest -r
imagefeatures" to run that file or "oe-selftest -r
imagefeatures.ImageFeatures.test_bmap" as an example of a specific
test.
"""

although there may be a different selftest which would be a better
example to base a test off for this code.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141065): 
https://lists.openembedded.org/g/openembedded-core/message/141065
Mute This Topic: https://lists.openembedded.org/mt/75836416/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to