提交 9b49fd65 编写于 作者: L Lukáš Doktor 提交者: Lucas Meneghel Rodrigues

qemu.tests.virtio_console: Raise correct exception

virtio_console catches exceptions and raises TestFail when unknown
exception occurs (because any Shell/... exception usually means
test failure.

Anyway it should raise TestError and TestNAError in case they occurs.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 83b2f5e9
......@@ -1907,4 +1907,9 @@ def run_virtio_console(test, params, env):
"".join(traceback.format_exception(
exc_type, exc_value,
exc_traceback.tb_next)))
raise error.TestFail('%s failed: %s' % (_fce, details))
if isinstance(details, error.TestError):
raise error.TestError('%s error: %s' % (_fce, details))
elif isinstance(details, error.TestNAError):
raise error.TestNAError('%s skipped: %s' % (_fce, details))
else:
raise error.TestFail('%s failed: %s' % (_fce, details))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册