diff --git a/provider/win_dump_utils.py b/provider/win_dump_utils.py index 3e56e7a780..a9a5797370 100644 --- a/provider/win_dump_utils.py +++ b/provider/win_dump_utils.py @@ -2,6 +2,7 @@ Windows dump related utilities. """ import os +import time import logging from avocado.utils import process @@ -79,13 +80,12 @@ def install_windbg(test, params, session, timeout=600): windbg_install_cmd = utils_misc.set_winutils_letter(session, windbg_install_cmd % params["feature"]) - - session.cmd(windbg_install_cmd) - if not utils_misc.wait_for(lambda: check_windbg_installed(params, session), - timeout=timeout, step=5): - test.fail("windbg tool has not been installed") - else: - LOG_JOB.info("windbg tool installation completed") + while check_windbg_installed(params, session) != True: + status, output = session.cmd_status_output(windbg_install_cmd) + if status == 1: + time.sleep(30) + else: + LOG_JOB.info("windbg tool installation completed") def check_windbg_installed(params, session): @@ -95,8 +95,8 @@ def check_windbg_installed(params, session): :param params: the dict used for parameters. :param session: The guest session object. """ - check_cmd = params["chk_windbg_cmd"] % params["windbg_path"] - status, _ = session.cmd_status_output(check_cmd) + chk_windbg_cmd = params["chk_windbg_cmd"] + status, _ = session.cmd_status_output(chk_windbg_cmd) return False if status else True diff --git a/qemu/tests/cfg/fwcfg.cfg b/qemu/tests/cfg/fwcfg.cfg index 767782c2b9..0f60e61c8f 100644 --- a/qemu/tests/cfg/fwcfg.cfg +++ b/qemu/tests/cfg/fwcfg.cfg @@ -19,21 +19,17 @@ image_name_stg = "images/storage" remove_image_stg = yes no ppc64 ppc64le aarch64 + chk_windbg_cmd = 'wmic product get name,version | find /i "SDK Debuggers"' i386: - windbg_path = "x86\windbg.exe" devcon_dirname += "x86" - chk_windbg_cmd = 'dir "C:\Program Files\Windows Kits\10\Debuggers\%s"' x86_64: - windbg_path = "x64\windbg.exe" devcon_dirname += "amd64" - chk_windbg_cmd = 'dir "C:\Program Files (x86)\Windows Kits\10\Debuggers\%s"' devcon_path = "WIN_UTILS:\devcon\${devcon_dirname}\devcon.exe" feature = "OptionId.WindowsDesktopDebuggers" sdk_setup = winsdksetup.exe Win8..1, Win2012..r1, Win2012..r2: sdk_setup = sdksetup_81.exe unzip_cmd = powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%s:\Memory.dmp.zip', '%s:'); }" - chk_windbg_cmd = 'dir "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\%s"' Win2016: sdk_setup = sdksetup_1607.exe Win2019: