提交 1eaef86e 编写于 作者: S suqinhuang 提交者: GitHub

Merge pull request #908 from suqinhuang/fio_windows

Fix typo and cfg of fio_windows
- fio_windows:
type = fio_windows
only Windows
test_timeout = 600
install_path = "C:\fio"
cmd_timeout = 600
log_file = "C:\fio_log.txt"
image_snapshot = yes
i386, i686:
install_cmd = "msiexec /a DRIVE:\fio-x86.msi /qn TARGETDIR=${install_path}"
install_path = "C:\Program Files\fio"
install_cmd = 'msiexec /a DRIVE:\fio-x86.msi /qn TARGETDIR="${install_path}"'
x86_64:
install_cmd = "msiexec /a DRIVE:\fio-x64.msi /qn TARGETDIR=${install_path}"
config_cmd = 'setx -m path "%PATH%;${install_path}\fio;"'
install_path = "C:\Program Files (x86)\fio"
install_cmd = 'msiexec /a DRIVE:\fio-x64.msi /qn TARGETDIR="${install_path}"'
#config_cmd = 'setx -m path "%PATH%;${install_path}\fio;"'
fio_cmd = '"${install_path}\fio\fio.exe" --name=fiotest --rw=randrw --iodepth=4 --bs=4k'
fio_cmd += ' --size=1G --ioengine=windowsaio --numjobs=4 --runtime=${test_timeout} > ${log_file}'
fio_cmd += ' --size=1G --ioengine=windowsaio --numjobs=4 --runtime=${cmd_timeout} > ${log_file}'
......@@ -26,7 +26,7 @@ def run(test, params, env):
log_file = params.get("log_file")
fio_cmd = params.get("fio_cmd")
timeout = float(params.get("login_timeout", 360))
test_timeout = int(params.get("test_timeout", "360"))
cmd_timeout = int(params.get("cmd_timeout", "360"))
check_installed_cmd = 'dir "%s"|findstr /I fio' % install_path
check_installed_cmd = params.get("check_installed_cmd",
check_installed_cmd)
......@@ -49,12 +49,15 @@ def run(test, params, env):
session.cmd(config_cmd)
error_context.context("Start fio in guest.", logging.info)
s, o = session.cmd_status_output(fio_cmd, timeout=(test_timeout+60))
s, o = session.cmd_status_output(fio_cmd, timeout=(cmd_timeout+60))
if s:
raise exceptions.TestError("Failed to run fio, output: %s") % o
raise exceptions.TestError("Failed to run fio, output: %s" % o)
finally:
error_context.context("Copy fio log from guest to host.", logging.info)
vm.copy_files_from(log_file, test.resultsdir)
try:
vm.copy_files_from(log_file, test.resultsdir)
except Exception, err:
logging.warn("Log file copy failed: %s" % err)
if session:
session.close()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册