summaryrefslogtreecommitdiffstats
path: root/scripts/yocto-compat-layer.py
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-06-27 17:33:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-27 22:36:44 +0100
commit14d5932c204ff045bd66c343ca86281f2e5f627f (patch)
tree6bdcd1f06a5f54cd7df0e82fc3c2f2752092a950 /scripts/yocto-compat-layer.py
parent6d7302b53c6ceae1194611eba2ef48fc30f20e12 (diff)
downloadpoky-14d5932c204ff045bd66c343ca86281f2e5f627f.tar.gz
yocto-compat-layer.py: apply test_signatures to all layers
Software layers were previously allowed to change signatures, but that's not desired for those layers either. The rule that a layer which is "Yocto Compatible 2.0" must not change signatures unless explicitly requested holds for all kinds of layers. However, as this is something that software layers might not be able to do right away, testing for signature changes in software layers can be disabled. It's on by default, as that was Richard's recommendation. Whether that should change needs further discussion as part of finalizing "Yocto Compatible 2.0". As it might still change, the tool now has both a with/without parameter so that users of the tool can choose the desired behavior without being affected by future changes to the default. (From OE-Core rev: e4dce65ce604a74da0f09ee2742cf8b13cf96c8e) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/yocto-compat-layer.py')
-rwxr-xr-xscripts/yocto-compat-layer.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/yocto-compat-layer.py b/scripts/yocto-compat-layer.py
index 0d5700b538..ba64b4d6e4 100755
--- a/scripts/yocto-compat-layer.py
+++ b/scripts/yocto-compat-layer.py
@@ -30,12 +30,12 @@ CASES_PATHS = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
30 'lib', 'compatlayer', 'cases')] 30 'lib', 'compatlayer', 'cases')]
31logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout) 31logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout)
32 32
33def test_layer_compatibility(td, layer): 33def test_layer_compatibility(td, layer, test_software_layer_signatures):
34 from compatlayer.context import CompatLayerTestContext 34 from compatlayer.context import CompatLayerTestContext
35 logger.info("Starting to analyze: %s" % layer['name']) 35 logger.info("Starting to analyze: %s" % layer['name'])
36 logger.info("----------------------------------------------------------------------") 36 logger.info("----------------------------------------------------------------------")
37 37
38 tc = CompatLayerTestContext(td=td, logger=logger, layer=layer) 38 tc = CompatLayerTestContext(td=td, logger=logger, layer=layer, test_software_layer_signatures=test_software_layer_signatures)
39 tc.loadTests(CASES_PATHS) 39 tc.loadTests(CASES_PATHS)
40 return tc.runTests() 40 return tc.runTests()
41 41
@@ -53,6 +53,12 @@ def main():
53 help='List of MACHINEs to be used during testing', action='store') 53 help='List of MACHINEs to be used during testing', action='store')
54 parser.add_argument('--additional-layers', nargs="+", 54 parser.add_argument('--additional-layers', nargs="+",
55 help='List of additional layers to add during testing', action='store') 55 help='List of additional layers to add during testing', action='store')
56 group = parser.add_mutually_exclusive_group()
57 group.add_argument('--with-software-layer-signature-check', action='store_true', dest='test_software_layer_signatures',
58 default=True,
59 help='check that software layers do not change signatures (on by default)')
60 group.add_argument('--without-software-layer-signature-check', action='store_false', dest='test_software_layer_signatures',
61 help='disable signature checking for software layers')
56 parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery', 62 parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery',
57 action='store_true') 63 action='store_true')
58 parser.add_argument('-d', '--debug', help='Enable debug output', 64 parser.add_argument('-d', '--debug', help='Enable debug output',
@@ -173,7 +179,7 @@ def main():
173 layers_tested = layers_tested + 1 179 layers_tested = layers_tested + 1
174 continue 180 continue
175 181
176 result = test_layer_compatibility(td, layer) 182 result = test_layer_compatibility(td, layer, args.test_software_layer_signatures)
177 results[layer['name']] = result 183 results[layer['name']] = result
178 results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL' 184 results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL'
179 layers_tested = layers_tested + 1 185 layers_tested = layers_tested + 1