summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-04-11 20:38:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-12 15:09:58 +0100
commit31e53430f1bb6f73b82698b20ef7f1047313214a (patch)
tree0bcb944d5e01764c3b5b3db469408c303d92aa0c
parente93a2ab3e300bb861cf6cc83716f93d671ff80f4 (diff)
downloadpoky-31e53430f1bb6f73b82698b20ef7f1047313214a.tar.gz
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>
-rwxr-xr-xscripts/yocto-compat-layer.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/scripts/yocto-compat-layer.py b/scripts/yocto-compat-layer.py
index 2ebddb66d0..daf3a6a32a 100755
--- a/scripts/yocto-compat-layer.py
+++ b/scripts/yocto-compat-layer.py
@@ -49,6 +49,8 @@ def main():
49 help='File to output log (optional)', action='store') 49 help='File to output log (optional)', action='store')
50 parser.add_argument('--dependency', nargs="+", 50 parser.add_argument('--dependency', nargs="+",
51 help='Layers to process for dependencies', action='store') 51 help='Layers to process for dependencies', action='store')
52 parser.add_argument('--additional-layers', nargs="+",
53 help='List of additional layers to add during testing', action='store')
52 parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery', 54 parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery',
53 action='store_true') 55 action='store_true')
54 parser.add_argument('-d', '--debug', help='Enable debug output', 56 parser.add_argument('-d', '--debug', help='Enable debug output',
@@ -82,6 +84,10 @@ def main():
82 if not layers: 84 if not layers:
83 logger.error("Fail to detect layers") 85 logger.error("Fail to detect layers")
84 return 1 86 return 1
87 if args.additional_layers:
88 additional_layers = detect_layers(args.additional_layers, args.no_auto)
89 else:
90 additional_layers = []
85 if args.dependency: 91 if args.dependency:
86 dep_layers = detect_layers(args.dependency, args.no_auto) 92 dep_layers = detect_layers(args.dependency, args.no_auto)
87 dep_layers = dep_layers + layers 93 dep_layers = dep_layers + layers
@@ -128,13 +134,29 @@ def main():
128 134
129 shutil.copyfile(bblayersconf + '.backup', bblayersconf) 135 shutil.copyfile(bblayersconf + '.backup', bblayersconf)
130 136
131 if not add_layer_dependencies(bblayersconf, layer, dep_layers, logger): 137 missing_dependencies = not add_layer_dependencies(bblayersconf, layer, dep_layers, logger)
138 if not missing_dependencies:
139 for additional_layer in additional_layers:
140 if not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger):
141 missing_dependencies = True
142 break
143 if not add_layer_dependencies(bblayersconf, layer, dep_layers, logger) or \
144 any(map(lambda additional_layer: not add_layer_dependencies(bblayersconf, additional_layer, dep_layers, logger),
145 additional_layers)):
132 logger.info('Skipping %s due to missing dependencies.' % layer['name']) 146 logger.info('Skipping %s due to missing dependencies.' % layer['name'])
133 results[layer['name']] = None 147 results[layer['name']] = None
134 results_status[layer['name']] = 'SKIPPED (Missing dependencies)' 148 results_status[layer['name']] = 'SKIPPED (Missing dependencies)'
135 layers_tested = layers_tested + 1 149 layers_tested = layers_tested + 1
136 continue 150 continue
137 151
152 if any(map(lambda additional_layer: not add_layer(bblayersconf, additional_layer, dep_layers, logger),
153 additional_layers)):
154 logger.info('Skipping %s due to missing additional layers.' % layer['name'])
155 results[layer['name']] = None
156 results_status[layer['name']] = 'SKIPPED (Missing additional layers)'
157 layers_tested = layers_tested + 1
158 continue
159
138 logger.info('Getting initial bitbake variables ...') 160 logger.info('Getting initial bitbake variables ...')
139 td['bbvars'] = get_bb_vars() 161 td['bbvars'] = get_bb_vars()
140 logger.info('Getting initial signatures ...') 162 logger.info('Getting initial signatures ...')