summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/checklayer/__init__.py11
-rw-r--r--scripts/lib/checklayer/cases/bsp.py2
-rw-r--r--scripts/lib/checklayer/cases/common.py3
-rw-r--r--scripts/lib/checklayer/cases/distro.py2
4 files changed, 13 insertions, 5 deletions
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index 78c74ca6ec..0a0db2f02a 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -16,6 +16,7 @@ class LayerType(Enum):
16 BSP = 0 16 BSP = 0
17 DISTRO = 1 17 DISTRO = 1
18 SOFTWARE = 2 18 SOFTWARE = 2
19 CORE = 3
19 ERROR_NO_LAYER_CONF = 98 20 ERROR_NO_LAYER_CONF = 98
20 ERROR_BSP_DISTRO = 99 21 ERROR_BSP_DISTRO = 99
21 22
@@ -106,7 +107,13 @@ def _detect_layer(layer_path):
106 if distros: 107 if distros:
107 is_distro = True 108 is_distro = True
108 109
109 if is_bsp and is_distro: 110 layer['collections'] = _get_layer_collections(layer['path'])
111
112 if layer_name == "meta" and "core" in layer['collections']:
113 layer['type'] = LayerType.CORE
114 layer['conf']['machines'] = machines
115 layer['conf']['distros'] = distros
116 elif is_bsp and is_distro:
110 layer['type'] = LayerType.ERROR_BSP_DISTRO 117 layer['type'] = LayerType.ERROR_BSP_DISTRO
111 elif is_bsp: 118 elif is_bsp:
112 layer['type'] = LayerType.BSP 119 layer['type'] = LayerType.BSP
@@ -117,8 +124,6 @@ def _detect_layer(layer_path):
117 else: 124 else:
118 layer['type'] = LayerType.SOFTWARE 125 layer['type'] = LayerType.SOFTWARE
119 126
120 layer['collections'] = _get_layer_collections(layer['path'])
121
122 return layer 127 return layer
123 128
124def detect_layers(layer_directories, no_auto): 129def detect_layers(layer_directories, no_auto):
diff --git a/scripts/lib/checklayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py
index a80a5844da..b76163fb56 100644
--- a/scripts/lib/checklayer/cases/bsp.py
+++ b/scripts/lib/checklayer/cases/bsp.py
@@ -11,7 +11,7 @@ from checklayer.case import OECheckLayerTestCase
11class BSPCheckLayer(OECheckLayerTestCase): 11class BSPCheckLayer(OECheckLayerTestCase):
12 @classmethod 12 @classmethod
13 def setUpClass(self): 13 def setUpClass(self):
14 if self.tc.layer['type'] != LayerType.BSP: 14 if self.tc.layer['type'] not in (LayerType.BSP, LayerType.CORE):
15 raise unittest.SkipTest("BSPCheckLayer: Layer %s isn't BSP one." %\ 15 raise unittest.SkipTest("BSPCheckLayer: Layer %s isn't BSP one." %\
16 self.tc.layer['name']) 16 self.tc.layer['name'])
17 17
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 491a13953c..722d3cf638 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -12,6 +12,9 @@ from checklayer.case import OECheckLayerTestCase
12 12
13class CommonCheckLayer(OECheckLayerTestCase): 13class CommonCheckLayer(OECheckLayerTestCase):
14 def test_readme(self): 14 def test_readme(self):
15 if self.tc.layer['type'] == LayerType.CORE:
16 raise unittest.SkipTest("Core layer's README is top level")
17
15 # The top-level README file may have a suffix (like README.rst or README.txt). 18 # The top-level README file may have a suffix (like README.rst or README.txt).
16 readme_files = glob.glob(os.path.join(self.tc.layer['path'], '[Rr][Ee][Aa][Dd][Mm][Ee]*')) 19 readme_files = glob.glob(os.path.join(self.tc.layer['path'], '[Rr][Ee][Aa][Dd][Mm][Ee]*'))
17 self.assertTrue(len(readme_files) > 0, 20 self.assertTrue(len(readme_files) > 0,
diff --git a/scripts/lib/checklayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py
index f0bee5493c..a35332451c 100644
--- a/scripts/lib/checklayer/cases/distro.py
+++ b/scripts/lib/checklayer/cases/distro.py
@@ -11,7 +11,7 @@ from checklayer.case import OECheckLayerTestCase
11class DistroCheckLayer(OECheckLayerTestCase): 11class DistroCheckLayer(OECheckLayerTestCase):
12 @classmethod 12 @classmethod
13 def setUpClass(self): 13 def setUpClass(self):
14 if self.tc.layer['type'] != LayerType.DISTRO: 14 if self.tc.layer['type'] not in (LayerType.DISTRO, LayerType.CORE):
15 raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\ 15 raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\
16 self.tc.layer['name']) 16 self.tc.layer['name'])
17 17