From cabbe36f9d807fd098e6b234dbc594b6d4e0c6c4 Mon Sep 17 00:00:00 2001 From: Lan Xia Date: Mon, 23 Sep 2024 16:09:06 -0400 Subject: [PATCH] Add FIPS_VARIATION_PROBLEM_LIST_FILE support related: backlog/issues/1529 and https://github.com/adoptium/aqa-tests/pull/5662 Signed-off-by: Lan Xia --- src/org/testKitGen/MkGen.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/org/testKitGen/MkGen.java b/src/org/testKitGen/MkGen.java index 15ed029c..c292f45f 100644 --- a/src/org/testKitGen/MkGen.java +++ b/src/org/testKitGen/MkGen.java @@ -96,7 +96,20 @@ private void writeSingleTest(List testsInPlaylist, TestInfo testInfo, Fi f.write(testTargetName + ": TEST_GROUP=" + testInfo.getLevelStr() + "\n"); f.write(testTargetName + ": TEST_ITERATIONS=" + testInfo.getIterations() + "\n"); f.write(testTargetName + ": AOT_ITERATIONS=" + testInfo.getAotIterations() + "\n"); - + + // Set special openjdk problem list for JVM options that contains FIPS profile + if (arg.getBuildList().contains("openjdk")) { + if (!var.getJvmOptions().isEmpty() && var.getJvmOptions().contains("-Dsemeru.customprofile=")) { + String[] splited = var.getJvmOptions().split("\\s+"); + for (int i=0; i < splited.length; i++) { + if (splited[i].contains("-Dsemeru.customprofile=")) { + String fipsProfile = splited[i].replace("-Dsemeru.customprofile=", "").trim(); + f.write(testTargetName + ": FIPS_VARIATION_PROBLEM_LIST_FILE=-exclude:$(Q)$(JTREG_JDK_TEST_DIR)/ProblemList-" + fipsProfile + ".txt$(Q)\n"); + } + } + } + } + f.write(testTargetName + ":\n"); f.write(indent + "@echo \"\" | tee -a $(Q)$(TESTOUTPUT)$(D)TestTargetResult$(Q);\n"); f.write(indent