diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-30 15:33:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-31 23:30:36 +0100 |
commit | f67258fcbf40b1feaaac89ab5db9f5aee87261e2 (patch) | |
tree | 19cdf001c9549bc561e5ac6545a6b1a4c8da2083 | |
parent | 5a34ddf76ddc75d98e7f3a29fb35bb8a8b0d624b (diff) | |
download | poky-f67258fcbf40b1feaaac89ab5db9f5aee87261e2.tar.gz |
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 <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/core/loader.py | 3 |
1 files changed, 3 insertions, 0 deletions
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): | |||
316 | module_name_small in self.modules) \ | 316 | module_name_small in self.modules) \ |
317 | else False | 317 | else False |
318 | 318 | ||
319 | if any(c.isupper() for c in module.__name__): | ||
320 | raise SystemExit("Module '%s' contains uppercase characters and this isn't supported. Please fix the module name." % module.__name__) | ||
321 | |||
319 | return (load_module, load_underscore) | 322 | return (load_module, load_underscore) |
320 | 323 | ||
321 | 324 | ||