@@ -30,18 +30,17 @@ def run_autoit(test, params, env):
# Send AutoIt script to guest (this code will be replaced once we
# support sending files to Windows guests)
- session.sendline("del script.au3")
+ session.get_command_output("del script.au3", internal_timeout=0)
file = open(kvm_utils.get_path(test.bindir, script))
for line in file.readlines():
# Insert a '^' before each character
line = "".join("^" + c for c in line.rstrip())
if line:
# Append line to the file
- session.sendline("echo %s>>script.au3" % line)
+ session.get_command_output("echo %s>>script.au3" % line,
+ internal_timeout=0)
file.close()
- session.read_up_to_prompt()
-
command = "cmd /c %s script.au3 %s" % (binary, script_params)
logging.info("---------------- Script output ----------------")
@@ -85,7 +85,7 @@ def run_autotest(test, params, env):
extract(vm, "autotest.tar.bz2")
# mkdir autotest/tests
- session.sendline("mkdir autotest/tests")
+ session.get_command_output("mkdir autotest/tests")
# Extract <test_name>.tar.bz2 into autotest/tests
extract(vm, test_name + ".tar.bz2", "autotest/tests")
@@ -99,10 +99,9 @@ def run_autotest(test, params, env):
# Run the test
logging.info("Running test '%s'..." % test_name)
- session.sendline("cd autotest")
- session.sendline("rm -f control.state")
- session.sendline("rm -rf results/*")
- session.read_up_to_prompt()
+ session.get_command_output("cd autotest")
+ session.get_command_output("rm -f control.state")
+ session.get_command_output("rm -rf results/*")
logging.info("---------------- Test output ----------------")
status = session.get_command_status("bin/autotest control",
timeout=test_timeout,