diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-09-12 11:24:38 +1200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-09-19 15:44:36 +1200 |
commit | 052822083c17d3dee526e9197c38b428bf40673d (patch) | |
tree | 8eb35877fb1167302f3e7257aaa11be707853dfb /scripts/lib/checklayer/cases/distro.py | |
parent | cbc396dd10488990c98bb6fd94c7d10a736d57c1 (diff) | |
download | openembedded-core-contrib-052822083c17d3dee526e9197c38b428bf40673d.tar.gz |
scripts: rename yocto-compat-layer to remove "compatible" nomenclaturepaule/yocto-compat-rename
"Yocto Project Compatible" [1] is a programme which requires you meet
specific criteria including going through an application process - it is
not sufficient simply to run the script we have created here and have it
produce no warnings/errors. To avoid people being confused by the fact
that this script uses the term "compatible" or variations thereof,
substitute usage of that word with "check" instead. The functionality of
the script is unchanged.
[1] https://www.yoctoproject.org/ecosystem/yocto-project-branding-program
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts/lib/checklayer/cases/distro.py')
-rw-r--r-- | scripts/lib/checklayer/cases/distro.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py new file mode 100644 index 0000000000..df1b3035eb --- /dev/null +++ b/scripts/lib/checklayer/cases/distro.py @@ -0,0 +1,26 @@ +# Copyright (C) 2017 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +import unittest + +from checklayer import LayerType +from checklayer.case import OECheckLayerTestCase + +class DistroCheckLayer(OECheckLayerTestCase): + @classmethod + def setUpClass(self): + if self.tc.layer['type'] != LayerType.DISTRO: + raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\ + self.tc.layer['name']) + + def test_distro_defines_distros(self): + self.assertTrue(self.tc.layer['conf']['distros'], + "Layer is BSP but doesn't defines machines.") + + def test_distro_no_set_distros(self): + from oeqa.utils.commands import get_bb_var + + distro = get_bb_var('DISTRO') + self.assertEqual(self.td['bbvars']['DISTRO'], distro, + msg="Layer %s modified distro %s -> %s" % \ + (self.tc.layer['name'], self.td['bbvars']['DISTRO'], distro)) |