Precommit (#1)

* first commit

* cleanup
This commit is contained in:
tompzf
2025-11-04 13:28:06 +01:00
committed by GitHub
parent dba45dc636
commit 6ed4b1534e
898 changed files with 256340 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<#
.SYNOPSIS
PowerShell script to loop a specific test executable multiple times to catch intermittent failures.
.DESCRIPTION
Usage: .\loop_test_runner.ps1 <TestName> <NumberOfRuns>
Example: .\loop_test_runner.ps1 UnitTest_SharedMemConnectTests.exe 1000
#>
param (
[Parameter(Mandatory = $true)]
[string]$TestName,
[Parameter(Mandatory = $true)]
[int]$NumberOfRuns
)
# Build the full path to the test executable
$TargetTest = Join-Path "..\build\tests\bin" $TestName
# Check if the test executable exists
if (Test-Path $TargetTest) {
Write-Host "`nStarting looped execution of $TargetTest to catch intermittent failures..." -ForegroundColor Cyan
for ($i = 1; $i -le $NumberOfRuns; $i++) {
Write-Host "`nRun #$i" -ForegroundColor Yellow
& $TargetTest
if ($LASTEXITCODE -ne 0) {
Write-Host "`nTest failed on run #$i" -ForegroundColor Red
break
}
}
} else {
Write-Host "Target test $TargetTest not found!" -ForegroundColor Red
exit 1
}