From 876e3214e720faef247403afc2c8d92ea340bbef Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Tue, 27 Feb 2024 17:11:04 -0500 Subject: [PATCH] Support jck custom rerun links Signed-off-by: Sophia Guo --- buildenv/jenkins/JenkinsfileBase | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 2cd670fd9a..712ec94b7d 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -1198,6 +1198,9 @@ def addFailedTestsGrinderLink(paths=""){ def failedTestList = "" def jdkFailedTestCaseList = "" def hotspotFailedTestCaseList = "" + def jckRuntimeFailedTestCaseList = "" + def jckCompilerFailedTestCaseList = "" + def jckDevtoolsFailedTestCaseList = "" List buildPaths = paths.split(',') for (def buildPath: buildPaths) { def tapFiles = findFiles(glob: "${buildPath}**/*.tap") @@ -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} " } @@ -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")