From 1cb7faae953912caa69a40a5be543380eca1b21b Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Fri, 18 Mar 2016 20:49:09 -0400 Subject: [PATCH] Support -Dcdt.tests.dsf.gdb.versions=all for gdb tests Change-Id: I7b0921f3dfc41e75f2f32b270712c0eda7fc96a4 --- .../tests/dsf/gdb/framework/BaseParametrizedTestCase.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseParametrizedTestCase.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseParametrizedTestCase.java index df3a0de9572..6ffc04ccba6 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseParametrizedTestCase.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseParametrizedTestCase.java @@ -18,6 +18,7 @@ import java.util.List; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils; +import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.junit.Assume; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -45,9 +46,13 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase { } String gdbVersions = System.getProperty("cdt.tests.dsf.gdb.versions"); if (gdbVersions == null) { - // this has to be put in maven using -Dcdt.tests.dsf.gdb.versions or in junit config if you run locally + // this has to be put in maven using -Dcdt.tests.dsf.gdb.versions or + // in junit config if you run locally // like this -Dcdt.tests.dsf.gdb.versions=gdb.7.7,gdbserver.7.7 gdbVersions = "gdb,gdbserver"; + } else if (gdbVersions.equals("all")) { + gdbVersions = String.join(",", ITestConstants.ALL_KNOWN_VERSIONS); + gdbVersions += ",gdbserver." + String.join(",gdbserver.", ITestConstants.ALL_KNOWN_VERSIONS); } String[] versions = gdbVersions.split(","); return Arrays.asList(versions);