@@ -23,6 +23,12 @@ $ConformanceTestsFolder = $args[1]
2323
2424$current_dir = Get-Location
2525
26+ # Resolve conformance tests folder to an absolute path so it can be used
27+ # from the build subfolder (where we'll Push-Location to next).
28+ if (-not [System.IO.Path ]::IsPathRooted($ConformanceTestsFolder )) {
29+ $ConformanceTestsFolder = Join-Path $current_dir $ConformanceTestsFolder
30+ }
31+
2632$GO_BUILD_SUBFOLDER = Join-Path ([System.IO.Path ]::GetTempPath()) " go_$ ( Split-Path $BuildFolder - Leaf) "
2733
2834if ($env: VERBOSE -eq " 1" ) {
6066 go get
6167
6268 # Move to conformance tests folder
63- Set-Location " $current_dir / $ ConformanceTestsFolder"
69+ Set-Location $ ConformanceTestsFolder
6470 if ($LASTEXITCODE -and $LASTEXITCODE -ne 0 ) {
65- Write-Host " Error: Conformance tests folder '$current_dir / $ ConformanceTestsFolder ' does not exist."
71+ Write-Host " Error: Conformance tests folder '$ConformanceTestsFolder ' does not exist."
6672 exit $UNRECOVERABLE_ERROR_EXIT_CODE
6773 }
6874
8389 # Temporarily allow stderr output without throwing (Go may write to stderr)
8490 # ForEach-Object converts ErrorRecord objects (from stderr) to plain strings to avoid verbose error formatting
8591 $ErrorActionPreference = ' Continue'
86- $output = go run " $current_dir / $ ConformanceTestsFolder/ conformance_tests.go" 2>&1 | ForEach-Object { if ($_ -is [System.Management.Automation.ErrorRecord ]) { $_.Exception.Message } else { $_ } } | Out-String
92+ $output = go run ( Join-Path $ ConformanceTestsFolder " conformance_tests.go" ) 2>&1 | ForEach-Object { if ($_ -is [System.Management.Automation.ErrorRecord ]) { $_.Exception.Message } else { $_ } } | Out-String
8793 $exit_code = $LASTEXITCODE
8894 $ErrorActionPreference = ' Stop'
8995
0 commit comments