param([string]$QaRoot) $ErrorActionPreference = 'Stop' $env:HOME = Join-Path $QaRoot 'profile' $env:USERPROFILE = $env:HOME $env:APPDATA = Join-Path $QaRoot 'roaming' $env:LOCALAPPDATA = Join-Path $QaRoot 'local' $env:XDG_CONFIG_HOME = Join-Path $QaRoot 'config' $env:PATH = 'C:\Program Files\Go\bin;' + $env:PATH foreach ($dir in @($env:HOME,$env:APPDATA,$env:LOCALAPPDATA,$env:XDG_CONFIG_HOME)) { [void][System.IO.Directory]::CreateDirectory($dir) } $failed = $false foreach ($package in @('fileops','config','hotkeys','uiconfig','platform','main','version','installer','tui','log')) { $binary = Join-Path $QaRoot ($package + '.test.exe') & $binary '-test.v' '-test.count=1' '-test.timeout=4m' if ($LASTEXITCODE -ne 0) { $failed = $true } } if ($failed) { exit 1 } exit 0