$ErrorActionPreference = "Stop" # Run in PowerShell from the repository root in a logged-in desktop session. $env:CGO_ENABLED = "0" New-Item -ItemType Directory -Force bin, test-results | Out-Null function Invoke-Go { & go @args; if ($LASTEXITCODE -ne 0) { throw "go command failed: $args" } } Invoke-Go build -buildvcs=false -mod=vendor -o bin/cfbrowser.exe ./cmd/cfbrowser Invoke-Go build -buildvcs=false -mod=vendor -o bin/cfbrowser-worker.exe ./cmd/cfbrowser-worker Invoke-Go test -buildvcs=false -mod=vendor ./internal/nativehost ./driver/native -count=1 -v -timeout=120s & ./bin/cfbrowser.exe --engine native --worker "$PWD/bin/cfbrowser-worker.exe" --diagnostics demo if ($LASTEXITCODE -ne 0) { throw "native demo failed" } $env:CFBROWSER_INTEGRATION = "1" $env:CFBROWSER_TEST_ENGINE = "native" $env:CFBROWSER_WORKER = "$PWD/bin/cfbrowser-worker.exe" Invoke-Go test -buildvcs=false -mod=vendor ./integration -count=1 -v -timeout=180s