From 87dbbb39c748a273938d9a6f403ebfc43d07e5a5 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Mon, 16 Sep 2024 15:58:11 +0200 Subject: [PATCH] Ignore variations when JVM_OPTIONS is set --- src/org/testKitGen/TestInfoParser.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/org/testKitGen/TestInfoParser.java b/src/org/testKitGen/TestInfoParser.java index 93eb652d..1f0fada9 100644 --- a/src/org/testKitGen/TestInfoParser.java +++ b/src/org/testKitGen/TestInfoParser.java @@ -147,12 +147,14 @@ public TestInfo parse() { getElements(ti.getPlatformRequirementsList(), "platformRequirementsList", "platformRequirements", null, ti.getTestCaseName()); List variations = new ArrayList(); - getElements(variations, "variations", "variation", null, ti.getTestCaseName()); List listOfVars = new ArrayList(); - 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); + } } if (variations.size() == 0) { String subTestName = ti.getTestCaseName() + "_0";