diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-06-27 17:33:40 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-06 14:38:06 +0100 |
commit | e7fe215f50a1b75771f33fffdda529a95c026d3f (patch) | |
tree | 602e3341034d306d34155db68a9e42b342b66912 /scripts/yocto-compat-layer.py | |
parent | e8416554dfc9d4196543279a4845f6c0671f3e5c (diff) | |
download | openembedded-core-e7fe215f50a1b75771f33fffdda529a95c026d3f.tar.gz openembedded-core-e7fe215f50a1b75771f33fffdda529a95c026d3f.tar.bz2 openembedded-core-e7fe215f50a1b75771f33fffdda529a95c026d3f.zip |
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.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/yocto-compat-layer.py')
-rwxr-xr-x | scripts/yocto-compat-layer.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/yocto-compat-layer.py b/scripts/yocto-compat-layer.py index 30c55a918f..a16974f98f 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__)), 'lib', 'compatlayer', 'cases')] logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout) -def test_layer_compatibility(td, layer): +def test_layer_compatibility(td, layer, test_software_layer_signatures): from compatlayer.context import CompatLayerTestContext logger.info("Starting to analyze: %s" % layer['name']) logger.info("----------------------------------------------------------------------") - tc = CompatLayerTestContext(td=td, logger=logger, layer=layer) + tc = CompatLayerTestContext(td=td, logger=logger, layer=layer, test_software_layer_signatures=test_software_layer_signatures) tc.loadTests(CASES_PATHS) return tc.runTests() @@ -53,6 +53,12 @@ def main(): help='List of MACHINEs to be used during testing', action='store') parser.add_argument('--additional-layers', nargs="+", help='List of additional layers to add during testing', action='store') + group = parser.add_mutually_exclusive_group() + group.add_argument('--with-software-layer-signature-check', action='store_true', dest='test_software_layer_signatures', + default=True, + help='check that software layers do not change signatures (on by default)') + group.add_argument('--without-software-layer-signature-check', action='store_false', dest='test_software_layer_signatures', + help='disable signature checking for software layers') parser.add_argument('-n', '--no-auto', help='Disable auto layer discovery', action='store_true') parser.add_argument('-d', '--debug', help='Enable debug output', @@ -173,7 +179,7 @@ def main(): layers_tested = layers_tested + 1 continue - result = test_layer_compatibility(td, layer) + result = test_layer_compatibility(td, layer, args.test_software_layer_signatures) results[layer['name']] = result results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL' layers_tested = layers_tested + 1 |