[OE-core] [PATCH] oeqa/loader: Ensure invalid test names don't trigger a traceback
Richard Purdie
richard.purdie at linuxfoundation.org
Thu Jul 26 15:07:53 UTC 2018
oe-selftest -r <invalid test name>
currently triggers a traceback. Ensure this doesn't happen and the user gets a
sensible error message.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/core/loader.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 98fc0f696a1..6070bf53105 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -44,6 +44,8 @@ def _built_modules_dict(modules):
# Assumption: package and module names do not contain upper case
# characters, whereas class names do
m = re.match(r'^(\w+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
+ if not m:
+ continue
module_name, class_name, test_name = m.groups()
--
2.17.1
More information about the Openembedded-core
mailing list