mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
oeqa/loader: Ensure invalid test names don't trigger a traceback
oe-selftest -r <invalid test name> currently triggers a traceback. Ensure this doesn't happen and the user gets a sensible error message. (From OE-Core rev: f2042bf3638ed4edfb167e7f7d4be6da60997ead) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user