Skip to content

Commit

Permalink
Merge pull request #612 from zzambers/jvm-opts-no-variants
Browse files Browse the repository at this point in the history
Ignore variations when JVM_OPTIONS is set
  • Loading branch information
karianna authored Sep 19, 2024
2 parents ccdcb43 + 165d1b0 commit 4e1d9cc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/org/testKitGen/TestInfoParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,16 @@ public TestInfo parse() {
getElements(ti.getPlatformRequirementsList(), "platformRequirementsList", "platformRequirements", null, ti.getTestCaseName());

List<String> variations = new ArrayList<String>();
getElements(variations, "variations", "variation", null, ti.getTestCaseName());
List<Variation> listOfVars = new ArrayList<Variation>();
for (int i = 0; i < variations.size(); i++) {
String subTestName = ti.getTestCaseName() + "_" + i;
Variation var = parseVariation(subTestName, variations.get(i), ti.getPlatform(), ti.getPlatformRequirementsList());
listOfVars.add(var);
if (System.getenv("JVM_OPTIONS") == null) {
getElements(variations, "variations", "variation", null, ti.getTestCaseName());
for (int i = 0; i < variations.size(); i++) {
String subTestName = ti.getTestCaseName() + "_" + i;
Variation var = parseVariation(subTestName, variations.get(i), ti.getPlatform(), ti.getPlatformRequirementsList());
listOfVars.add(var);
}
} else {
System.out.println("Warning: JVM_OPTIONS specified, ignoring variations for " + testCaseName + ".");
}
if (variations.size() == 0) {
String subTestName = ti.getTestCaseName() + "_0";
Expand Down

0 comments on commit 4e1d9cc

Please sign in to comment.