summaryrefslogtreecommitdiffstats
path: root/scripts/lib/checklayer/cases/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/checklayer/cases/common.py')
-rw-r--r--scripts/lib/checklayer/cases/common.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index 491a13953c..97b16f78c8 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -12,6 +12,9 @@ from checklayer.case import OECheckLayerTestCase
class CommonCheckLayer(OECheckLayerTestCase):
def test_readme(self):
+ if self.tc.layer['type'] == LayerType.CORE:
+ raise unittest.SkipTest("Core layer's README is top level")
+
# The top-level README file may have a suffix (like README.rst or README.txt).
readme_files = glob.glob(os.path.join(self.tc.layer['path'], '[Rr][Ee][Aa][Dd][Mm][Ee]*'))
self.assertTrue(len(readme_files) > 0,
@@ -69,6 +72,21 @@ class CommonCheckLayer(OECheckLayerTestCase):
self.tc.layer['name'])
self.fail('\n'.join(msg))
+ @unittest.expectedFailure
+ def test_patches_upstream_status(self):
+ import sys
+ sys.path.append(os.path.join(sys.path[0], '../../../../meta/lib/'))
+ import oe.qa
+ patches = []
+ for dirpath, dirs, files in os.walk(self.tc.layer['path']):
+ for filename in files:
+ if filename.endswith(".patch"):
+ ppath = os.path.join(dirpath, filename)
+ if oe.qa.check_upstream_status(ppath):
+ patches.append(ppath)
+ self.assertEqual(len(patches), 0 , \
+ msg="Found following patches with malformed or missing upstream status:\n%s" % '\n'.join([str(patch) for patch in patches]))
+
def test_signatures(self):
if self.tc.layer['type'] == LayerType.SOFTWARE and \
not self.tc.test_software_layer_signatures: