]> code.ossystems Code Review - openembedded-core.git/commitdiff
yocto-check-layer: Allow any case for README file detection
authorMark Hatle <mark.hatle@windriver.com>
Wed, 28 Aug 2019 18:22:46 +0000 (14:22 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 30 Aug 2019 16:10:23 +0000 (17:10 +0100)
It's become more commone for files to be named "readme" or "Readme" on github servers
in recent time.  So adjust the scanning to allow any mix of case.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/checklayer/cases/common.py

index 8ffe028b3999713db78839d31b58f5145da72bb0..b82304e361609bb0e3ccd82b6afdde68d7612a67 100644 (file)
@@ -12,7 +12,7 @@ from checklayer.case import OECheckLayerTestCase
 class CommonCheckLayer(OECheckLayerTestCase):
     def test_readme(self):
         # 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'], 'README*'))
+        readme_files = glob.glob(os.path.join(self.tc.layer['path'], '[Rr][Ee][Aa][Dd][Mm][Ee]*'))
         self.assertTrue(len(readme_files) > 0,
                         msg="Layer doesn't contains README file.")