Skip to content

Commit 877ee53

Browse files
authored
Report failed test jobs during a test run (#952)
1 parent e1770a2 commit 877ee53

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

make.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ function RunTestTasks($tasks) {
139139
$nextJob += 1
140140
}
141141

142+
$failedTests = @()
142143
while ($bgJobs.values.Count -gt 0) {
143144
$finished = Wait-Job -Any -Timeout 10 -Job @($bgJobs.keys)
144145

@@ -154,6 +155,7 @@ function RunTestTasks($tasks) {
154155
if ($finished.State -eq 'Failed') {
155156
Write-Host "$testName failed"
156157
$global:Result = $finished.ChildJobs[0].JobStateInfo.Reason.ErrorRecord.TargetObject
158+
$failedTests += $testName
157159
} else {
158160
Write-Host "$testName succeeded"
159161
}
@@ -167,6 +169,9 @@ function RunTestTasks($tasks) {
167169
}
168170
Write-Host "$($bgJobs.Count) jobs running: $(($bgJobs.values | ForEach-Object {$tasks[$_].name}) -Join ", ")"
169171
Write-Host "$($tasks.Count - $nextJob) jobs pending: $(($nextJob..$tasks.Count | ForEach-Object {$tasks[$_].name}) -Join ", ")"
172+
if ($failedTests) {
173+
Write-Host "$($failedTests.Count) jobs failed: $($failedTests -Join ", ")"
174+
}
170175
Write-Host
171176
}
172177
}

0 commit comments

Comments
 (0)