[OE-core] [PATCH] core/loader.py: fix regex to include all available test cases
Leonardo Sandoval
leonardo.sandoval.gonzalez at linux.intel.com
Wed Dec 6 15:58:46 UTC 2017
On Wed, 6 Dec 2017 11:50:58 +0000
Joshua Lock <joshua.g.lock at linux.intel.com> wrote:
> On 05/12/17 15:51, leonardo.sandoval.gonzalez at linux.intel.com wrote:
> > From: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
> >
> > Some test cases (i.e. eSDK.oeSDKExtSelfTest*) does not match with current regex,
> > fix it to accept these (and previous ones).
> >
> > Without it, the following runtime exception is observed when executing eSDK
> > selftest (oe-selftest -r eSDK)
> >
> > Traceback (most recent call last):
> > File "/openembedded-core/scripts/oe-selftest", line 70, in <module>
> > ret = main()
> > File "/openembedded-core/scripts/oe-selftest", line 57, in main
> > results = args.func(logger, args)
> > File "/openembedded-core/meta/lib/oeqa/selftest/context.py", line 253, in run
> > rc = self._internal_run(logger, args)
> > File "/openembedded-core/meta/lib/oeqa/selftest/context.py", line 205, in _internal_run
> > self.tc.loadTests(self.module_paths, **self.tc_kwargs['load'])
> > File "/openembedded-core/meta/lib/oeqa/core/context.py", line 58, in loadTests
> > modules_required, filters)
> > File "/openembedded-core/meta/lib/oeqa/core/loader.py", line 69, in __init__
> > self.modules = _built_modules_dict(modules)
> > File "/openembedded-core/meta/lib/oeqa/core/loader.py", line 48, in _built_modules_dict
> > module_name, class_name, test_name = m.groups()
> > AttributeError: 'NoneType' object has no attribute 'groups'
> >
> > Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
>
> LGTM and fixes [YOCTO #12385], thanks!
>
unfortunately, I found another way that this breaks ('bitbake -c testimage core-image-full-cmdline', which also uses the core loader) so there is a need for a V2.
> Acked-by: Joshua Lock <joshua.g.lock at intel.com>
>
> > ---
> > meta/lib/oeqa/core/loader.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
> > index 975a081ba4..9ab4df0a60 100644
> > --- a/meta/lib/oeqa/core/loader.py
> > +++ b/meta/lib/oeqa/core/loader.py
> > @@ -43,7 +43,7 @@ def _built_modules_dict(modules):
> > for module in modules:
> > # Assumption: package and module names do not contain upper case
> > # characters, whereas class names do
> > - m = re.match(r'^([^A-Z]+)(?:\.([A-Z][^.]*)(?:\.([^.]+))?)?$', module)
> > + m = re.match(r'^([a-zA-Z]+)(?:\.([a-zA-Z][^.]*)(?:\.([^.]+))?)?$', module)
> >
> > module_name, class_name, test_name = m.groups()
> >
> >
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list