Dump Results on Error
@@ -123,9 +123,14 @@ function Run-Foreground-Executable($File, $Arguments) {
}
function Parse-Loopback-Results($Results) {
+ try {
# Unused variable on purpose
$m = $Results -match "Closed.*\(TX.*bytes @ (.*) kbps \|"
return $Matches[1]
+ } catch {
+ Write-Host "Error Processing Results:`n`n$Results"
+ throw
+ }
}
function Get-Latest-Test-Results($Platform, $Test) {
@@ -173,6 +178,7 @@ function Run-Loopback-Test() {
$allRunsResults = @()
+ try {
1..$Runs | ForEach-Object {
$clientOutput = Run-Foreground-Executable -File (Join-Path $Artifacts $QuicPing) -Arguments "-target:localhost -port:4433 -uni:1 -length:$Length"
$parsedRunResult = Parse-Loopback-Results -Results $clientOutput
@@ -186,6 +192,10 @@ function Run-Loopback-Test() {
}
$serverOutput = Stop-Background-Executable -Process $proc
+ } catch {
+ Stop-Background-Executable -Process $proc | Write-Host
+ throw
+ }
if ($PGO) {
# Merge server PGO counts.
Merge-PGO-Counts $ServerDir
