提交 09cc1309 编写于 作者: L Lukáš Doktor

optional_plugins.loader_yaml: Allow name_prefix to be list

Allowing name_prefix to be list allows one to specified shared parts of
the name_prefix inherited from upper-node:

    !mux
    functional: !mux
        name_prefix: ["functional-"]
        rpm:
            name_prefix: ["rpm"]
        git:
            name_prefix: ["git"]

which results in: "functional-rpm" and "functional-git".
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 6c172665
......@@ -114,6 +114,8 @@ class YamlTestsuiteLoader(loader.TestLoader):
test_loader.get_full_decorator_mapping())
name_prefix = params.get("mux_suite_test_name_prefix")
if _tests:
if isinstance(name_prefix, list):
name_prefix = "".join(name_prefix)
for tst in _tests:
if name_prefix:
tst[1]["name"] = name_prefix + tst[1]["name"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册