File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 9393 xharness $group test $arguments -- output- directory= test_output
9494 if ($LASTEXITCODE -ne 0 )
9595 {
96+ $testResultsXml = ' ./test_output/TestResults.xml'
97+ if (Test-Path $testResultsXml )
98+ {
99+ $failedTests = Select-String - Path $testResultsXml - Pattern ' result="Fail"'
100+ if ($failedTests )
101+ {
102+ Write-Host " `n Failed tests:"
103+ $failedTests | ForEach-Object { Write-Host $_.Line }
104+ }
105+ }
96106 throw ' xharness run failed with non-zero exit code'
97107 }
98108 }
99109 finally
100110 {
101111 if ($CI )
102112 {
103- scripts/ parse- xunit2- xml.ps1 (Get-Item ./ test_output/* .xml).FullName | Out-File $env: GITHUB_STEP_SUMMARY
113+ $xmlFiles = Get-Item ./ test_output/* .xml - ErrorAction SilentlyContinue
114+ if ($xmlFiles )
115+ {
116+ scripts/ parse- xunit2- xml.ps1 $xmlFiles.FullName | Out-File $env: GITHUB_STEP_SUMMARY
117+ }
104118 }
105-
106119 }
107120 }
108121}
You can’t perform that action at this time.
0 commit comments