mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
690 B
22 lines
690 B
# This script can be used to collect logs from sporadic bugs
|
|
Param(
|
|
[int]$TestRunCount=10,
|
|
[string]$TargetFramework="netcoreapp3.1",
|
|
[string]$Configuration="Release"
|
|
)
|
|
|
|
$runId = Get-Random -Minimum 0 -Maximum 9999
|
|
|
|
dotnet build -c $Configuration -f $TargetFramework
|
|
for ($i = 0; $i -lt $TestRunCount; $i++) {
|
|
$logFile = ".\_testlog-" + $runId.ToString("d4") + "-run-" + $i.ToString("d3") + ".log"
|
|
Write-Host "Test run $i ..."
|
|
& dotnet test --no-build -c $Configuration -f $TargetFramework 3>&1 2>&1 > $logFile
|
|
if ($LastExitCode -eq 0) {
|
|
Write-Host "Success!"
|
|
Remove-Item $logFile
|
|
}
|
|
else {
|
|
Write-Host "Failed: $logFile"
|
|
}
|
|
}
|
|
|