Skip to contentSkip to conversation

yocto-check-layer: Allow any case for README file detection

PATCH New Mark Hatle 1 participant 1 message Aug 28, 2019

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 yocto-check-layer: Allow any case for README file detection

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.

---
 scripts/lib/checklayer/cases/common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/checklayer/cases/common.py +1 -1
index 8ffe028..b82304e 100644
@@ -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.")
 
Signature · 1 line
1.8.3.1