Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect Launchable results from both Surefire and Failsafe #1922

Merged
merged 1 commit into from Mar 31, 2023

Conversation

basil
Copy link
Member

@basil basil commented Mar 31, 2023

I was rushing too quickly yesterday to bother with this, so fixing this leftover TODO today. I tested this successfully in:

https://ci.jenkins.io/job/Tools/job/bom/job/PR-1922/2/

@@ -15,7 +15,7 @@ def mavenEnv(Map params = [:], Closure body) {
body()
}
}
if (junit(testResults: '**/target/*-reports/TEST-*.xml').failCount > 0) {
if (junit(testResults: '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml').failCount > 0) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being more explicit that these are the only two supported test runners (for example, we do not support TestNG), and also matching the CloudBees-internal version of this code for consistency.

@@ -78,7 +78,7 @@ lines.each {line ->
sh 'mv megawar-$LINE.war megawar.war && bash pct.sh'
}
def launchableSession = readFile("launchable-session-${line}.txt").trim()
launchable("record tests --session ${launchableSession} maven './**/target/surefire-reports'") // TODO add failsafe reports
launchable("record tests --session ${launchableSession} maven './**/target/surefire-reports' './**/target/failsafe-reports'")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Launchable CLI Maven test recorder implicitly adds TEST-*.xml as a suffix, so it is not needed here. It does not support comma-separated Ant-style globbing, but it does support multiple source roots as space-separated positional arguments.

@basil basil marked this pull request as ready for review March 31, 2023 16:21
@MarkEWaite MarkEWaite merged commit 23e0938 into jenkinsci:master Mar 31, 2023
6 checks passed
@MarkEWaite MarkEWaite added internal chore Reduces future maintenance and removed internal labels Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Reduces future maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants