Skip to content

Commit

Permalink
fio_windows: Update new check method for fio install
Browse files Browse the repository at this point in the history
1. The original fio installed judge condition does not accurate,
   change new here.
2. storage_benchmark remove fio does not clean since fio directory
   remain using, solve this problem as well.

Signed-off-by: Peixiu Hou <phou@redhat.com>
  • Loading branch information
peixiu committed Mar 18, 2024
1 parent fef9d14 commit 0f643b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion provider/storage_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _find_exe_file():
"""
Find the path of the given executable file in windows.
"""
cmd_dir = r'CD %s && DIR /S /B %s.exe' % (dst, self.name)
cmd_dir = r'DIR /S /B "%s" | find "%s.exe"' % (dst, self.name)
s, o = self.session.cmd_status_output(cmd_dir, timeout=timeout)
if not s:
return '"{}"'.format(o.splitlines()[0])
Expand Down
2 changes: 1 addition & 1 deletion qemu/tests/fio_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def run(test, params, env):
fio_cmd = params.get("fio_cmd")
timeout = float(params.get("login_timeout", 360))
cmd_timeout = int(params.get("cmd_timeout", "360"))
check_installed_cmd = 'dir "%s"|findstr /I fio' % install_path
check_installed_cmd = 'dir "%s/fio"|findstr /I fio.exe' % install_path
check_installed_cmd = params.get("check_installed_cmd",
check_installed_cmd)

Expand Down

0 comments on commit 0f643b3

Please sign in to comment.