提交 d1fbb309 编写于 作者: Y Yanan Fu

guest_test: using safe mode when execute cmd with serial session

Signed-off-by: NYanan Fu <yfu@redhat.com>
上级 876f20a8
......@@ -76,7 +76,10 @@ def run(test, params, env):
try:
logging.info("------------ Script output ------------")
session.cmd(cmd, print_func=logging.info, timeout=test_timeout)
s, o = session.cmd_status_output(cmd, print_func=logging.info,
timeout=test_timeout, safe=True)
if s != 0:
test.fail("Run script '%s' failed, script output is: %s" % (cmd, o))
finally:
logging.info("------------ End of script output ------------")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册