* [PATCH] oeqa/loader: Ensure module names don't contain uppercase characters
@ 2023-03-30 22:44 Richard Purdie
2023-03-30 23:16 ` [OE-core] " Martin Jansa
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2023-03-30 22:44 UTC (permalink / raw)
To: openembedded-core
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 <richard.purdie@linuxfoundation.org>
---
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 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)
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH] oeqa/loader: Ensure module names don't contain uppercase characters
2023-03-30 22:44 [PATCH] oeqa/loader: Ensure module names don't contain uppercase characters Richard Purdie
@ 2023-03-30 23:16 ` Martin Jansa
2023-03-30 23:28 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2023-03-30 23:16 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]
I've similar one locally, but this one works for me as well.
Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
On Fri, Mar 31, 2023 at 12:44 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> 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 <richard.purdie@linuxfoundation.org>
> ---
> 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 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)
>
>
> --
> 2.39.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#179375):
> https://lists.openembedded.org/g/openembedded-core/message/179375
> Mute This Topic: https://lists.openembedded.org/mt/97962405/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 2846 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH] oeqa/loader: Ensure module names don't contain uppercase characters
2023-03-30 23:16 ` [OE-core] " Martin Jansa
@ 2023-03-30 23:28 ` Richard Purdie
2023-03-30 23:44 ` Martin Jansa
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2023-03-30 23:28 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On Fri, 2023-03-31 at 01:16 +0200, Martin Jansa wrote:
> I've similar one locally, but this one works for me as well.
>
> Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
I did check your public branches and didn't see it and wanted to get
the other patch in so I quickly put it together!
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH] oeqa/loader: Ensure module names don't contain uppercase characters
2023-03-30 23:28 ` Richard Purdie
@ 2023-03-30 23:44 ` Martin Jansa
0 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2023-03-30 23:44 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
On Fri, Mar 31, 2023 at 1:28 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> On Fri, 2023-03-31 at 01:16 +0200, Martin Jansa wrote:
> > I've similar one locally, but this one works for me as well.
> >
> > Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
>
> I did check your public branches and didn't see it and wanted to get
> the other patch in so I quickly put it together!
>
Yeah, I was hiding it in my poky branches I'm using for selftest testing,
sorry. I was going to send it after resolving eSDK failure when uninative
is not enabled (which is taking too long, because I got stuck in something
else again :/).
I've sent at least the pending runqemu changes and small fix for
imagefeatures.py change merged today.
Cheers,
> Cheers,
>
> Richard
>
[-- Attachment #2: Type: text/html, Size: 1395 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-30 23:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 22:44 [PATCH] oeqa/loader: Ensure module names don't contain uppercase characters Richard Purdie
2023-03-30 23:16 ` [OE-core] " Martin Jansa
2023-03-30 23:28 ` Richard Purdie
2023-03-30 23:44 ` Martin Jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox