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

Support jck custom rerun links #5106

Merged
merged 1 commit into from
Feb 29, 2024
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
21 changes: 19 additions & 2 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,9 @@ def addFailedTestsGrinderLink(paths=""){
def failedTestList = ""
def jdkFailedTestCaseList = ""
def hotspotFailedTestCaseList = ""
def jckRuntimeFailedTestCaseList = ""
def jckCompilerFailedTestCaseList = ""
def jckDevtoolsFailedTestCaseList = ""
List<String> buildPaths = paths.split(',')
for (def buildPath: buildPaths) {
def tapFiles = findFiles(glob: "${buildPath}**/*.tap")
Expand All @@ -1210,15 +1213,20 @@ def addFailedTestsGrinderLink(paths=""){
if (!testSet.getTestResult(i).getStatus().toString().equals("ok")) {
def failedtest = testSet.getTestResult(i).getDescription().trim().substring(2)
failedTestList += "${failedtest},"
if (env.BUILD_LIST.contains('openjdk')) {
if (env.BUILD_LIST.contains('openjdk') || env.BUILD_LIST.contains('jck')) {
def failedTestCasesInfo = testSet.getTestResult(i).getDiagnostic().get("output").toString()
if (failedTestCasesInfo.contains("Failed test cases:") && failedTestCasesInfo.contains("Test results:")) {
failedTestCasesInfo = failedTestCasesInfo.substring(failedTestCasesInfo.indexOf('TEST:'))
failedTestCasesInfo = failedTestCasesInfo.substring(0, failedTestCasesInfo.indexOf('Test results:'))
failedTestCasesInfo = failedTestCasesInfo.split("\\n").join(" ").replaceAll("TEST: ", "")
// Remove #id suffixed to the openjdk testcase name. Jtreg doesn't work with it.
if (failedtest.startsWith("jdk_")) {
jdkFailedTestCaseList += "${failedTestCasesInfo} "
} else if (failedtest.startsWith("jck-runtime") || failedtest.startsWith("jckruntime")) {
jckRuntimeFailedTestCaseList += "${failedTestCasesInfo} "
} else if (failedtest.startsWith("jck-compiler") || failedtest.startsWith("jckcompiler")) {
jckCompilerFailedTestCaseList += "${failedTestCasesInfo} "
} else if (failedtest.startsWith("jck-devtools") || failedtest.startsWith("jckdevtools")) {
jckDevtoolsFailedTestCaseList += "${failedTestCasesInfo} "
} else {
hotspotFailedTestCaseList += "${failedTestCasesInfo} "
}
Expand All @@ -1243,6 +1251,15 @@ def addFailedTestsGrinderLink(paths=""){
if (hotspotFailedTestCaseList) {
customizedTestCases['hotspot'] = "${hotspotFailedTestCaseList}"
}
if (jckRuntimeFailedTestCaseList) {
customizedTestCases['jckruntime'] = "${jckRuntimeFailedTestCaseList}"
}
if (jckCompilerFailedTestCaseList) {
customizedTestCases['jckcompiler'] = "${jckCompilerFailedTestCaseList}"
}
if (jckDevtoolsFailedTestCaseList) {
customizedTestCases['jckdevtools'] = "${jckDevtoolsFailedTestCaseList}"
}
customizedTestCases.each { target, testcases ->
def tempTestCases = testcases.substring(0, testcases.length() - 1)
tempTestCases = URLEncoder.encode(tempTestCases.toString(), "UTF-8")
Expand Down