Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dev-support/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def publishJUnitResults() {
boolean surefireReportsExist = findCmdExitCode == 0
if (surefireReportsExist) {
echo "XML files found under surefire-reports, running junit"
// The path should be relative to WORKSPACE for the junit.
SRC = "${SOURCEDIR}/**/target/surefire-reports/*.xml".replace("$WORKSPACE/","")
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a comment here mentioning that the path must be relative to the checkout dir?

Copy link
Member

Choose a reason for hiding this comment

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

This path used to have env.SOURCEDIR prefix before I made this change -

junit "${env.SOURCEDIR}/**/target/surefire-reports/*.xml"
. Wasn't env.SOURCEDIR resolving to the absolute path back then?

Copy link
Member Author

@ayushtkn ayushtkn Sep 9, 2021

Choose a reason for hiding this comment

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

I don't think so:

SOURCEDIR = 'src'

Copy link
Member Author

@ayushtkn ayushtkn Sep 9, 2021

Choose a reason for hiding this comment

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

Now:
https://github.com/apache/hadoop/blob/trunk/dev-support/Jenkinsfile#L259

                SOURCEDIR = "${WORKSPACE}/ubuntu-focal/src"

try {
junit "${SOURCEDIR}/**/target/surefire-reports/*.xml"
junit "${SRC}"
} catch(e) {
echo 'junit processing: ' + e.toString()
}
Expand Down