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

avocado.core.loader: Avoid INNER_RUNNER detection as SIMPLE test

InnerRunner tests are inherited from SimpleTest, thus "--loaders
SIMPLE:/bin/echo" detects inner_runner as subclass and proceeds.
This patch adds exclude to avoid InnerRunner to be detected as
SimpleTest.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 51d8f45c
......@@ -458,10 +458,14 @@ class FileLoader(TestLoader):
issubclass(tst[0], filtered_clss)):
return None
else:
if self.test_type == 'SIMPLE':
exclude = test.InnerRunnerTest # InnerRunner is inherited
else:
exclude = None
test_class = (key for key, value in mapping.iteritems()
if value == self.test_type).next()
for tst in tests:
if not issubclass(tst[0], test_class):
if not issubclass(tst[0], test_class) or tst[0] == exclude:
return None
return tests
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册