Skip to content

Commit

Permalink
Merge pull request #160 from v1v/feature/support-windows-junit
Browse files Browse the repository at this point in the history
Support JUnit format for Windows tests
  • Loading branch information
slide committed Nov 3, 2020
2 parents 0221def + d7e99dc commit 7457861
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ pipeline {
powershell '& docker system prune --force --all'
}
}
post {
always {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: 'target/**/junit-results.xml')
}
}
}
stage('Linux') {
agent {
Expand Down
12 changes: 8 additions & 4 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,20 @@ if($target -eq "test") {
}

if(![System.String]::IsNullOrWhiteSpace($Build) -and $builds.ContainsKey($Build)) {
$env:FOLDER = $builds[$Build]['Folder']
$folder = $builds[$Build]['Folder']
$env:FOLDER = $folder
$env:VERSION = "$RemotingVersion-$BuildNumber"
Invoke-Pester -Path tests -EnableExit
New-Item -Path ".\target\$folder" -Type Directory
Invoke-Pester -Path tests -EnableExit -OutputFile ".\target\$folder\junit-results.xml" -OutputFormat JUnitXml
Remove-Item env:\FOLDER
Remove-Item env:\VERSION
} else {
foreach($b in $builds.Keys) {
$env:FOLDER = $builds[$b]['Folder']
$folder = $builds[$b]['Folder']
$env:FOLDER = $folder
$env:VERSION = "$RemotingVersion-$BuildNumber"
Invoke-Pester -Path tests -EnableExit
New-Item -Path ".\target\$folder" -Type Directory
Invoke-Pester -Path tests -EnableExit -OutputFile ".\target\$folder\junit-results.xml" -OutputFormat JUnitXml
Remove-Item env:\FOLDER
Remove-Item env:\VERSION
}
Expand Down

0 comments on commit 7457861

Please sign in to comment.