Re: [PATCH v4l-utils 0/2] v4l2-compliance colors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Mon, 8 Apr 2019 11:05:20 +0200
Hans Verkuil <hverkuil@xxxxxxxxx> escreveu:

> Hi Philipp,
> 
> On 4/8/19 10:45 AM, Philipp Zabel wrote:
> > Hi,
> > 
> > not sure if anybody finds this as useful as I do to spot compliance
> > failures and warnings in a sea of OKs more easily, but this patch adds
> > some color escape codes to the output of v4l2-compliance. It marks "OK"
> > green, "warn" bold, and "fail" / "FAIL" bright red if the output is a
> > terminal. I would have preferred to mark warnings yellow, but that
> > doesn't work well on black-on-white terminals.  
> 
> Hmm, I hate colors myself :-)
> 
> So I would prefer if an option is added to explicitly enable colors. And the
> check for stdout can be replaced by a check for this new option.
> 
> Also, the same option and behavior should be added to cec-compliance as well.
> 
> I propose the option -C, --show-colors.

Just my two cents here: I guess most people love colors for warnings
(I do), and this has becoming more popular on gcc - and it is already
a default for dvb tools, with is part of v4l2-utils.

So, IMHO, it would make more sense to have colors enabled by default,
and provide, instead, either an option to disable or to have an env
var that would control it.

> 
> And don't forget to update the man pages for both utils!
> 
> Regards,
> 
> 	Hans
> 
> > 
> > regards
> > Philipp
> > 
> > Philipp Zabel (2):
> >   v4l2-compliance: use warn() in warn_once()
> >   v4l2-compliance: add colors
> > 
> >  utils/v4l2-compliance/v4l2-compliance.cpp | 11 ++++++++---
> >  utils/v4l2-compliance/v4l2-compliance.h   | 22 +++++++++++++---------
> >  2 files changed, 21 insertions(+), 12 deletions(-)
> >   
> 



Thanks,
Mauro



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux