Fichiers
vercora/tools/bench_runner.ps1
T
Théo GastineletClaude Opus 5.5 eec89677c2 Publication : chemins relatifs dans tools, journaux de build hors du depot, mention IGN
- tools/*.ps1 : plus de chemin absolu vers le profil Windows
- build_log.txt retire du suivi, *.log et build-*/ ignores
- README : section Donnees et licence (IGN - Programme LiDAR HD, Etalab 2.0 ; code tous droits reserves)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:17:47 +01:00

34 lignes
1.2 KiB
PowerShell

param(
[Parameter(Mandatory = $true)][string]$ArgsString,
[Parameter(Mandatory = $true)][string]$LogFile,
[string]$TargetDesktop = "Bench Vercora"
)
$root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$exe = Join-Path $root "build\vercora.exe"
$vd = Join-Path $root "tools\VirtualDesktop.exe"
$logPath = Join-Path $root $LogFile
$errPath = "$logPath.err"
# Verifier ou recuperer l'indice du bureau actuel
# Par defaut, le bureau 0 est le bureau principal
$origDesktop = 0
Write-Host "1. Bascule vers le bureau virtuel '$TargetDesktop'..."
& $vd /Switch:$TargetDesktop
Start-Sleep -Milliseconds 150
Write-Host "2. Demarrage de Vercora..."
$proc = Start-Process -FilePath $exe -ArgumentList $ArgsString -WorkingDirectory $root `
-RedirectStandardOutput $logPath -RedirectStandardError $errPath -PassThru
# Attendre que la fenetre soit initialisee (environ 800ms) pour qu'elle s'ancre sur ce bureau
Start-Sleep -Milliseconds 900
Write-Host "3. Retour immediat vers le bureau d'origine ($origDesktop)..."
& $vd /Switch:$origDesktop
Write-Host "4. Benchmark en cours sur '$TargetDesktop' (PID $($proc.Id))..."
$proc.WaitForExit()
Write-Host "Benchmark termine avec le code de sortie : $($proc.ExitCode)."