| Message ID | 20260120194722.142355-3-ungerer.ricardo@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | Improve yocto-check-layer test_readme method | expand |
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py index 0114481434..9ea7592ba6 100644 --- a/scripts/lib/checklayer/cases/common.py +++ b/scripts/lib/checklayer/cases/common.py @@ -39,7 +39,7 @@ class CommonCheckLayer(OECheckLayerTestCase): self.assertIn('patch', data.lower(), msg="No patching information found in README.") # Check that there is an email address in the README email_regex = re.compile(r"[^@]+@[^@]+") - self.assertTrue(email_regex.match(data), msg="No email address found in README.") + self.assertTrue(email_regex.search(data), msg="No email address found in README.") def find_file_by_name(self, globs): """
So far the test_readme have been use of re.match to find an email address in the README file. This only matches if the email address is at the start of the file. This commit changes this to re.search to find email addresses anywhere in the README file. Signed-off-by: Ricardo Ungerer <ungerer.ricardo@gmail.com> --- scripts/lib/checklayer/cases/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)