summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 15:03:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 17:14:42 +0100
commit1d4760a47fd7de20ae80d5056f07ee53e2d17fe4 (patch)
tree46759dc578a82a122ec6afbebaa1dbdee62e28c4 /meta
parentc467bc856963d701e5a7d63f6e85e1361244489a (diff)
downloadpoky-1d4760a47fd7de20ae80d5056f07ee53e2d17fe4.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/core/loader.py2
1 files changed, 2 insertions, 0 deletions
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):
44 # Assumption: package and module names do not contain upper case 44 # Assumption: package and module names do not contain upper case
45 # characters, whereas class names do 45 # characters, whereas class names do
46 m = re.match(r'^(\w+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII) 46 m = re.match(r'^(\w+)(?:\.(\w[^.]*)(?:\.([^.]+))?)?$', module, flags=re.ASCII)
47 if not m:
48 continue
47 49
48 module_name, class_name, test_name = m.groups() 50 module_name, class_name, test_name = m.groups()
49 51