[OE-core] [PATCH 3/3] yocto-compat-layer: include bitbake-diffsigs output

Patrick Ohly patrick.ohly at intel.com
Wed Apr 5 18:10:32 UTC 2017


On Wed, 2017-04-05 at 10:26 -0500, Leonardo Sandoval wrote:
> > diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py
> > index b91da9b..d909d5b 100644
> > --- a/scripts/lib/compatlayer/cases/common.py
> > +++ b/scripts/lib/compatlayer/cases/common.py
> > @@ -76,4 +76,14 @@ class CommonCompatLayer(OECompatLayerTestCase):
> >                         (self.tc.layer['name'], len(sig_diff)))
> >              for diff in sorted(sig_diff_filtered):
> >                  msg.append('   %s: %s -> %s' % diff)
> > +                try:
> > +                    recipe, taskname = diff[0].rsplit(':', 1)
> > +                    output = check_command('Determining signature difference failed.',
> > +                                           'bitbake-diffsigs --task %s %s --signature %s %s' %
> > +                                           (recipe, taskname, diff[1], diff[2])).decode('utf-8')
> > +                except RuntimeError as error:
> > +                    output = str(error)
> 
> Patrick, just a minor comment:  there is no need for the 'if' check,
> because the try and the except bodies set the output variable.

I added that for the case that the command prints nothing (output ==
''). It's unlikely, but I prefer explicit, easy checking over making
assumptions.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list