Skip to content

Commit

Permalink
Improve Console Output for Isolated Test Runs (microsoft#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Apr 2, 2020
1 parent adf6d93 commit 4d3e261
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .azure/scripts/run-gtest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,13 @@ function Wait-TestCase($TestCase) {
}

if ($IsolationMode -eq "Batch") {
if ($null -ne $stdout -and "" -ne $stdout) {
Write-Host $stdout
}
if ($null -ne $stderr -and "" -ne $stderr) {
Write-Host $stderr
}
if ($stdout) { Write-Host $stdout }
if ($stderr) { Write-Host $stderr }
} else {
if ($AnyTestFailed -or $ProcessCrashed) {
Log "$($TestCase.Name) failed"
Log "$($TestCase.Name) failed:"
if ($stdout) { Write-Host $stdout }
if ($stderr) { Write-Host $stderr }
} else {
Log "$($TestCase.Name) succeeded"
}
Expand All @@ -363,11 +361,11 @@ function Wait-TestCase($TestCase) {
}
}

if ($null -ne $stdout -and "" -ne $stdout) {
if ($stdout) {
$stdout > (Join-Path $TestCase.LogDir "stdout.txt")
}

if ($null -ne $stderr -and "" -ne $stderr) {
if ($stderr) {
$stderr > (Join-Path $TestCase.LogDir "stderr.txt")
}

Expand Down Expand Up @@ -526,4 +524,5 @@ try {
Remove-Item $LogDir -Recurse -Force | Out-Null
}
}
Write-Host ""
}

0 comments on commit 4d3e261

Please sign in to comment.