From da836e53af8db51d1198f0def799001388aebe9d Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 8 Oct 2024 12:06:10 +0200 Subject: [PATCH] build: add `-DisableCapture` switch to Windows test-runner --- scripts/run_tests.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/run_tests.ps1 b/scripts/run_tests.ps1 index 0f5345d76..52f880de3 100644 --- a/scripts/run_tests.ps1 +++ b/scripts/run_tests.ps1 @@ -3,7 +3,8 @@ param ( [switch]$Clean = $false, [string]$Keyword = "", [int]$Parallelism = 1, - [switch]$WithoutCrashpadWer = $false + [switch]$WithoutCrashpadWer = $false, + [switch]$DisableCapture = $false ) $update_test_discovery = Join-Path -Path $PSScriptRoot -ChildPath "update_test_discovery.ps1" @@ -18,6 +19,10 @@ if ($Clean -or -not (Test-Path .\.venv)) $pytestCommand = ".\.venv\Scripts\pytest.exe .\tests\ --verbose" +if ($DisableCapture) { + $pytestCommand += " --capture=no" +} + if ($Parallelism -gt 1) { $pytestCommand += " -n $Parallelism"