Skip to content

Commit a3ca979

Browse files
committed
Add FIPS_VARIATION_PROBLEM_LIST_FILE support
related: backlog/issues/1529 and adoptium/aqa-tests#5662 Signed-off-by: Lan Xia <[email protected]>
1 parent 4c764cb commit a3ca979

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/org/testKitGen/MkGen.java

+18-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,24 @@ private void writeSingleTest(List<String> testsInPlaylist, TestInfo testInfo, Fi
9696
f.write(testTargetName + ": TEST_GROUP=" + testInfo.getLevelStr() + "\n");
9797
f.write(testTargetName + ": TEST_ITERATIONS=" + testInfo.getIterations() + "\n");
9898
f.write(testTargetName + ": AOT_ITERATIONS=" + testInfo.getAotIterations() + "\n");
99-
99+
100+
// Set special openjdk problem list for JVM options that contains FIPS profile
101+
// This feature is ignored if TEST_FLAG contains FIPS
102+
if (arg.getBuildList().contains("openjdk")) {
103+
String jvmOpts = var.getJvmOptions();
104+
String customprofileStr = "-Dsemeru.customprofile=";
105+
if (!arg.getTestFlag().contains("FIPS") && !jvmOpts.isEmpty() && jvmOpts.contains(customprofileStr)) {
106+
String[] splited = jvmOpts.split("\\s+");
107+
for (int i = 0; i < splited.length; i++) {
108+
if (splited[i].contains(customprofileStr)) {
109+
String fipsProfile = splited[i].replace(customprofileStr, "").trim();
110+
f.write(testTargetName + ": FIPS_VARIATION_PROBLEM_LIST_FILE=-exclude:$(Q)$(JTREG_JDK_TEST_DIR)/ProblemList-" + fipsProfile + ".txt$(Q)\n");
111+
break;
112+
}
113+
}
114+
}
115+
}
116+
100117
f.write(testTargetName + ":\n");
101118
f.write(indent + "@echo \"\" | tee -a $(Q)$(TESTOUTPUT)$(D)TestTargetResult$(Q);\n");
102119
f.write(indent

0 commit comments

Comments
 (0)