[OE-core] [PATCH 5/5] yocto-compat-layer: test signature differences when setting MACHINE

Patrick Ohly patrick.ohly at intel.com
Sat Apr 8 10:14:35 UTC 2017


On Fri, 2017-04-07 at 18:38 +0200, Patrick Ohly wrote:
> +    parser.add_argument('--additional-layers', nargs="+",
> +            help='List of additional layers to add during testing',
> action='store')
>      parser.add_argument('-n', '--no-auto', help='Disable auto layer
> discovery',
>              action='store_true')
>      parser.add_argument('-d', '--debug', help='Enable debug output',
> @@ -82,6 +86,7 @@ def main():
>      if not layers:
>          logger.error("Fail to detect layers")
>          return 1
> +    additional_layers = detect_layers(args.additional_layers,
> args.no_auto)
>      if args.dependency:
>          dep_layers = detect_layers(args.dependency, args.no_auto)
>          dep_layers = dep_layers + layers
> @@ -128,7 +133,15 @@ def main():
>  
>          shutil.copyfile(bblayersconf + '.backup', bblayersconf)
>  
> -        if not add_layer_dependencies(bblayersconf, layer,
> dep_layers, logger):
> +        missing_dependencies = not
> add_layer_dependencies(bblayersconf, layer, dep_layers, logger)
> +        if not missing_dependencies:
> +            for additional_layer in additional_layers:
> +                if not add_layer_dependencies(bblayersconf,
> additional_layer, dep_layers, logger):
> +                    missing_dependencies = True
> +                    break
> +        if not add_layer_dependencies(bblayersconf, layer,
> dep_layers, logger) or \
> +           any(map(lambda additional_layer: not
> add_layer_dependencies(bblayersconf, additional_layer, dep_layers,
> logger),
> +                   additional_layers)):
>              logger.info('Skipping %s due to missing dependencies.' %
> layer['name'])
>              results[layer['name']] = None
>              results_status[layer['name']] = 'SKIPPED (Missing
> dependencies)'
> @@ -140,8 +153,11 @@ def main():
>          logger.info('Getting initial signatures ...')
>          td['builddir'] = builddir
>          td['sigs'], td['tunetasks'] = get_signatures(td['builddir'])
> +        td['machines'] = args.machines
>  
> -        if not add_layer(bblayersconf, layer, dep_layers, logger):
> +        if not add_layer(bblayersconf, layer, dep_layers, logger) or
> \
> +           any(map(lambda additional_layer: not
> add_layer(bblayersconf, additional_layer, dep_layers, logger),
> +                   additional_layers)):

Note to myself: this --additional-layers argument should be in its own
commit, and the additional layers need to be added before obtaining the
initial signatures. Otherwise the test_signatures does not test the
changes introduced by the layer under testing, but also all these
additional layers.

That's not the intention - the additional layers basically represents
what's already in a distro before adding the new layer.

-- 
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