From f2042bf3638ed4edfb167e7f7d4be6da60997ead Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 26 Jul 2018 15:03:40 +0000 Subject: oeqa/loader: Ensure invalid test names don't trigger a traceback oe-selftest -r currently triggers a traceback. Ensure this doesn't happen and the user gets a sensible error message. Signed-off-by: Richard Purdie --- 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 98fc0f696a..6070bf5310 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() -- cgit 1.2.3-korg