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

HADOOP-17904. Test Result Not Working In Jenkins Result. #3413

Merged
merged 2 commits into from
Sep 10, 2021
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.

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