summaryrefslogtreecommitdiffstats
path: root/scripts/lib/checklayer/cases/distro.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-09-19 15:57:07 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-21 11:34:19 +0100
commitb32174e58e89119e3ca2315030629a6580ccbd52 (patch)
tree1be70a32209bd098988f1d60cd7ce496329129d0 /scripts/lib/checklayer/cases/distro.py
parent455877548e7a685f0dacf3b10056ff85c7aeedf2 (diff)
downloadpoky-b32174e58e89119e3ca2315030629a6580ccbd52.tar.gz
scripts: rename yocto-compat-layer to remove "compatible" nomenclature
"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 (From OE-Core rev: 2a6126a115f10750ea89f95629d3699ad41c5665) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/checklayer/cases/distro.py')
-rw-r--r--scripts/lib/checklayer/cases/distro.py26
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 @@
1# Copyright (C) 2017 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4import unittest
5
6from checklayer import LayerType
7from checklayer.case import OECheckLayerTestCase
8
9class DistroCheckLayer(OECheckLayerTestCase):
10 @classmethod
11 def setUpClass(self):
12 if self.tc.layer['type'] != LayerType.DISTRO:
13 raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\
14 self.tc.layer['name'])
15
16 def test_distro_defines_distros(self):
17 self.assertTrue(self.tc.layer['conf']['distros'],
18 "Layer is BSP but doesn't defines machines.")
19
20 def test_distro_no_set_distros(self):
21 from oeqa.utils.commands import get_bb_var
22
23 distro = get_bb_var('DISTRO')
24 self.assertEqual(self.td['bbvars']['DISTRO'], distro,
25 msg="Layer %s modified distro %s -> %s" % \
26 (self.tc.layer['name'], self.td['bbvars']['DISTRO'], distro))