From: Richard Purdie Date: Thu, 30 Mar 2023 14:33:01 +0000 (+0100) Subject: oeqa/loader: Ensure module names don't contain uppercase characters X-Git-Tag: 2023-04-mickledore~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7964a6ee54e881a6128707a7f2a42eec2ed63881;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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. Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py index f25b5970e93..d12d5a055cc 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)