Skip to content

Commit

Permalink
Use URLEncoder to encode custom_target (#5004)
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo authored Jan 26, 2024
1 parent 722e00a commit 3aec0ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,6 @@ def addFailedTestsGrinderLink(paths=""){
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.
failedTestCasesInfo = failedTestCasesInfo.replaceAll(/#id\d{1,}/, "")
if (failedtest.startsWith("jdk_")) {
jdkFailedTestCaseList += "${failedTestCasesInfo} "
} else {
Expand Down Expand Up @@ -1228,7 +1227,7 @@ def addFailedTestsGrinderLink(paths=""){
}
customizedTestCases.each { target, testcases ->
def tempTestCases = testcases.substring(0, testcases.length() - 1)
tempTestCases = tempTestCases.split(' ').toUnique().join('+')
tempTestCases = URLEncoder.encode(tempTestCases.toString(), "UTF-8")
def customURL = url.replace(env.FAILED_TEST_TARGET, "TARGET=${target}_custom")
customURL = customURL.replace(env.CUSTOM_TARGET_KEY_VALUE, "CUSTOM_TARGET=$tempTestCases")
echo "Rerun failed ${target} test cases in Grinder with ${target}_custom target: ${customURL}"
Expand Down

0 comments on commit 3aec0ea

Please sign in to comment.