poky/scripts/lib/checklayer/cases/distro.py
Paul Eggleton b32174e58e 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>
2017-09-21 11:34:19 +01:00

27 lines
961 B
Python

# 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))