X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.tests.modelled%2Fsrc%2Forg%2Fsimantics%2Ftests%2Fmodelled%2Fjunit%2Fv2%2FModelledSTSRunner.java;h=31077a080d75d8e2c18352dab1a2dbdc264d70f4;hp=29628cec061e8b4ef5117da84d45947524cd3893;hb=2fb951a4a92e4a863a54c645bae18c2b9aa274bf;hpb=cd109cfc863adf6e9207cb77396b52f10d26a849 diff --git a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/v2/ModelledSTSRunner.java b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/v2/ModelledSTSRunner.java index 29628cec0..31077a080 100644 --- a/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/v2/ModelledSTSRunner.java +++ b/bundles/org.simantics.tests.modelled/src/org/simantics/tests/modelled/junit/v2/ModelledSTSRunner.java @@ -19,6 +19,7 @@ import org.simantics.tests.modelled.utils.STSSuiteTestCollector; public class ModelledSTSRunner extends ParentRunner { + public static final String INCLUSION_FILTER = "org.simantics.tests.modelled.singleTestIncludeFilter"; public static final String EXCLUSION_FILTER = "org.simantics.tests.modelled.excludeFilter"; private final List children; @@ -28,6 +29,8 @@ public class ModelledSTSRunner extends ParentRunner { try { initialize0(); Collection suites = STSSuiteTestCollector.collectTests(); + + // Filter exclusions String exclusionFilter = System.getProperty(EXCLUSION_FILTER); Collection filtered; if (exclusionFilter != null) { @@ -36,7 +39,18 @@ public class ModelledSTSRunner extends ParentRunner { } else { filtered = suites; } + // Filter inclusions +// String inclusionFilter = System.getProperty(INCLUSION_FILTER); +// Collection included; +// if (inclusionFilter != null) { +// String[] filters = inclusionFilter.split(","); +// included = filtered.stream().filter(s -> startsWithAny(s, filters)).collect(Collectors.toList()); +// } else { +// included = filtered; +// } + // Sort by priority +// List sorted = included.stream().sorted((o1, o2) -> Integer.compare(o1.getPriority(), o2.getPriority())).collect(Collectors.toList()); List sorted = filtered.stream().sorted((o1, o2) -> Integer.compare(o1.getPriority(), o2.getPriority())).collect(Collectors.toList()); @@ -96,11 +110,13 @@ public class ModelledSTSRunner extends ParentRunner { private void initialize0() throws Exception { AcornTests.newSimanticsWorkspace(null, null); + org.simantics.debug.browser.internal.Activator.getDefault().startDebugServer(); initialize(); } private void deinitialize0() throws Exception { deinitialize(); + org.simantics.debug.browser.internal.Activator.getDefault().stopDebugServer(); Simantics.shutdown(new NullProgressMonitor()); } }