From f67258fcbf40b1feaaac89ab5db9f5aee87261e2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 30 Mar 2023 15:33:01 +0100 Subject: oeqa/loader: Ensure module names don't contain uppercase characters Python modules aren't supposed to have uppercase characters in their names according to python conventions. We have regexs in the code which work on that assumption too. Rather than showing errors under some filtering situations, make it clear and error if a problematic name is seen. (From OE-Core rev: 7964a6ee54e881a6128707a7f2a42eec2ed63881) Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/loader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py index f25b5970e9..d12d5a055c 100644 --- a/meta/lib/oeqa/core/loader.py +++ b/meta/lib/oeqa/core/loader.py @@ -316,6 +316,9 @@ class OETestLoader(unittest.TestLoader): module_name_small in self.modules) \ else False + if any(c.isupper() for c in module.__name__): + raise SystemExit("Module '%s' contains uppercase characters and this isn't supported. Please fix the module name." % module.__name__) + return (load_module, load_underscore) -- cgit v1.2.3-54-g00ecf