Improve Console Output for Isolated Test Runs
@@ -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"
}
@@ -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")
}
@@ -526,4 +524,5 @@ try {
Remove-Item $LogDir -Recurse -Force | Out-Null
}
}
+ Write-Host ""
}
