yocto-compat-layer: add --additional-layers
The new --addditional-layers parameter takes a list of layer directories and adds them to the build configuration before starting testing. The resulting base configuration then more closely matches a full distro. This is relevant in two cases: 1. some layers like meta-freescale dynamically enable more recipes in their layer.conf depending on which other layers are active, so testing only against OE-core might miss problems which occur only when also some other layers are active 2. BSP layers might be fine in combination with machines from OE-core, but might break in combination with some other machines As before, test_signatures only warns about signature changes introduced by the layer which is under testing, and not those changes introduced by the additional layers. (From OE-Core rev: 0e8528f7c6201e8a5d2799123241c0e1b85081ce) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
e93a2ab3e3
commit
31e53430f1
|
@ -49,6 +49,8 @@ def main():
|
||||||
help='File to output log (optional)', action='store')
|
help='File to output log (optional)', action='store')
|
||||||
parser.add_argument('--dependency', nargs="+",
|
parser.add_argument('--dependency', nargs="+",
|
||||||
help='Layers to process for dependencies', action='store')
|
help='Layers to process for dependencies', action='store')
|
||||||
|
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',
|
parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery',
|
||||||
action='store_true')
|
action='store_true')
|
||||||
parser.add_argument('-d', '--debug', help='Enable debug output',
|
parser.add_argument('-d', '--debug', help='Enable debug output',
|
||||||
|
@ -82,6 +84,10 @@ def main():
|
||||||
if not layers:
|
if not layers:
|
||||||
logger.error("Fail to detect layers")
|
logger.error("Fail to detect layers")
|
||||||
return 1
|
return 1
|
||||||
|
if args.additional_layers:
|
||||||
|
additional_layers = detect_layers(args.additional_layers, args.no_auto)
|
||||||
|
else:
|
||||||
|
additional_layers = []
|
||||||
if args.dependency:
|
if args.dependency:
|
||||||
dep_layers = detect_layers(args.dependency, args.no_auto)
|
dep_layers = detect_layers(args.dependency, args.no_auto)
|
||||||
dep_layers = dep_layers + layers
|
dep_layers = dep_layers + layers
|
||||||
|
@ -128,13 +134,29 @@ def main():
|
||||||
|
|
||||||
shutil.copyfile(bblayersconf + '.backup', bblayersconf)
|
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'])
|
logger.info('Skipping %s due to missing dependencies.' % layer['name'])
|
||||||
results[layer['name']] = None
|
results[layer['name']] = None
|
||||||
results_status[layer['name']] = 'SKIPPED (Missing dependencies)'
|
results_status[layer['name']] = 'SKIPPED (Missing dependencies)'
|
||||||
layers_tested = layers_tested + 1
|
layers_tested = layers_tested + 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if any(map(lambda additional_layer: not add_layer(bblayersconf, additional_layer, dep_layers, logger),
|
||||||
|
additional_layers)):
|
||||||
|
logger.info('Skipping %s due to missing additional layers.' % layer['name'])
|
||||||
|
results[layer['name']] = None
|
||||||
|
results_status[layer['name']] = 'SKIPPED (Missing additional layers)'
|
||||||
|
layers_tested = layers_tested + 1
|
||||||
|
continue
|
||||||
|
|
||||||
logger.info('Getting initial bitbake variables ...')
|
logger.info('Getting initial bitbake variables ...')
|
||||||
td['bbvars'] = get_bb_vars()
|
td['bbvars'] = get_bb_vars()
|
||||||
logger.info('Getting initial signatures ...')
|
logger.info('Getting initial signatures ...')
|
||||||
|
|
Loading…
Reference in New Issue