Release 1.1.2: improve processing status and inspect stellar elongation
All checks were successful
Release AstroFrame / packages (push) Successful in 1m9s
All checks were successful
Release AstroFrame / packages (push) Successful in 1m9s
This commit is contained in:
parent
65ded0b606
commit
5ad7a6a79e
12 changed files with 258 additions and 41 deletions
36
tools/Verify-Preview.ps1
Normal file
36
tools/Verify-Preview.ps1
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
param(
|
||||
[Parameter(Mandatory)][string]$FixtureProject,
|
||||
[string]$Output='artifacts/preview-verification'
|
||||
)
|
||||
$ErrorActionPreference='Stop'
|
||||
$repository=Split-Path $PSScriptRoot
|
||||
Set-Location $repository
|
||||
if (![OperatingSystem]::IsWindows()) { throw 'This diagnostic checks the Windows desktop UI.' }
|
||||
$fixture=(Resolve-Path -LiteralPath $FixtureProject).Path
|
||||
if (!(Test-Path -LiteralPath (Join-Path $fixture 'project.json'))) { throw 'Supply a saved project with current analysis and available read-only FITS sources.' }
|
||||
$destination=[IO.Path]::GetFullPath((Join-Path $repository $Output))
|
||||
$artifactRoot=[IO.Path]::GetFullPath((Join-Path $repository 'artifacts'))+[IO.Path]::DirectorySeparatorChar
|
||||
if (!$destination.StartsWith($artifactRoot,[StringComparison]::OrdinalIgnoreCase)) { throw 'Diagnostic output must stay inside workspace artifacts/.' }
|
||||
if (Test-Path -LiteralPath $destination) { throw 'Choose a fresh output directory to preserve earlier verification results.' }
|
||||
New-Item -ItemType Directory -Path $destination | Out-Null
|
||||
Copy-Item -LiteralPath $fixture -Destination (Join-Path $destination 'fixture') -Recurse
|
||||
New-Item -ItemType Directory -Force artifacts/test-temp, .tools/http-cache | Out-Null
|
||||
$env:TEMP=Join-Path $repository 'artifacts/test-temp'
|
||||
$env:TMP=$env:TEMP
|
||||
$env:NUGET_HTTP_CACHE_PATH=Join-Path $repository '.tools/http-cache'
|
||||
$env:AVALONIA_TELEMETRY_OPTOUT='1'
|
||||
$env:DOTNET_ROOT=Join-Path $repository '.tools/dotnet'
|
||||
$application=Join-Path $repository 'src/AstroFrame.Desktop/bin/Release/net8.0/AstroFrame.Desktop.exe'
|
||||
if (!(Test-Path -LiteralPath $application)) { throw 'Build the source with ./Build.ps1 first.' }
|
||||
$report=Join-Path $destination 'qa'
|
||||
New-Item -ItemType Directory -Path $report | Out-Null
|
||||
$process=Start-Process -FilePath $application -ArgumentList @('--verify-ui',('"'+(Join-Path $destination 'fixture')+'"'),('"'+$report+'"')) -WindowStyle Hidden -PassThru
|
||||
if (!$process.WaitForExit(30000)) { Stop-Process -Id $process.Id -Force; throw 'Source desktop verification timed out.' }
|
||||
if ($process.ExitCode -ne 0) {
|
||||
$errorReport=Join-Path $report 'error.txt'
|
||||
if (Test-Path -LiteralPath $errorReport) { Get-Content -LiteralPath $errorReport }
|
||||
throw "Source desktop verification failed (exit $($process.ExitCode))."
|
||||
}
|
||||
Get-Content -LiteralPath (Join-Path $report 'interaction-checks.txt')
|
||||
Get-Content -LiteralPath (Join-Path $report 'smoke-checks.txt')
|
||||
Write-Host "Rendered preview, processing status and elongation captures: $report"
|
||||
Loading…
Add table
Add a link
Reference in a new issue