From: leonardo.sandoval.gonzalez@linux.intel.com
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] core/loader.py: fix regex to include all available test cases
Date: Tue, 5 Dec 2017 07:51:42 -0800 [thread overview]
Message-ID: <20171205155142.190886-1-leonardo.sandoval.gonzalez@linux.intel.com> (raw)
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@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@linux.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()
--
2.12.3
next reply other threads:[~2017-12-05 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 15:51 leonardo.sandoval.gonzalez [this message]
2017-12-06 11:50 ` [PATCH] core/loader.py: fix regex to include all available test cases Joshua Lock
2017-12-06 15:58 ` Leonardo Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171205155142.190886-1-leonardo.sandoval.gonzalez@linux.intel.com \
--to=leonardo.sandoval.gonzalez@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox