提交 0bae0e62 编写于 作者: S suqinhuang 提交者: GitHub

Merge pull request #673 from CongLi/balloon_service

balloon_service: fix a logical error of blnsvr.exe status.
...@@ -51,13 +51,14 @@ def run(test, params, env): ...@@ -51,13 +51,14 @@ def run(test, params, env):
logging.debug("Check balloon service status.") logging.debug("Check balloon service status.")
output = session.cmd_output(status_balloon_service) output = session.cmd_output(status_balloon_service)
if re.search(r"running", output.lower(), re.M): if re.search(r"running", output.lower(), re.M):
if re.search(r"stop", output.lower(), re.M): logging.debug("Balloon service is already running !")
logging.debug("Run Balloon Service in guest.") elif re.search(r"stop", output.lower(), re.M):
try: logging.debug("Run Balloon Service in guest.")
run_balloon_service = params["run_balloon_service"] % drive_letter try:
session.cmd(run_balloon_service) run_balloon_service = params["run_balloon_service"] % drive_letter
except ShellCmdError: session.cmd(run_balloon_service)
raise exceptions.TestError("Run balloon service failed !") except ShellCmdError:
raise exceptions.TestError("Run balloon service failed !")
else: else:
logging.debug("Install Balloon Service in guest.") logging.debug("Install Balloon Service in guest.")
try: try:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册