diff options
Diffstat (limited to 'scripts/lib/checklayer/cases/common.py')
-rw-r--r-- | scripts/lib/checklayer/cases/common.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py index 4495f71b24..52c786f77b 100644 --- a/scripts/lib/checklayer/cases/common.py +++ b/scripts/lib/checklayer/cases/common.py | |||
@@ -6,6 +6,7 @@ | |||
6 | import glob | 6 | import glob |
7 | import os | 7 | import os |
8 | import unittest | 8 | import unittest |
9 | import re | ||
9 | from checklayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures | 10 | from checklayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures |
10 | from checklayer.case import OECheckLayerTestCase | 11 | from checklayer.case import OECheckLayerTestCase |
11 | 12 | ||
@@ -25,6 +26,11 @@ class CommonCheckLayer(OECheckLayerTestCase): | |||
25 | data = f.read() | 26 | data = f.read() |
26 | self.assertTrue(data, | 27 | self.assertTrue(data, |
27 | msg="Layer contains a README file but it is empty.") | 28 | msg="Layer contains a README file but it is empty.") |
29 | self.assertIn('maintainer',data) | ||
30 | self.assertIn('patch',data) | ||
31 | # Check that there is an email address in the README | ||
32 | email_regex = re.compile(r"[^@]+@[^@]+") | ||
33 | self.assertTrue(email_regex.match(data)) | ||
28 | 34 | ||
29 | def test_parse(self): | 35 | def test_parse(self): |
30 | check_command('Layer %s failed to parse.' % self.tc.layer['name'], | 36 | check_command('Layer %s failed to parse.' % self.tc.layer['name'], |