From: Richard Purdie Date: Thu, 26 Jul 2018 15:03:40 +0000 (+0000) Subject: oeqa/loader: Ensure invalid test names don't trigger a traceback X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~17219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2042bf3638ed4edfb167e7f7d4be6da60997ead;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- 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()