diff --git a/qa/suites/windows/basic/tasks/rbd_wnbd.yaml b/qa/suites/windows/basic/tasks/windows_tests.yaml similarity index 68% rename from qa/suites/windows/basic/tasks/rbd_wnbd.yaml rename to qa/suites/windows/basic/tasks/windows_tests.yaml index fb243857c89f7..42469bf3bac90 100644 --- a/qa/suites/windows/basic/tasks/rbd_wnbd.yaml +++ b/qa/suites/windows/basic/tasks/windows_tests.yaml @@ -3,4 +3,4 @@ tasks: clients: client.0: - windows/libvirt_vm/setup.sh - - windows/run-rbd-wnbd-tests.sh + - windows/run-tests.sh diff --git a/qa/workunits/windows/run-rbd-wnbd-tests.sh b/qa/workunits/windows/run-rbd-wnbd-tests.sh deleted file mode 100755 index 981e44e18b552..0000000000000 --- a/qa/workunits/windows/run-rbd-wnbd-tests.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -set -ex - -DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" - -source ${DIR}/libvirt_vm/build_utils.sh -source ${DIR}/libvirt_vm/connection_info.sh - -# Run the rbd-wnbd tests -scp_upload ${DIR}/test_rbd_wnbd.py /test_rbd_wnbd.py -ssh_exec python.exe /test_rbd_wnbd.py --test-name RbdTest -ssh_exec python.exe /test_rbd_wnbd.py --test-name RbdFioTest -ssh_exec python.exe /test_rbd_wnbd.py --test-name RbdStampTest diff --git a/qa/workunits/windows/run-tests.ps1 b/qa/workunits/windows/run-tests.ps1 new file mode 100644 index 0000000000000..6d818f4267ecf --- /dev/null +++ b/qa/workunits/windows/run-tests.ps1 @@ -0,0 +1,29 @@ +$ProgressPreference = "SilentlyContinue" +$ErrorActionPreference = "Stop" + +$scriptLocation = [System.IO.Path]::GetDirectoryName( + $myInvocation.MyCommand.Definition) + +$testRbdWnbd = "$scriptLocation/test_rbd_wnbd.py" + +function safe_exec() { + # Powershell doesn't check the command exit code, we'll need to + # do it ourselves. Also, in case of native commands, it treats stderr + # output as an exception, which is why we'll have to capture it. + cmd /c "$args 2>&1" + if ($LASTEXITCODE) { + throw "Command failed: $args" + } +} + +safe_exec python.exe $testRbdWnbd --test-name RbdTest --iterations 100 +safe_exec python.exe $testRbdWnbd --test-name RbdFioTest --iterations 100 +safe_exec python.exe $testRbdWnbd --test-name RbdStampTest --iterations 100 + +# It can take a while to setup the partition (~10s), we'll use fewer iterations. +safe_exec python.exe $testRbdWnbd --test-name RbdFsTest --iterations 4 +safe_exec python.exe $testRbdWnbd --test-name RbdFsFioTest --iterations 4 +safe_exec python.exe $testRbdWnbd --test-name RbdFsStampTest --iterations 4 + +safe_exec python.exe $testRbdWnbd ` + --test-name RbdResizeFioTest --image-size-mb 64 diff --git a/qa/workunits/windows/run-tests.sh b/qa/workunits/windows/run-tests.sh new file mode 100644 index 0000000000000..b582491c562b0 --- /dev/null +++ b/qa/workunits/windows/run-tests.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -ex + +DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" + +source ${DIR}/libvirt_vm/build_utils.sh +source ${DIR}/libvirt_vm/connection_info.sh + +# Run the Windows tests +scp_upload ${DIR} /windows-workunits +SSH_TIMEOUT=30m ssh_exec powershell.exe -File /windows-workunits/run-tests.ps1