Files
Blockline/tests/Run-UpdaterTests.ps1
T

12 lines
723 B
PowerShell
Raw Normal View History

2026-09-12 11:01:37 +02:00
$ErrorActionPreference = 'Stop'
$compiler = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'
$testOutput = Join-Path $env:TEMP ('blockline-updater-tests-' + [guid]::NewGuid().ToString('N') + '.exe')
try {
& $compiler /nologo /target:exe /reference:System.IO.Compression.dll /reference:System.IO.Compression.FileSystem.dll "/out:$testOutput" (Join-Path $PSScriptRoot 'UpdaterTests.cs') (Join-Path $PSScriptRoot '../launcher/Updater.cs')
if ($LASTEXITCODE -ne 0) { throw 'Test-Kompilierung fehlgeschlagen.' }
& $testOutput
if ($LASTEXITCODE -ne 0) { throw 'Updater-Tests fehlgeschlagen.' }
} finally {
if (Test-Path -LiteralPath $testOutput) { Remove-Item -LiteralPath $testOutput }
}