1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Flattening rest of gdb tests

this commit removes and merges rest of gdb tests in favor of using
parametrized tests

Change-Id: I352545c2ea3d76154c8079f8efa9aa5d4a3e0032
This commit is contained in:
Alena Laskavaia 2016-03-17 20:56:48 -04:00
parent e977bb4953
commit 528de33113
345 changed files with 1786 additions and 11537 deletions

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/> <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.cdt.tests.dsf.gdb/data&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/> <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.cdt.tests.dsf.gdb/data&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.cdt.tests.dsf.gdb/TestAppBuilder.xml"/> <listEntry value="/org.eclipse.cdt.tests.dsf.gdb"/>
</listAttribute> </listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/> <listEntry value="4"/>
</listAttribute> </listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>

View file

@ -25,15 +25,4 @@ Export-Package: org.eclipse.cdt.dsf.mi.service;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.framework;x-internal:=true, org.eclipse.cdt.tests.dsf.gdb.framework;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.launching;x-internal:=true, org.eclipse.cdt.tests.dsf.gdb.launching;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests;x-internal:=true, org.eclipse.cdt.tests.dsf.gdb.tests;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;x-internal:=true, org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;x-internal:=true
org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_7;x-internal:=true,
org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_8;x-internal:=true

View file

@ -36,7 +36,7 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
@Parameter public String parameter; @Parameter public String parameter;
// other fields // other fields
private String gdbVersionPostfix; // this is how we want to invoke it private String gdbVersionPostfix; // this is how we want to invoke it
private boolean remote; // this is if we want remote tests (gdbserver) protected boolean remote; // this is if we want remote tests (gdbserver)
protected static List<String> calculateVersions() { protected static List<String> calculateVersions() {
if (globalVersion != null) { if (globalVersion != null) {
@ -78,25 +78,43 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
globalVersion = null; globalVersion = null;
} }
public void assumeGdbVersionNot(String checkVersion) {
String gdbVersion = getGdbVersion();
// cannot be that version
boolean match = LaunchUtils.compareVersions(checkVersion, gdbVersion) == 0;
Assume.assumeTrue(
"Skipped because gdb " + gdbVersion + " does not support this feature",
!match);
}
public void assumeGdbVersionLowerThen(String checkVersion) { public void assumeGdbVersionLowerThen(String checkVersion) {
String gdbVersion = getGdbVersion(); String gdbVersion = getGdbVersion();
// otherwise it has to be strictly lower // has to be strictly lower
boolean isLower = LaunchUtils.compareVersions(checkVersion, gdbVersion) > 0; boolean isLower = LaunchUtils.compareVersions(checkVersion, gdbVersion) > 0;
Assume.assumeTrue( Assume.assumeTrue(
"Skipped because gdb " + gdbVersion + " does not support this feature: removed since " + checkVersion, "Skipped because gdb " + gdbVersion + " does not support this feature: removed since " + checkVersion,
isLower); isLower);
} }
protected String getGdbVersionParameter() {
if (gdbVersionPostfix == null) {
parseParameter();
if (gdbVersionPostfix == null) {
gdbVersionPostfix = globalVersion;
}
}
return gdbVersionPostfix;
}
protected String getGdbVersion() { protected String getGdbVersion() {
if (gdbVersionPostfix==null) gdbVersionPostfix=globalVersion; String gdbPath = getProgramPath("gdb", getGdbVersionParameter());
String gdbPath = getProgramPath("gdb", gdbVersionPostfix);
return getGdbVersion(gdbPath); return getGdbVersion(gdbPath);
} }
public void assumeGdbVersionAtLeast(String checkVersion) { public void assumeGdbVersionAtLeast(String checkVersion) {
String gdbVersion = getGdbVersion(); String gdbVersion = getGdbVersion();
if (gdbVersion == GDB_NOT_FOUND) { if (gdbVersion == GDB_NOT_FOUND) {
String gdbPath = getProgramPath("gdb", gdbVersionPostfix); String gdbPath = getProgramPath("gdb", getGdbVersionParameter());
// fail assumption // fail assumption
Assume.assumeFalse("GDB cannot be run " + gdbPath, true); Assume.assumeFalse("GDB cannot be run " + gdbPath, true);
} }
@ -117,20 +135,13 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
@Override @Override
protected void initializeLaunchAttributes() { protected void initializeLaunchAttributes() {
parseParameter(); String gdbPath = getProgramPath("gdb", getGdbVersionParameter());
if (gdbVersionPostfix == null) { String gdbServerPath = getProgramPath("gdbserver", gdbVersionPostfix);
// we are not running parametrized assumeGdbVersionAtLeast(gdbVersionPostfix);
setGdbVersion(); // old way setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, gdbPath);
gdbVersionPostfix = globalVersion; setLaunchAttribute(ATTR_DEBUG_SERVER_NAME, gdbServerPath);
} else { if (remote)
String gdbPath = getProgramPath("gdb", gdbVersionPostfix); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
String gdbServerPath = getProgramPath("gdbserver", gdbVersionPostfix); IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
assumeGdbVersionAtLeast(gdbVersionPostfix);
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, gdbPath);
setLaunchAttribute(ATTR_DEBUG_SERVER_NAME, gdbServerPath);
if (remote)
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
}
} }
} }

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2016 QNX Software System and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Elena Laskavaia (QNX Software System) - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.junit.runner.RunWith;
import org.junit.runners.AllTests;
import junit.framework.JUnit4TestAdapter;
import junit.framework.TestSuite;
/**
* This suite runs remote tests for all gdb versions (it will ignore setting of "cdt.tests.dsf.gdb.versions", if you
* want run tests controlled by this var run {@link AutomatedSuite}
*/
@RunWith(AllTests.class)
public class AllRemoteSuites {
public static junit.framework.Test suite() {
String gdbVersions = "gdbserver."+String.join(",gdbserver.", ITestConstants.ALL_KNOWN_VERSIONS);
System.setProperty("cdt.tests.dsf.gdb.versions", gdbVersions);
TestSuite suite = new TestSuite();
suite.addTest(new JUnit4TestAdapter(SuiteGdb.class));
return suite;
}
}

View file

@ -10,50 +10,23 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests; package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.Suite_7_1;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_10.Suite_7_10;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.Suite_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.Suite_7_2;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.Suite_7_3;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.Suite_7_4;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.Suite_7_5;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.Suite_7_6;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_7.Suite_7_7;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_8.Suite_7_8;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_9.Suite_7_9;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Suite; import org.junit.runners.AllTests;
import junit.framework.JUnit4TestAdapter;
import junit.framework.TestSuite;
/** /**
* This class is meant to be empty. It enables us to define * This suite runs tests for all gdb versions (it will ignore setting of "cdt.tests.dsf.gdb.versions", if you
* the annotations which list all the different JUnit suites we * want run tests controlled by this var run {@link AutomatedSuite}
* want to run. When creating a new suite class, it should be
* added to the list below.
*
* This suite runs all the other suites.
*/ */
@RunWith(AllTests.class)
@RunWith(Suite.class) public class AllSuites {
@Suite.SuiteClasses({ public static junit.framework.Test suite() {
Suite_7_11.class, String gdbVersions = String.join(",", ITestConstants.ALL_KNOWN_VERSIONS);
Suite_7_10.class, System.setProperty("cdt.tests.dsf.gdb.versions", gdbVersions);
Suite_7_9.class, TestSuite suite = new TestSuite();
Suite_7_8.class, suite.addTest(new JUnit4TestAdapter(SuiteGdb.class));
Suite_7_7.class, return suite;
Suite_7_6.class, }
Suite_7_5.class, }
Suite_7_4.class,
Suite_7_3.class,
Suite_7_2.class,
Suite_7_1.class,
// The below test suites have failures
// Don't run them automatically so that we
// can get passing tests in Hudson
// Suite_7_0.class,
// Suite_6_8.class,
// Suite_6_7.class,
// Suite_6_6.class,
/* Add your suite class here */
})
public class AllSuites {}

View file

@ -1,59 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.Suite_Remote_7_1;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_10.Suite_Remote_7_10;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.Suite_Remote_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.Suite_Remote_7_2;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.Suite_Remote_7_3;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.Suite_Remote_7_4;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.Suite_Remote_7_5;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.Suite_Remote_7_6;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_7.Suite_Remote_7_7;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_8.Suite_Remote_7_8;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_9.Suite_Remote_7_9;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit suites we
* want to run. When creating a new suite class, it should be
* added to the list below.
*
* This suite runs all the other suites.
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
Suite_Remote_7_11.class,
Suite_Remote_7_10.class,
Suite_Remote_7_9.class,
Suite_Remote_7_8.class,
Suite_Remote_7_7.class,
Suite_Remote_7_6.class,
Suite_Remote_7_5.class,
Suite_Remote_7_4.class,
Suite_Remote_7_3.class,
Suite_Remote_7_2.class,
Suite_Remote_7_1.class,
// The below test suites have failures
// Don't run them automatically so that we
// can get passing tests in Hudson
// Suite_Remote_7_0.class,
// Suite_Remote_6_8.class,
// Suite_Remote_6_7.class,
// Suite_Remote_6_6.class,
/* Add your suite class here */
})
public class AllSuitesRemote {}

View file

@ -16,11 +16,14 @@ import org.junit.runners.Suite;
/** /**
* This suite runs all suites that are part of the tests automatically run with * This suite runs all suites that are part of the tests automatically run with
* each CDT build. * each CDT build.
*
*
* This suite runs tests for gdb versions specified by java system variable "cdt.tests.dsf.gdb.versions", i.e.
* -Dcdt.tests.dsf.gdb.versions=gdb.7.7,gdbserver.7.7,gdb.7.11
*/ */
@RunWith(Suite.class) @RunWith(Suite.class)
@Suite.SuiteClasses({ @Suite.SuiteClasses({
SuiteGdb.class, SuiteGdb.class,
SuiteGdbVersioned.class,
}) })
public class AutomatedSuite { public class AutomatedSuite {
} }

View file

@ -24,8 +24,7 @@ import org.eclipse.cdt.dsf.mi.service.command.commands.MITargetSelect;
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
@ -36,9 +35,10 @@ import org.junit.Assert;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class CommandTimeoutTest extends BaseTestCase { public class CommandTimeoutTest extends BaseParametrizedTestCase {
private static boolean fgTimeoutEnabled = false; private static boolean fgTimeoutEnabled = false;
private static int fgTimeout = IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT; private static int fgTimeout = IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT;

View file

@ -39,8 +39,7 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64; import org.eclipse.cdt.utils.Addr64;
@ -58,14 +57,15 @@ import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* This test case verifies whether breakpoints or watchpoints set from GDB console * This test case verifies whether breakpoints or watchpoints set from GDB console
* are properly synchronized with platform breakpoints. * are properly synchronized with platform breakpoints.
*/ */
@SuppressWarnings( "restriction" ) @SuppressWarnings( "restriction" )
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class GDBConsoleBreakpointsTest extends BaseTestCase { public class GDBConsoleBreakpointsTest extends BaseParametrizedTestCase {
final static protected String SOURCE_NAME = "GDBMIGenericTestApp.cc"; final static protected String SOURCE_NAME = "GDBMIGenericTestApp.cc";
@ -128,16 +128,16 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase {
@Override @Override
@After @After
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
Runnable runnable = new Runnable() { if (fSession != null) {
@Override fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBConsoleBreakpointsTest.this))
public void run() { .get();
fSession.removeServiceEventListener(GDBConsoleBreakpointsTest.this); }
}
};
fSession.getExecutor().submit(runnable).get();
fBreakpointEvents.clear(); fBreakpointEvents.clear();
fServicesTracker.dispose(); if (fServicesTracker != null) {
fServicesTracker = null; fServicesTracker.dispose();
fServicesTracker = null;
}
super.doAfterTest(); super.doAfterTest();

View file

@ -9,7 +9,7 @@
* Marc Khouzam (Ericsson) - Initial API and implementation * Marc Khouzam (Ericsson) - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6; package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
@ -42,22 +42,21 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.debug.core.model.MemoryByte; import org.eclipse.debug.core.model.MemoryByte;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* This test case verifies that different commands issued from the * This test case verifies that different commands issued from the
* GDB console cause proper updating within the CDT views. * GDB console cause proper updating within the CDT views.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase { public class GDBConsoleSynchronizingTest extends BaseParametrizedTestCase {
final static private String EXEC_NAME = "ConsoleSyncTestApp.exe"; final static private String EXEC_NAME = "ConsoleSyncTestApp.exe";
final static private int DEFAULT_TIMEOUT = 1000; final static private int DEFAULT_TIMEOUT = 1000;
@ -75,20 +74,15 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
private List<IDMEvent<? extends IDMContext>> fEventsReceived = new ArrayList<IDMEvent<? extends IDMContext>>(); private List<IDMEvent<? extends IDMContext>> fEventsReceived = new ArrayList<IDMEvent<? extends IDMContext>>();
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_6);
}
@Override @Override
protected void setLaunchAttributes() { protected void setLaunchAttributes() {
super.setLaunchAttributes(); super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
} }
@Override @Override
public void doBeforeTest() throws Exception { public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.6");
super.doBeforeTest(); super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
@ -111,7 +105,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
Assert.assertTrue(fRunControl != null); Assert.assertTrue(fRunControl != null);
// Register to breakpoint events // Register to breakpoint events
fSession.addServiceEventListener(GDBConsoleSynchronizingTest_7_6.this, null); fSession.addServiceEventListener(GDBConsoleSynchronizingTest.this, null);
} }
}; };
fSession.getExecutor().submit(runnable).get(); fSession.getExecutor().submit(runnable).get();
@ -119,15 +113,12 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
@Override @Override
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
Runnable runnable = new Runnable() { if (fSession != null) {
@Override fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBConsoleSynchronizingTest.this))
public void run() { .get();
fSession.removeServiceEventListener(GDBConsoleSynchronizingTest_7_6.this); }
}
};
fSession.getExecutor().submit(runnable).get();
fEventsReceived.clear(); fEventsReceived.clear();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
super.doAfterTest(); super.doAfterTest();
} }

View file

@ -49,16 +49,16 @@ import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.mi.service.command.output.MIDataListRegisterNamesInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIDataListRegisterNamesInfo;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class GDBPatternMatchingExpressionsTest extends BaseTestCase { public class GDBPatternMatchingExpressionsTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "PatternMatchingExpressionsTestApp.exe"; private static final String EXEC_NAME = "PatternMatchingExpressionsTestApp.exe";
private DsfSession fSession; private DsfSession fSession;
@ -97,7 +97,10 @@ public class GDBPatternMatchingExpressionsTest extends BaseTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fExpService = null; fExpService = null;
fServicesTracker.dispose(); if (fServicesTracker != null) {
fServicesTracker.dispose();
fServicesTracker = null;
}
} }
//************************************************************************************** //**************************************************************************************

View file

@ -11,8 +11,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests; package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -29,16 +28,16 @@ import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
import org.eclipse.cdt.dsf.mi.service.IMIProcesses; import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class GDBProcessesTest extends BaseTestCase { public class GDBProcessesTest extends BaseParametrizedTestCase {
/* /*
* Name of the executable * Name of the executable
*/ */
@ -72,7 +71,7 @@ public class GDBProcessesTest extends BaseTestCase {
super.doAfterTest(); super.doAfterTest();
fProcService = null; fProcService = null;
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
} }
@Override @Override
@ -114,7 +113,7 @@ public class GDBProcessesTest extends BaseTestCase {
* This defaults to false, and is overridden for specific versions of gdb. * This defaults to false, and is overridden for specific versions of gdb.
*/ */
protected boolean threadNamesSupported() { protected boolean threadNamesSupported() {
return false; return !runningOnWindows() && !isRemoteSession();
} }
/* /*
@ -122,6 +121,7 @@ public class GDBProcessesTest extends BaseTestCase {
*/ */
@Test @Test
public void getThreadData() throws Throwable { public void getThreadData() throws Throwable {
assumeGdbVersionAtLeast("7.3");
// Start the threads one by one to make sure they are discovered by gdb in the right // Start the threads one by one to make sure they are discovered by gdb in the right
// order. // order.
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {

View file

@ -8,7 +8,7 @@
* Contributors: * Contributors:
* Ericsson - Initial implementation of Test cases * Ericsson - Initial implementation of Test cases
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@ -35,28 +35,25 @@ import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.CollectAction; import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.CollectAction;
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.EvaluateAction; import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.EvaluateAction;
import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.TracepointActionManager; import org.eclipse.cdt.dsf.gdb.internal.tracepointactions.TracepointActionManager;
import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils;
import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData; import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData;
import org.eclipse.cdt.dsf.mi.service.MIBreakpoints; import org.eclipse.cdt.dsf.mi.service.MIBreakpoints;
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.core.runtime.Platform;
import org.junit.Assume;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase { public class GDBRemoteTracepointsTest extends BaseParametrizedTestCase {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
protected DsfSession fSession; protected DsfSession fSession;
protected DsfServicesTracker fServicesTracker; protected DsfServicesTracker fServicesTracker;
protected IBreakpoints fBreakpointService; protected IBreakpoints fBreakpointService;
@ -153,6 +150,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@Override @Override
public void doBeforeTest() throws Exception { public void doBeforeTest() throws Exception {
Assume.assumeTrue("Skipping non-remote", remote);
super.doBeforeTest(); super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
@ -164,7 +162,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
fBreakpointService = fServicesTracker.getService(IBreakpoints.class); fBreakpointService = fServicesTracker.getService(IBreakpoints.class);
// fTraceService = fServicesTracker.getService(ITraceControl.class); // fTraceService = fServicesTracker.getService(ITraceControl.class);
fSession.addServiceEventListener(GDBRemoteTracepointsTest_7_0.this, null); fSession.addServiceEventListener(GDBRemoteTracepointsTest.this, null);
// Create a large array to make sure we don't run out // Create a large array to make sure we don't run out
fTracepoints = new IBreakpointDMContext[100]; fTracepoints = new IBreakpointDMContext[100];
@ -200,19 +198,14 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@Override @Override
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
if (fSession != null)
Runnable runnable = new Runnable() { fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBRemoteTracepointsTest.this))
@Override .get();
public void run() {
fSession.removeServiceEventListener(GDBRemoteTracepointsTest_7_0.this);
}
};
fSession.getExecutor().submit(runnable).get();
fBreakpointService = null; fBreakpointService = null;
fServicesTracker.dispose(); if (fServicesTracker != null)
fServicesTracker.dispose();
} }
// ********************************************************************* // *********************************************************************
// Below are utility methods. // Below are utility methods.
// ********************************************************************* // *********************************************************************
@ -290,13 +283,6 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
} }
} }
protected boolean acceptsFastTpOnFourBytes() {
// Starting with GDB 7.4, fast tracepoints can be set
// on 4-byte instructions on a 32bit machine. Before that, or on 64bits,
// it was on 5-bytes or more.
return false;
}
// ********************************************************************* // *********************************************************************
// Breakpoint service methods (to use with tracepoints). // Breakpoint service methods (to use with tracepoints).
// ********************************************************************* // *********************************************************************
@ -1146,5 +1132,59 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// } // }
// //
protected boolean acceptsFastTpOnFourBytes() {
String gdbVersion = getGdbVersion();
boolean isLower = LaunchUtils.compareVersions("7.4", gdbVersion) > 0;
if (isLower) return false;
// With GDB 7.4, fast tracepoints only need an
// instruction of 4 bytes or more when on a 32bit architecture, instead of 5.
if (Platform.getOS().equals(Platform.ARCH_X86)) {
return true;
}
return false;
}
/**
* This test sets the different types of tracepoints and then sets some string collection actions
*/
@Test
public void tracepointActionsWithCollectStrings() throws Throwable {
assumeGdbVersionAtLeast("7.4");
TracepointActionManager tracepointActionMgr = TracepointActionManager.getInstance();
CollectAction action1 = new CollectAction();
action1.setCollectString("/s $locals");
action1.setName("Collect string locals");
tracepointActionMgr.addAction(action1);
CollectAction action2 = new CollectAction();
action2.setCollectString("/s3 $locals, $reg");
action2.setName("Collect string locals, reg");
tracepointActionMgr.addAction(action2);
createTracepoints();
Map<String, Object> delta = new HashMap<String, Object>();
// Set conditions for all tracepoints
delta.put(MIBreakpoints.COMMANDS, action1.getName());
updateBreakpoint(fTracepoints[0], delta);
delta.put(MIBreakpoints.COMMANDS, action2.getName());
updateBreakpoint(fTracepoints[1], delta);
delta.put(MIBreakpoints.COMMANDS, action1.getName());
updateBreakpoint(fTracepoints[2], delta);
delta.put(MIBreakpoints.COMMANDS, action1.getName());
updateBreakpoint(fTracepoints[3], delta);
delta.put(MIBreakpoints.COMMANDS, action2.getName());
updateBreakpoint(fTracepoints[4], delta);
TracepointData[] dataArray = new TracepointData[] {
new TracepointData(LINE_NUMBER_1_BYTE_INSTR, NO_CONDITION, 0, true, action1.toString(), false),
new TracepointData(LINE_NUMBER_2_BYTE_INSTR, NO_CONDITION, 0, true, action2.toString(), false),
new TracepointData(LINE_NUMBER_3_BYTE_INSTR, NO_CONDITION, 0, true, action1.toString(), false),
new TracepointData(LINE_NUMBER_4_BYTE_INSTR, NO_CONDITION, 0, true, action1.toString(), acceptsFastTpOnFourBytes()),
new TracepointData(LINE_NUMBER_5_BYTE_INSTR, NO_CONDITION, 0, true, action2.toString(), true),
};
checkTracepoints(dataArray);
}
} }

View file

@ -14,7 +14,6 @@ package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
public interface ITestConstants { public interface ITestConstants {
public static final String SUFFIX_GDB_6_6 = "6.6"; public static final String SUFFIX_GDB_6_6 = "6.6";
public static final String SUFFIX_GDB_6_7 = "6.7"; public static final String SUFFIX_GDB_6_7 = "6.7";
public static final String SUFFIX_GDB_6_8 = "6.8"; public static final String SUFFIX_GDB_6_8 = "6.8";
@ -30,7 +29,24 @@ public interface ITestConstants {
public static final String SUFFIX_GDB_7_9 = "7.9"; public static final String SUFFIX_GDB_7_9 = "7.9";
public static final String SUFFIX_GDB_7_10 = "7.10"; public static final String SUFFIX_GDB_7_10 = "7.10";
public static final String SUFFIX_GDB_7_11 = "7.11"; public static final String SUFFIX_GDB_7_11 = "7.11";
public static String[] ALL_KNOWN_VERSIONS = new String[] {
ITestConstants.SUFFIX_GDB_6_6,
ITestConstants.SUFFIX_GDB_6_7,
ITestConstants.SUFFIX_GDB_6_8,
ITestConstants.SUFFIX_GDB_7_0,
ITestConstants.SUFFIX_GDB_7_1,
ITestConstants.SUFFIX_GDB_7_2,
ITestConstants.SUFFIX_GDB_7_3,
ITestConstants.SUFFIX_GDB_7_4,
ITestConstants.SUFFIX_GDB_7_5,
ITestConstants.SUFFIX_GDB_7_6,
ITestConstants.SUFFIX_GDB_7_7,
ITestConstants.SUFFIX_GDB_7_8,
ITestConstants.SUFFIX_GDB_7_9,
ITestConstants.SUFFIX_GDB_7_10,
ITestConstants.SUFFIX_GDB_7_11,
// add versions here
};
// Attribute that allows a test to request not to start gdbserver even if the session is a remote one // Attribute that allows a test to request not to start gdbserver even if the session is a remote one
public static final String LAUNCH_GDB_SERVER = TestsPlugin.PLUGIN_ID + ".launchGdbServer"; public static final String LAUNCH_GDB_SERVER = TestsPlugin.PLUGIN_ID + ".launchGdbServer";
} }

View file

@ -12,12 +12,10 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests; package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.*;
import static org.junit.Assert.fail;
import java.io.File; import java.io.File;
import java.util.HashMap; import java.util.HashMap;
@ -30,11 +28,16 @@ import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.model.ICBreakpointType; import org.eclipse.cdt.debug.core.model.ICBreakpointType;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.Query; import org.eclipse.cdt.dsf.concurrent.Query;
import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.IExpressions; import org.eclipse.cdt.dsf.debug.service.IExpressions;
import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext; import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext;
import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMData; import org.eclipse.cdt.dsf.debug.service.IFormattedValues.FormattedValueDMData;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType; import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent; import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.gdb.IGdbDebugConstants; import org.eclipse.cdt.dsf.gdb.IGdbDebugConstants;
@ -42,11 +45,15 @@ import org.eclipse.cdt.dsf.gdb.launching.InferiorRuntimeProcess;
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl; import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
import org.eclipse.cdt.dsf.mi.service.MIExpressions; import org.eclipse.cdt.dsf.mi.service.MIExpressions;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.mi.service.command.output.CLITraceInfo;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakListInfo;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakpoint;
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase; import org.eclipse.cdt.tests.dsf.gdb.framework.Intermittent;
import org.eclipse.cdt.tests.dsf.gdb.framework.IntermittentRule;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
@ -55,11 +62,15 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IProcess;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class LaunchConfigurationAndRestartTest extends BaseTestCase { @Intermittent(repetition = 3)
public class LaunchConfigurationAndRestartTest extends BaseParametrizedTestCase {
public @Rule IntermittentRule intermittentRule = new IntermittentRule();
protected static final String EXEC_NAME = "LaunchConfigurationAndRestartTestApp.exe"; protected static final String EXEC_NAME = "LaunchConfigurationAndRestartTestApp.exe";
protected static final int FIRST_LINE_IN_MAIN = 27; protected static final int FIRST_LINE_IN_MAIN = 27;
@ -115,7 +126,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
// Restart the program if we are testing such a case // Restart the program if we are testing such a case
if (fRestart) { if (fRestart) {
synchronized (this) { synchronized (this) {
wait(1000); wait(1000); // XXX: horrible hack, what are we waiting for?
} }
fRestart = false; fRestart = false;
SyncUtil.restart(getGDBLaunch()); SyncUtil.restart(getGDBLaunch());
@ -215,8 +226,9 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
* 17^done * 17^done
*/ */
@Test @Test
@Ignore
public void testSourceGdbInit() throws Throwable { public void testSourceGdbInit() throws Throwable {
assumeGdbVersionAtLeast("7.2");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
"data/launch/src/launchConfigTestGdbinit"); "data/launch/src/launchConfigTestGdbinit");
doLaunch(); doLaunch();
@ -274,8 +286,8 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
* Repeat the test testSourceGdbInit, but after a restart. * Repeat the test testSourceGdbInit, but after a restart.
*/ */
@Test @Test
@Ignore
public void testSourceGdbInitRestart() throws Throwable { public void testSourceGdbInitRestart() throws Throwable {
assumeGdbVersionAtLeast("7.2");
fRestart = true; fRestart = true;
testSourceGdbInit(); testSourceGdbInit();
} }
@ -743,6 +755,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
*/ */
@Test @Test
public void testExitCodeSet() throws Throwable { public void testExitCodeSet() throws Throwable {
assumeGdbVersionAtLeast("7.3");
doLaunch(); doLaunch();
ServiceEventWaitor<ICommandControlShutdownDMEvent> shutdownEventWaitor = new ServiceEventWaitor<ICommandControlShutdownDMEvent>( ServiceEventWaitor<ICommandControlShutdownDMEvent> shutdownEventWaitor = new ServiceEventWaitor<ICommandControlShutdownDMEvent>(
@ -779,4 +792,305 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
} }
assert false; assert false;
} }
/**
* This test will confirm that we have turned on "pending breakpoints"
* The pending breakpoint setting only affects CLI commands so we have
* to test with one. We don't have classes to set breakpoints using CLI,
* but we do for tracepoints, which is the same for this test.
*
* The pending breakpoint feature only works with tracepoints starting
* with GDB 7.0.
*
* We could run this test before 7.0 but we would have to use a breakpoint
* set using CLI commands.
*/
@Test
public void testPendingBreakpointSetting() throws Throwable {
assumeGdbVersionAtLeast("7.0");
doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
final IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(stoppedEvent.getDMContext(),
IBreakpointsTargetDMContext.class);
Query<MIBreakListInfo> query = new Query<MIBreakListInfo>() {
@Override
protected void execute(final DataRequestMonitor<MIBreakListInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createCLITrace(bpTargetDmc, "invalid", ""),
new ImmediateDataRequestMonitor<CLITraceInfo>(rm) {
@Override
protected void handleSuccess() {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIBreakList(bpTargetDmc),
new ImmediateDataRequestMonitor<MIBreakListInfo>(rm) {
@Override
protected void handleSuccess() {
rm.setData(getData());
rm.done();
}
});
}
});
}
};
try {
fExpService.getExecutor().execute(query);
MIBreakListInfo value = query.get(500, TimeUnit.MILLISECONDS);
MIBreakpoint[] bps = value.getMIBreakpoints();
assertTrue("Expected 1 breakpoint but got " + bps.length,
bps.length == 1);
assertTrue("Expending a <PENDING> breakpoint but got one at " + bps[0].getAddress(),
bps[0].getAddress().equals("<PENDING>"));
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
}
/**
* This test will tell the launch to "stop on main" at method main() with reverse
* debugging enabled. We will verify that the launch stops at main() and that
* reverse debugging is enabled.
*
* In this test, the execution crosses getenv() while recording is enabled. gdb 7.0
* and 7.1 have trouble with that. We disable the test for those, and enable it for
* 7.2 and upwards.
*/
@Test
public void testStopAtMainWithReverse() throws Throwable {
assumeGdbVersionAtLeast("7.2");
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// Make sure we stopped at the first line of main
assertTrue("Expected to stop at main:" + FIRST_LINE_IN_MAIN + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN);
// Step a couple of times and check where we are
final int NUM_STEPS = 3;
stoppedEvent = SyncUtil.step(NUM_STEPS, StepType.STEP_OVER);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN+NUM_STEPS) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN+NUM_STEPS);
// Now step backwards to make sure reverse was enabled
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
new ServiceEventWaitor<MIStoppedEvent>(
fSession,
MIStoppedEvent.class);
final int REVERSE_NUM_STEPS = 2;
final IExecutionDMContext execDmc = stoppedEvent.getDMContext();
Query<MIInfo> query = new Query<MIInfo>() {
@Override
protected void execute(DataRequestMonitor<MIInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIExecReverseNext(execDmc, REVERSE_NUM_STEPS),
rm);
}
};
try {
fGdbControl.getExecutor().execute(query);
query.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
stoppedEvent = eventWaitor.waitForEvent(1000);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN+NUM_STEPS-REVERSE_NUM_STEPS) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN+NUM_STEPS-REVERSE_NUM_STEPS);
}
/**
* Repeat the test testStopAtMainWithReverse, but after a restart.
*/
@Test
public void testStopAtMainWithReverseRestart() throws Throwable {
assumeGdbVersionAtLeast("7.2");
fRestart = true;
testStopAtMainWithReverse();
}
/**
* This test will tell the launch to "stop on main" at method stopAtOther(),
* with reverse debugging enabled. We will then verify that the launch is properly
* stopped at stopAtOther() and that it can go backwards until main() (this will
* confirm that reverse debugging was enabled at the very start).
*
* In this test, the execution crosses getenv() while recording is enabled. gdb 7.0
* and 7.1 have trouble with that. We disable the test for those, and enable it for
* 7.2 and upwards.
*/
@Test
public void testStopAtOtherWithReverse() throws Throwable {
assumeGdbVersionAtLeast("7.2");
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// The initial stopped event is not the last stopped event.
// With reverse we have to stop the program, turn on reverse and start it again.
// Let's get the frame where we really are stopped right now.
final IExecutionDMContext execDmc = stoppedEvent.getDMContext();
IFrameDMData frame = SyncUtil.getFrameData(execDmc, 0);
// Make sure we stopped at the first line of main
assertTrue("Expected to stop at stopAtOther but got " +
frame.getFunction(),
frame.getFunction().equals("stopAtOther"));
// Now step backwards all the way to the start to make sure reverse was enabled from the very start
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
new ServiceEventWaitor<MIStoppedEvent>(
fSession,
MIStoppedEvent.class);
final int REVERSE_NUM_STEPS = 3;
Query<MIInfo> query2 = new Query<MIInfo>() {
@Override
protected void execute(DataRequestMonitor<MIInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIExecReverseNext(execDmc, REVERSE_NUM_STEPS),
rm);
}
};
try {
fGdbControl.getExecutor().execute(query2);
query2.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
stoppedEvent = eventWaitor.waitForEvent(1000);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN);
}
/**
* Repeat the test testStopAtOtherWithReverse, but after a restart.
*/
@Test
@Ignore("Fails. Investigate what it needs to wait for.")
public void testStopAtOtherWithReverseRestart() throws Throwable {
assumeGdbVersionAtLeast("7.2");
fRestart = true;
testStopAtOtherWithReverse();
}
/**
* This test will set a breakpoint at the last line of the program and will tell
* the launch to NOT "stop on main", with reverse debugging enabled. We will
* verify that the first stop is at the last line of the program but that the program
* can run backwards until main() (this will confirm that reverse debugging was
* enabled at the very start).
*/
@Test
@Ignore("TODO: this is not working because it does not insert the breakpoint propertly")
public void testNoStopAtMainWithReverse() throws Throwable {
assumeGdbVersionAtLeast("7.2");
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
// Set this one as well to make sure it gets ignored
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// see testNoStopAtMain()
doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// The initial stopped event is not the last stopped event.
// With reverse we have to stop the program, turn on reverse and start it again.
// Let's get the frame where we really are stopped right now.
final IExecutionDMContext execDmc = stoppedEvent.getDMContext();
IFrameDMData frame = SyncUtil.getFrameData(execDmc, 0);
// Make sure we stopped at the first line of main
assertTrue("Expected to stop at main:" + LAST_LINE_IN_MAIN + " but got " +
frame.getFunction() + ":" +
Integer.toString(frame.getLine()),
frame.getFunction().equals("main") &&
frame.getLine() == LAST_LINE_IN_MAIN);
// Now step backwards all the way to the start to make sure reverse was enabled from the very start
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
new ServiceEventWaitor<MIStoppedEvent>(
fSession,
MIStoppedEvent.class);
final int REVERSE_NUM_STEPS = 3;
Query<MIInfo> query2 = new Query<MIInfo>() {
@Override
protected void execute(DataRequestMonitor<MIInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIExecReverseNext(execDmc, REVERSE_NUM_STEPS),
rm);
}
};
try {
fGdbControl.getExecutor().execute(query2);
query2.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
stoppedEvent = eventWaitor.waitForEvent(1000);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN);
}
/**
* Repeat the test testNoStopAtMainWithReverse, but after a restart.
* TODO: remove ignore when parent test is fixed
*/
@Test
@Ignore
public void testNoStopAtMainWithReverseRestart() throws Throwable {
assumeGdbVersionAtLeast("7.2");
fRestart = true;
testNoStopAtMainWithReverse();
}
} }

View file

@ -208,13 +208,7 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
// cleanup cannot assume sane state since it runs even test is failed or skipped // cleanup cannot assume sane state since it runs even test is failed or skipped
if (fSession != null) { if (fSession != null) {
// Clear the references (not strictly necessary) // Clear the references (not strictly necessary)
Runnable runnable = new Runnable() { fSession.getExecutor().submit(()->fRunControl.getSession().removeServiceEventListener(MIBreakpointsTest.this)).get();
@Override
public void run() {
fRunControl.getSession().removeServiceEventListener(MIBreakpointsTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
} }
fBreakpointService = null; fBreakpointService = null;
fRunControl = null; fRunControl = null;

View file

@ -35,8 +35,7 @@ import org.eclipse.cdt.dsf.mi.service.MIDisassembly;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64; import org.eclipse.cdt.utils.Addr64;
@ -44,6 +43,7 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/* /*
* This is the Disassembly Service test suite. * This is the Disassembly Service test suite.
@ -58,8 +58,8 @@ import org.junit.runner.RunWith;
* Refer to the JUnit4 documentation for an explanation of the annotations. * Refer to the JUnit4 documentation for an explanation of the annotations.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIDisassemblyTest extends BaseTestCase { public class MIDisassemblyTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "MemoryTestApp.exe"; private static final String EXEC_NAME = "MemoryTestApp.exe";
private static final String SOURCE_NAME = "MemoryTestApp.cc"; private static final String SOURCE_NAME = "MemoryTestApp.cc";
private static final int LINE_NUMBER = 35; private static final int LINE_NUMBER = 35;
@ -119,8 +119,10 @@ public class MIDisassemblyTest extends BaseTestCase {
fExpressionService = null; fExpressionService = null;
fDisassembly = null; fDisassembly = null;
fServicesTracker.dispose(); if (fServicesTracker != null) {
fServicesTracker = null; fServicesTracker.dispose();
fServicesTracker = null;
}
} }
// ======================================================================== // ========================================================================

View file

@ -52,8 +52,7 @@ import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
@ -64,9 +63,10 @@ import org.eclipse.core.runtime.Status;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIExpressionsTest extends BaseTestCase { public class MIExpressionsTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "ExpressionTestApp.exe"; private static final String EXEC_NAME = "ExpressionTestApp.exe";
private DsfSession fSession; private DsfSession fSession;
@ -110,16 +110,13 @@ public class MIExpressionsTest extends BaseTestCase {
@Override @Override
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
if (fSession != null) {
Runnable runnable = new Runnable() { fSession.getExecutor().submit(()->fSession.removeServiceEventListener(MIExpressionsTest.this)).get();
@Override }
public void run() { fExpService = null;
fSession.removeServiceEventListener(MIExpressionsTest.this); if (fServicesTracker != null) {
} fServicesTracker.dispose();
}; }
fSession.getExecutor().submit(runnable).get();
fExpService = null;
fServicesTracker.dispose();
} }
// Handles ExpressionChangedEvent // Handles ExpressionChangedEvent
@ -314,6 +311,7 @@ public class MIExpressionsTest extends BaseTestCase {
*/ */
@Test @Test
public void testChildren() throws Throwable { public void testChildren() throws Throwable {
assumeGdbVersionAtLeast("6.7");
// Get the children of some variables // Get the children of some variables
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testChildren"); MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testChildren");
@ -1831,6 +1829,9 @@ public class MIExpressionsTest extends BaseTestCase {
*/ */
@Test @Test
public void testDeleteChildren() throws Throwable { public void testDeleteChildren() throws Throwable {
assumeGdbVersionAtLeast("6.7");
assumeGdbVersionLowerThen("7.3");
SyncUtil.runToLocation("testDeleteChildren"); SyncUtil.runToLocation("testDeleteChildren");
MIStoppedEvent stoppedEvent = SyncUtil.step(1, StepType.STEP_OVER); MIStoppedEvent stoppedEvent = SyncUtil.step(1, StepType.STEP_OVER);
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
@ -2885,6 +2886,7 @@ public class MIExpressionsTest extends BaseTestCase {
*/ */
@Test @Test
public void testCanWriteLValue() throws Throwable { public void testCanWriteLValue() throws Throwable {
assumeGdbVersionAtLeast("6.8");
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite"); // Re-use test MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite"); // Re-use test
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
@ -3461,6 +3463,8 @@ public class MIExpressionsTest extends BaseTestCase {
*/ */
@Test @Test
public void testRTTI() throws Throwable { public void testRTTI() throws Throwable {
assumeGdbVersionNot("6.7"); // crashing
assumeGdbVersionLowerThen("7.5");
SyncUtil.runToLocation("testRTTI"); SyncUtil.runToLocation("testRTTI");
MIStoppedEvent stoppedEvent = SyncUtil.step(3, StepType.STEP_OVER); MIStoppedEvent stoppedEvent = SyncUtil.step(3, StepType.STEP_OVER);
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0); IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
@ -4257,4 +4261,198 @@ public class MIExpressionsTest extends BaseTestCase {
assertEquals(expectedType, type); assertEquals(expectedType, type);
return type; return type;
} }
// Slight change in GDB output to fix a bug, so we must change the test a
// little
// Bug 320277
@Test
public void testDeleteChildren_7_3() throws Throwable {
assumeGdbVersionAtLeast("7.3");
SyncUtil.runToLocation("testDeleteChildren");
MIStoppedEvent stoppedEvent = SyncUtil.step(1, StepType.STEP_OVER);
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
fExpService.getExecutor().submit(new Runnable() {
@Override
public void run() {
// First create the var object and all its children
IExpressionDMContext parentDmc = fExpService.createExpression(frameDmc, "f");
fExpService.getSubExpressions(parentDmc,
new DataRequestMonitor<IExpressionDMContext[]>(fExpService.getExecutor(), null) {
@Override
protected void handleCompleted() {
if (!isSuccess()) {
wait.waitFinished(getStatus());
} else {
if (getData().length != 5) {
wait.waitFinished(new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID,
"Failed getting children; expecting 5 got " + getData().length, null));
} else {
String childStr = "((class bar) f)";
if (!getData()[0].getExpression().equals(childStr)) {
wait.waitFinished(new Status(
IStatus.ERROR, TestsPlugin.PLUGIN_ID, "Got child "
+ getData()[0].getExpression() + " instead of " + childStr,
null));
} else {
// Now list the children of the
// first element
fExpService.getSubExpressions(getData()[0],
new DataRequestMonitor<IExpressionDMContext[]>(
fExpService.getExecutor(), null) {
@Override
protected void handleCompleted() {
if (!isSuccess()) {
wait.waitFinished(getStatus());
} else {
if (getData().length != 2) {
wait.waitFinished(new Status(IStatus.ERROR,
TestsPlugin.PLUGIN_ID,
"Failed getting children; expecting 2 got "
+ getData().length,
null));
} else {
String childStr = "((((class bar) f)).d)";
if (!getData()[0].getExpression()
.equals(childStr)) {
wait.waitFinished(new Status(IStatus.ERROR,
TestsPlugin.PLUGIN_ID,
"Got child "
+ getData()[0].getExpression()
+ " instead of " + childStr,
null));
} else {
wait.setReturnInfo(getData()[0]);
wait.waitFinished();
}
}
}
}
});
}
}
}
}
});
}
});
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
assertTrue(wait.getMessage(), wait.isOK());
final IExpressionDMContext deletedChildDmc = (IExpressionDMContext) wait.getReturnInfo();
wait.waitReset();
fExpService.getExecutor().submit(new Runnable() {
@Override
public void run() {
// Now create more than 1000 expressions to trigger the deletion
// of the children
// that were created above
for (int i = 0; i < 1100; i++) {
IExpressionDMContext dmc = fExpService.createExpression(frameDmc, "a[" + i + "]");
wait.increment();
fExpService.getExpressionData(dmc,
new DataRequestMonitor<IExpressionDMData>(fExpService.getExecutor(), null) {
@Override
protected void handleCompleted() {
if (!isSuccess()) {
wait.waitFinished(getStatus());
} else {
wait.waitFinished();
}
}
});
}
}
});
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
assertTrue(wait.getMessage(), wait.isOK());
wait.waitReset();
fExpService.getExecutor().submit(new Runnable() {
@Override
public void run() {
// Evaluate the expression of a child that we know is deleted to
// make sure
// the expression service can handle that
fExpService.getExpressionData(deletedChildDmc,
new DataRequestMonitor<IExpressionDMData>(fExpService.getExecutor(), null) {
@Override
protected void handleCompleted() {
if (!isSuccess()) {
wait.waitFinished(getStatus());
} else {
wait.waitFinished();
}
}
});
}
});
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
assertTrue(wait.getMessage(), wait.isOK());
wait.waitReset();
}
/**
* This test verifies that there is proper RTTI support starting with GDB
* 7.5.
*/
@Test
public void testRTTI_7_5() throws Throwable {
assumeGdbVersionAtLeast("7.5");
SyncUtil.runToLocation("testRTTI");
MIStoppedEvent stoppedEvent = SyncUtil.step(3, StepType.STEP_OVER);
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
// The expression we will follow as it changes types: derived.ptr
IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "derived.ptr");
// Now, the expression should be type VirtualBase
getExpressionType(exprDmc, "VirtualBase *");
assertChildrenCount(exprDmc, 2);
// get all children
String[] expectedValues = new String[2];
expectedValues[0] = "a";
expectedValues[1] = "b";
getChildren(exprDmc, expectedValues);
// Make the type of our expression change
SyncUtil.step(1, StepType.STEP_OVER);
// Now, the expression should be type Derived
getExpressionType(exprDmc, "Derived *");
assertChildrenCount(exprDmc, 5);
// get all children
expectedValues = new String[5];
expectedValues[0] = "VirtualBase";
expectedValues[1] = "c";
expectedValues[2] = "ptr";
expectedValues[3] = "d";
expectedValues[4] = "e";
getChildren(exprDmc, expectedValues);
// Make the type of our expression change
SyncUtil.step(1, StepType.STEP_OVER);
// Now, the expression should be type OtherDerived
getExpressionType(exprDmc, "OtherDerived *");
assertChildrenCount(exprDmc, 4);
// get all children
expectedValues = new String[4];
expectedValues[0] = "VirtualBase";
expectedValues[1] = "d";
expectedValues[2] = "c";
expectedValues[3] = "f";
getChildren(exprDmc, expectedValues);
}
} }

View file

@ -41,8 +41,7 @@ import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.MemoryByteBuffer; import org.eclipse.cdt.tests.dsf.gdb.framework.MemoryByteBuffer;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
@ -53,6 +52,7 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/* /*
* This is the Memory Service test suite. * This is the Memory Service test suite.
@ -67,8 +67,8 @@ import org.junit.runner.RunWith;
* Refer to the JUnit4 documentation for an explanation of the annotations. * Refer to the JUnit4 documentation for an explanation of the annotations.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIMemoryTest extends BaseTestCase { public class MIMemoryTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "MemoryTestApp.exe"; private static final String EXEC_NAME = "MemoryTestApp.exe";
private DsfSession fSession; private DsfSession fSession;
@ -141,21 +141,15 @@ public class MIMemoryTest extends BaseTestCase {
@Override @Override
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
// Clear the references (not strictly necessary) // Clear the references (not strictly necessary)
Runnable runnable = new Runnable() { if (fSession != null)
@Override fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(MIMemoryTest.this)).get();
public void run() { fBaseAddress = null;
fSession.removeServiceEventListener(MIMemoryTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
fBaseAddress = null;
fExpressionService = null; fExpressionService = null;
fMemoryService = null; fMemoryService = null;
fRunControl = null; fRunControl = null;
fServicesTracker.dispose(); if (fServicesTracker != null)
fServicesTracker.dispose();
fServicesTracker = null; fServicesTracker = null;
clearEventCounters(); clearEventCounters();
} }

View file

@ -179,7 +179,7 @@ public class MIRegistersTest extends BaseParametrizedTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
fRegService = null; fRegService = null;
} }

View file

@ -32,21 +32,21 @@ import org.eclipse.cdt.dsf.mi.service.IMIRunControl;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* Tests MIRunControl class for for the execWhileTargetAvailable() method. * Tests MIRunControl class for for the execWhileTargetAvailable() method.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIRunControlTargetAvailableTest extends BaseTestCase { public class MIRunControlTargetAvailableTest extends BaseParametrizedTestCase {
private static final String TIMEOUT_MESSAGE = "Timeout"; private static final String TIMEOUT_MESSAGE = "Timeout";
@ -89,7 +89,7 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
} }
@Override @Override

View file

@ -50,8 +50,7 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
@ -60,13 +59,14 @@ import org.junit.Assert;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* Tests MIRunControl class for Multi-threaded application. * Tests MIRunControl class for Multi-threaded application.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIRunControlTest extends BaseTestCase { public class MIRunControlTest extends BaseParametrizedTestCase {
/** /**
* The cygwin runtime/emulation spawns a thread, so even the most basic * The cygwin runtime/emulation spawns a thread, so even the most basic
@ -131,7 +131,7 @@ public class MIRunControlTest extends BaseTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
} }
@Override @Override
@ -363,7 +363,7 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* getModelData should return StateChangeReason. * getModelData should return StateChangeReason.
*/ */
Assert.assertEquals("Unexpected state change reason.", getExpectedMainThreadStopReason(), data.getStateChangeReason()); Assert.assertEquals("Unexpected state change reason.", StateChangeReason.BREAKPOINT, data.getStateChangeReason());
} }
} }

View file

@ -32,8 +32,7 @@ import org.eclipse.cdt.dsf.mi.service.IMIContainerDMContext;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
@ -44,6 +43,7 @@ import org.junit.Assert;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.osgi.service.prefs.Preferences; import org.osgi.service.prefs.Preferences;
@ -51,8 +51,8 @@ import org.osgi.service.prefs.Preferences;
* Tests that we can perform different operations while the target * Tests that we can perform different operations while the target
* is running. * is running.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class OperationsWhileTargetIsRunningTest extends BaseTestCase { public class OperationsWhileTargetIsRunningTest extends BaseParametrizedTestCase {
private static final String TIMEOUT_MESSAGE = "Timeout"; private static final String TIMEOUT_MESSAGE = "Timeout";
@ -103,7 +103,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
// Restore the different preferences we might have changed // Restore the different preferences we might have changed
IEclipsePreferences node = InstanceScope.INSTANCE.getNode( GdbPlugin.PLUGIN_ID ); IEclipsePreferences node = InstanceScope.INSTANCE.getNode( GdbPlugin.PLUGIN_ID );

View file

@ -37,8 +37,7 @@ import org.eclipse.cdt.dsf.mi.service.MIExpressions;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64; import org.eclipse.cdt.utils.Addr64;
@ -53,9 +52,10 @@ import org.eclipse.debug.core.model.MemoryByte;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class PostMortemCoreTest extends BaseTestCase { public class PostMortemCoreTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "ExpressionTestApp.exe"; private static final String EXEC_NAME = "ExpressionTestApp.exe";
private static final String INVALID_CORE_NAME = "MultiThread.exe"; private static final String INVALID_CORE_NAME = "MultiThread.exe";
private static final String CORE_NAME = "core"; private static final String CORE_NAME = "core";
@ -126,13 +126,7 @@ public class PostMortemCoreTest extends BaseTestCase {
super.doAfterTest(); super.doAfterTest();
if (fSession != null) { if (fSession != null) {
Runnable runnable = new Runnable() { fSession.getExecutor().submit(()->fSession.removeServiceEventListener(PostMortemCoreTest.this)).get();
@Override
public void run() {
fSession.removeServiceEventListener(PostMortemCoreTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
} }
fExpService = null; fExpService = null;

View file

@ -47,6 +47,7 @@ import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext; import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData; import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
import org.eclipse.cdt.dsf.debug.sourcelookup.DsfSourceLookupDirector; import org.eclipse.cdt.dsf.debug.sourcelookup.DsfSourceLookupDirector;
import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils;
import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl; import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory; import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
@ -54,12 +55,10 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIMixedInstruction;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.SourceLookupTest_6_6;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5.SourceLookupTest_7_5;
import org.eclipse.core.resources.IMarkerDelta; import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage; import org.eclipse.core.resources.IStorage;
@ -83,6 +82,7 @@ import org.eclipse.debug.core.sourcelookup.containers.DirectorySourceContainer;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* Tests that interaction with source lookups works as expected. * Tests that interaction with source lookups works as expected.
@ -118,8 +118,8 @@ import org.junit.runner.RunWith;
* others, therefore the relevant tests are ignored as needed in the subclasses * others, therefore the relevant tests are ignored as needed in the subclasses
* of {@link SourceLookupTest}. * of {@link SourceLookupTest}.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class SourceLookupTest extends BaseTestCase { public class SourceLookupTest extends BaseParametrizedTestCase {
protected static final String BUILD_PATH = "data/launch/build/"; protected static final String BUILD_PATH = "data/launch/build/";
protected static final String BUILD2_PATH = "data/launch/build2/"; protected static final String BUILD2_PATH = "data/launch/build2/";
protected static final String SOURCE_NAME = "SourceLookup.cc"; //$NON-NLS-1$ protected static final String SOURCE_NAME = "SourceLookup.cc"; //$NON-NLS-1$
@ -145,11 +145,22 @@ public class SourceLookupTest extends BaseTestCase {
* {@link SourceLookupTest_7_5#setExeNames()} which restores them. * {@link SourceLookupTest_7_5#setExeNames()} which restores them.
*/ */
protected void setExeNames() { protected void setExeNames() {
EXEC_AC_NAME = "SourceLookupAC.exe"; //$NON-NLS-1$ String gdbVersion = getGdbVersion();
EXEC_AN_NAME = "SourceLookupAN.exe"; //$NON-NLS-1$ // has to be strictly lower
EXEC_RC_NAME = "SourceLookupRC.exe"; //$NON-NLS-1$ boolean isLower = LaunchUtils.compareVersions("7.4", gdbVersion) > 0;
EXEC_RN_NAME = "SourceLookupRN.exe"; //$NON-NLS-1$ if (isLower) {
EXEC_NAME = "SourceLookup.exe"; //$NON-NLS-1$ EXEC_AC_NAME = "SourceLookupDwarf2AC.exe"; //$NON-NLS-1$
EXEC_AN_NAME = "SourceLookupDwarf2AN.exe"; //$NON-NLS-1$
EXEC_RC_NAME = "SourceLookupDwarf2RC.exe"; //$NON-NLS-1$
EXEC_RN_NAME = "SourceLookupDwarf2RN.exe"; //$NON-NLS-1$
EXEC_NAME = "SourceLookupDwarf2.exe"; //$NON-NLS-1$
} else {
EXEC_AC_NAME = "SourceLookupAC.exe"; //$NON-NLS-1$
EXEC_AN_NAME = "SourceLookupAN.exe"; //$NON-NLS-1$
EXEC_RC_NAME = "SourceLookupRC.exe"; //$NON-NLS-1$
EXEC_RN_NAME = "SourceLookupRN.exe"; //$NON-NLS-1$
EXEC_NAME = "SourceLookup.exe"; //$NON-NLS-1$
}
} }
protected static final String SOURCE_ABSPATH = new File(SOURCE_PATH).getAbsolutePath(); protected static final String SOURCE_ABSPATH = new File(SOURCE_PATH).getAbsolutePath();
@ -456,6 +467,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void sourceMappingAC() throws Throwable { public void sourceMappingAC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_AC_NAME, false); sourceMapping(EXEC_AC_NAME, false);
} }
@ -474,6 +486,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void sourceMappingAN() throws Throwable { public void sourceMappingAN() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_AN_NAME, false); sourceMapping(EXEC_AN_NAME, false);
} }
@ -493,6 +506,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void sourceMappingRC() throws Throwable { public void sourceMappingRC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_RC_NAME, false); sourceMapping(EXEC_RC_NAME, false);
} }
@ -511,6 +525,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void sourceMappingRN() throws Throwable { public void sourceMappingRN() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_RN_NAME, false); sourceMapping(EXEC_RN_NAME, false);
} }
@ -530,6 +545,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void sourceMappingBreakpointsAC() throws Throwable { public void sourceMappingBreakpointsAC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMappingBreakpoints(EXEC_AC_NAME, false); sourceMappingBreakpoints(EXEC_AC_NAME, false);
} }
@ -568,6 +584,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void sourceMappingBreakpointsRC() throws Throwable { public void sourceMappingBreakpointsRC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMappingBreakpoints(EXEC_RC_NAME, false); sourceMappingBreakpoints(EXEC_RC_NAME, false);
} }
@ -730,6 +747,7 @@ public class SourceLookupTest extends BaseTestCase {
*/ */
@Test @Test
public void directorySource() throws Throwable { public void directorySource() throws Throwable {
assumeGdbVersionLowerThen("7.6");
DirectorySourceContainer container = new DirectorySourceContainer(new Path(SOURCE_ABSPATH), false); DirectorySourceContainer container = new DirectorySourceContainer(new Path(SOURCE_ABSPATH), false);
setSourceContainer(container); setSourceContainer(container);
doLaunch(EXEC_PATH + EXEC_RC_NAME); doLaunch(EXEC_PATH + EXEC_RC_NAME);

View file

@ -32,22 +32,21 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIFrame;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.internal.core.model.FunctionDeclaration; import org.eclipse.cdt.internal.core.model.FunctionDeclaration;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* Tests Non Stop GDB RunControl "Step into Selection feature" * Tests Non Stop GDB RunControl "Step into Selection feature"
* *
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class StepIntoSelectionTest extends BaseTestCase { public class StepIntoSelectionTest extends BaseParametrizedTestCase {
private DsfServicesTracker fServicesTracker; private DsfServicesTracker fServicesTracker;
private DsfSession fSession; private DsfSession fSession;
@ -114,7 +113,7 @@ public class StepIntoSelectionTest extends BaseTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
} }
@Override @Override
@ -456,9 +455,9 @@ public class StepIntoSelectionTest extends BaseTestCase {
* reasons, resulting in two MIStoppedEvent in the step-into-selection machinery. Later * reasons, resulting in two MIStoppedEvent in the step-into-selection machinery. Later
* gdbs generate a stopped event with only one reason, as they should. * gdbs generate a stopped event with only one reason, as they should.
*/ */
@Ignore
@Test @Test
public void atDoubleMethodStopAtBreakpointFunctionEntry() throws Throwable { public void atDoubleMethodStopAtBreakpointFunctionEntry() throws Throwable {
assumeGdbVersionAtLeast("7.4");
atDoubleMethodStopAtBreakpointCommon(FOO_LINE); atDoubleMethodStopAtBreakpointCommon(FOO_LINE);
} }
@ -497,8 +496,8 @@ public class StepIntoSelectionTest extends BaseTestCase {
* gdbs generate a stopped event with only one reason, as they should. * gdbs generate a stopped event with only one reason, as they should.
*/ */
@Test @Test
@Ignore
public void atDoubleMethodSkipBreakpointFunctionEntry() throws Throwable { public void atDoubleMethodSkipBreakpointFunctionEntry() throws Throwable {
assumeGdbVersionAtLeast("7.4");
atDoubleMethodSkipBreakpointCommon(FOO_LINE); atDoubleMethodSkipBreakpointCommon(FOO_LINE);
} }

View file

@ -11,6 +11,11 @@
package org.eclipse.cdt.tests.dsf.gdb.tests; package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.nonstop.GDBMultiNonStopRunControlTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.nonstop.MIExpressionsNonStopTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.nonstop.MIRunControlNonStopTargetAvailableTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.nonstop.OperationsWhileTargetIsRunningNonStopTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.nonstop.StepIntoSelectionNonStopTest;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Suite; import org.junit.runners.Suite;
@ -26,13 +31,36 @@ import org.junit.runners.Suite;
*/ */
@RunWith(Suite.class) @RunWith(Suite.class)
@Suite.SuiteClasses({ @Suite.SuiteClasses({
// new style tests // new style tests
MIBreakpointsTest.class, MIBreakpointsTest.class,
MICatchpointsTest.class, MICatchpointsTest.class,
MIRegistersTest.class, MIRegistersTest.class,
/* Add your test class here */ MIExpressionsTest.class,
LaunchConfigurationAndRestartTest.class,
SourceLookupTest.class,
StepIntoSelectionTest.class,
OperationsWhileTargetIsRunningTest.class,
MIRunControlTest.class,
MIRunControlTargetAvailableTest.class,
GDBPatternMatchingExpressionsTest.class,
GDBMultiNonStopRunControlTest.class,
GDBConsoleBreakpointsTest.class,
MIRunControlNonStopTargetAvailableTest.class,
MIExpressionsNonStopTest.class,
OperationsWhileTargetIsRunningNonStopTest.class,
StepIntoSelectionNonStopTest.class,
GDBRemoteTracepointsTest.class,
TraceFileTest.class,
GDBConsoleSynchronizingTest.class,
MIMemoryTest.class,
MIDisassemblyTest.class,
GDBProcessesTest.class,
PostMortemCoreTest.class,
CommandTimeoutTest.class,
/* Add your test class here */
}) })
public class SuiteGdb { public class SuiteGdb {
@BeforeClass @BeforeClass
public static void before() { public static void before() {
// If we running this suite we have to clean up global options since // If we running this suite we have to clean up global options since

View file

@ -1,74 +0,0 @@
/*******************************************************************************
* Copyright (c) 2016 QNX Software System and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Elena Laskavaia (QNX Software System) - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.CommandTimeoutTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.GDBConsoleBreakpointsTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.GDBConsoleSynchronizingTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.GDBMultiNonStopRunControlTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.GDBPatternMatchingExpressionsTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.GDBProcessesTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.LaunchConfigurationAndRestartTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIDisassemblyTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIExpressionsNonStopTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIExpressionsTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIMemoryTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIRunControlNonStopTargetAvailableTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIRunControlTargetAvailableTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.MIRunControlTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.OperationsWhileTargetIsRunningNonStopTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.OperationsWhileTargetIsRunningTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.PostMortemCoreTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.SourceLookupTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.StepIntoSelectionNonStopTest_7_11;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_11.StepIntoSelectionTest_7_11;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This suite is for tests to be run with GDB.
*
* Do not change this unless you flattening the tests, these are old style test not converted yet
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// temporary we still use hardcoded gdb version name, we will slowly flatten them
MIRunControlTest_7_11.class,
MIRunControlTargetAvailableTest_7_11.class,
MIRunControlNonStopTargetAvailableTest_7_11.class,
MIExpressionsTest_7_11.class,
MIExpressionsNonStopTest_7_11.class,
GDBPatternMatchingExpressionsTest_7_11.class,
MIMemoryTest_7_11.class,
MIDisassemblyTest_7_11.class,
GDBProcessesTest_7_11.class,
LaunchConfigurationAndRestartTest_7_11.class,
OperationsWhileTargetIsRunningTest_7_11.class,
OperationsWhileTargetIsRunningNonStopTest_7_11.class,
PostMortemCoreTest_7_11.class,
CommandTimeoutTest_7_11.class,
GDBMultiNonStopRunControlTest_7_11.class,
GDBConsoleBreakpointsTest_7_11.class,
GDBConsoleSynchronizingTest_7_11.class,
StepIntoSelectionTest_7_11.class,
StepIntoSelectionNonStopTest_7_11.class,
SourceLookupTest_7_11.class,
/* DO NOT ADD MORE TESTS HERE: User SuiteGdb for new style tests */
})
public class SuiteGdbVersioned {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_11);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -10,7 +10,7 @@
* Marc Khouzam (Ericsson) - Run tests in alphabetical order since they are dependent on each other. * Marc Khouzam (Ericsson) - Run tests in alphabetical order since they are dependent on each other.
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
@ -47,10 +47,9 @@ import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager; import org.eclipse.debug.core.IBreakpointManager;
@ -59,10 +58,13 @@ import org.junit.After;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.FixMethodOrder; import org.junit.FixMethodOrder;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters; import org.junit.runners.MethodSorters;
import org.junit.runners.Parameterized;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TraceFileTest_7_4 extends BaseTestCase { @RunWith(Parameterized.class)
public class TraceFileTest extends BaseParametrizedTestCase {
private final static String SOURCE_NAME = "TracepointTestApp.cc"; private final static String SOURCE_NAME = "TracepointTestApp.cc";
private final static String EXEC_NAME = "TracepointTestApp.exe"; private final static String EXEC_NAME = "TracepointTestApp.exe";
@ -81,13 +83,10 @@ public class TraceFileTest_7_4 extends BaseTestCase {
private IBreakpointsTargetDMContext fBreakpointsDmc; private IBreakpointsTargetDMContext fBreakpointsDmc;
private ITraceTargetDMContext fTraceTargetDmc; private ITraceTargetDMContext fTraceTargetDmc;
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4);
}
@Override @Override
public void doBeforeTest() throws Exception { public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.4");
removeTeminatedLaunchesBeforeTest(); removeTeminatedLaunchesBeforeTest();
// Suppress settings of the launch attributes and launching. // Suppress settings of the launch attributes and launching.
// Each test sets its own launch attributes // Each test sets its own launch attributes

View file

@ -8,12 +8,10 @@
* Contributors: * Contributors:
* Marc Khouzam (Ericsson) - Initial implementation of Test cases * Marc Khouzam (Ericsson) - Initial implementation of Test cases
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -32,34 +30,28 @@ import org.eclipse.cdt.dsf.mi.service.command.events.MIRunningEvent;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.Intermittent; import org.eclipse.cdt.tests.dsf.gdb.framework.Intermittent;
import org.eclipse.cdt.tests.dsf.gdb.framework.IntermittentRule; import org.eclipse.cdt.tests.dsf.gdb.framework.IntermittentRule;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.Assume; import org.junit.Assume;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/** /**
* Tests IMultiRunControl class for Non-stop multi-threaded application. * Tests IMultiRunControl class for Non-stop multi-threaded application.
*/ */
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
@Intermittent @Intermittent
public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase { public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
public @Rule IntermittentRule irule = new IntermittentRule(); public @Rule IntermittentRule irule = new IntermittentRule();
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
private DsfServicesTracker fServicesTracker; private DsfServicesTracker fServicesTracker;
private IMultiRunControl fMultiRun; private IMultiRunControl fMultiRun;
@ -76,6 +68,7 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
@Override @Override
public void doBeforeTest() throws Exception { public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest(); super.doBeforeTest();
final DsfSession session = getGDBLaunch().getSession(); final DsfSession session = getGDBLaunch().getSession();
@ -107,7 +100,7 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
public void doAfterTest() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest(); super.doAfterTest();
fServicesTracker.dispose(); if (fServicesTracker!=null) fServicesTracker.dispose();
} }
private abstract class AsyncRunnable<V> { private abstract class AsyncRunnable<V> {

View file

@ -8,22 +8,29 @@
* Contributors: * Contributors:
* Marc Khouzam (Ericsson) - Initial Implementation * Marc Khouzam (Ericsson) - Initial Implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest;
import org.junit.Assume; import org.junit.Assume;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIExpressionsNonStopTest_7_0 extends MIExpressionsTest_7_0 { public class MIExpressionsNonStopTest extends MIExpressionsTest {
@BeforeClass @BeforeClass
public static void beforeClass() { public static void beforeClass() {
Assume.assumeTrue(supportsNonStop()); Assume.assumeTrue(supportsNonStop());
} }
@Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest();
}
@Override @Override
protected void setLaunchAttributes() { protected void setLaunchAttributes() {
super.setLaunchAttributes(); super.setLaunchAttributes();

View file

@ -8,27 +8,37 @@
* Contributors: * Contributors:
* Ericsson AB - Initial implementation of Test cases * Ericsson AB - Initial implementation of Test cases
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTargetAvailableTest;
import org.junit.Assume; import org.junit.Assume;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIRunControlNonStopTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_7_0 { public class MIRunControlNonStopTargetAvailableTest extends MIRunControlTargetAvailableTest {
@BeforeClass @BeforeClass
public static void beforeClass() { public static void beforeClass() {
Assume.assumeTrue(supportsNonStop()); Assume.assumeTrue(supportsNonStop());
} }
@Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest();
}
@Override @Override
protected void setLaunchAttributes() { protected void setLaunchAttributes() {
super.setLaunchAttributes(); super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
@Test
public void checknothing(){
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
} }

View file

@ -8,18 +8,18 @@
* Contributors: * Contributors:
* Ericsson AB - Initial implementation of Test cases * Ericsson AB - Initial implementation of Test cases
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1; package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.OperationsWhileTargetIsRunningTest;
import org.junit.Assume; import org.junit.Assume;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_1 { public class OperationsWhileTargetIsRunningNonStopTest extends OperationsWhileTargetIsRunningTest {
@BeforeClass @BeforeClass
public static void beforeClass() { public static void beforeClass() {
Assume.assumeTrue(supportsNonStop()); Assume.assumeTrue(supportsNonStop());
@ -28,7 +28,16 @@ public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTarg
@Override @Override
protected void setLaunchAttributes() { protected void setLaunchAttributes() {
super.setLaunchAttributes(); super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); @Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest();
}
@Test
public void checknothing() {
} }
} }

View file

@ -8,26 +8,36 @@
* Contributors: * Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865) * Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2; package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.StepIntoSelectionTest;
import org.junit.Assume; import org.junit.Assume;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class) @RunWith(Parameterized.class)
public class StepIntoSelectionNonStopTest_7_2 extends StepIntoSelectionTest_7_2 { public class StepIntoSelectionNonStopTest extends StepIntoSelectionTest {
@BeforeClass @BeforeClass
public static void beforeClass() { public static void beforeClass() {
Assume.assumeTrue(supportsNonStop()); Assume.assumeTrue(supportsNonStop());
} }
@Override @Override
protected void setLaunchAttributes() { protected void setLaunchAttributes() {
super.setLaunchAttributes(); super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); @Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest();
}
@Test
public void checknothing() {
} }
} }

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Mentor Graphics and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mentor Graphics - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_6_6 extends CommandTimeoutTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBPatternMatchingExpressionsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBPatternMatchingExpressionsTest_6_6 extends GDBPatternMatchingExpressionsTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBProcessesTest_6_6 extends GDBProcessesTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.LaunchConfigurationAndRestartTest;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_6_6 extends LaunchConfigurationAndRestartTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
@Override
@Ignore("Not supported before GDB 7.3")
@Test
public void testExitCodeSet() throws Throwable {
super.testExitCodeSet();
}
}

View file

@ -1,26 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_6_6 extends MIDisassemblyTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,53 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIExpressionsTest_6_6 extends MIExpressionsTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
@Override
@Ignore("Only works in versions later than GDB6.7")
@Test
public void testCanWriteLValue() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testCanWriteLValue();
}
@Override
@Ignore("Only works in versions later than GDB6.6")
@Test
public void testChildren() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testChildren();
}
@Override
@Ignore("Only works in versions later than GDB6.6")
@Test
public void testDeleteChildren() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testDeleteChildren();
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIMemoryTest_6_6 extends MIMemoryTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTargetAvailableTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_6_6 extends MIRunControlTargetAvailableTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTest_6_6 extends MIRunControlTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.OperationsWhileTargetIsRunningTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_6_6 extends OperationsWhileTargetIsRunningTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_6_6 extends PostMortemCoreTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,103 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 Kichwa Coders and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.SourceLookupTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_6.SourceLookupTest_7_6;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class SourceLookupTest_6_6 extends SourceLookupTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
@Override
protected void setExeNames() {
EXEC_AC_NAME = "SourceLookupDwarf2AC.exe"; //$NON-NLS-1$
EXEC_AN_NAME = "SourceLookupDwarf2AN.exe"; //$NON-NLS-1$
EXEC_RC_NAME = "SourceLookupDwarf2RC.exe"; //$NON-NLS-1$
EXEC_RN_NAME = "SourceLookupDwarf2RN.exe"; //$NON-NLS-1$
EXEC_NAME = "SourceLookupDwarf2.exe"; //$NON-NLS-1$
}
/**
* For details on the ignore, see
* {@link SourceLookupTest_7_6#sourceMappingAC()}
*/
@Ignore("Only works starting with GDB 7.6")
@Test
@Override
public void sourceMappingAC() throws Throwable {
super.sourceMappingAC();
}
/**
* For details on the ignore, see
* {@link SourceLookupTest_7_6#sourceMappingAC()}
*/
@Ignore("Only works starting with GDB 7.6")
@Test
@Override
public void sourceMappingAN() throws Throwable {
super.sourceMappingAN();
}
/**
* For details on the ignore, see
* {@link SourceLookupTest_7_6#sourceMappingAC()}
*/
@Ignore("Only works starting with GDB 7.6")
@Test
@Override
public void sourceMappingRC() throws Throwable {
super.sourceMappingRC();
}
/**
* For details on the ignore, see
* {@link SourceLookupTest_7_6#sourceMappingAC()}
*/
@Ignore("Only works starting with GDB 7.6")
@Test
@Override
public void sourceMappingRN() throws Throwable {
super.sourceMappingRN();
}
/**
* For details on the ignore, see
* {@link SourceLookupTest_7_6#sourceMappingBreakpointsAC()}
*/
@Ignore("Only works starting with GDB 7.6")
@Test
@Override
public void sourceMappingBreakpointsAC() throws Throwable {
super.sourceMappingBreakpointsAC();
}
/**
* For details on the ignore, see
* {@link SourceLookupTest_7_6#sourceMappingBreakpointsAC()}
*/
@Ignore("Only works starting with GDB 7.6")
@Test
@Override
public void sourceMappingBreakpointsRC() throws Throwable {
super.sourceMappingBreakpointsRC();
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.StepIntoSelectionTest;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_6_6 extends StepIntoSelectionTest {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
}
}

View file

@ -1,62 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 6.6
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_6_6.class,
MIRunControlTargetAvailableTest_6_6.class,
MIExpressionsTest_6_6.class,
GDBPatternMatchingExpressionsTest_6_6.class,
MIMemoryTest_6_6.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_6_6.class,
GDBProcessesTest_6_6.class,
LaunchConfigurationAndRestartTest_6_6.class,
OperationsWhileTargetIsRunningTest_6_6.class,
PostMortemCoreTest_6_6.class,
CommandTimeoutTest_6_6.class,
StepIntoSelectionTest_6_6.class,
SourceLookupTest_6_6.class,
/* Add your test class here */
})
public class Suite_6_6 {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,60 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseRemoteSuite;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 6.6
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_6_6.class,
MIRunControlTargetAvailableTest_6_6.class,
MIExpressionsTest_6_6.class,
GDBPatternMatchingExpressionsTest_6_6.class,
MIMemoryTest_6_6.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_6_6.class,
GDBProcessesTest_6_6.class,
OperationsWhileTargetIsRunningTest_6_6.class,
CommandTimeoutTest_6_6.class,
StepIntoSelectionTest_6_6.class,
SourceLookupTest_6_6.class,
/* Add your test class here */
})
public class Suite_Remote_6_6 extends BaseRemoteSuite {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Mentor Graphics and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mentor Graphics - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.CommandTimeoutTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_6_7 extends CommandTimeoutTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.GDBPatternMatchingExpressionsTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBPatternMatchingExpressionsTest_6_7 extends GDBPatternMatchingExpressionsTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.GDBProcessesTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBProcessesTest_6_7 extends GDBProcessesTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.LaunchConfigurationAndRestartTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_6_7 extends LaunchConfigurationAndRestartTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,26 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIDisassemblyTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_6_7 extends MIDisassemblyTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,49 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIExpressionsTest_6_6;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIExpressionsTest_6_7 extends MIExpressionsTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
// Re-enable this test starting with GDB 6.7
@Override
@Test
public void testChildren() throws Throwable {
super.testChildren();
}
// Re-enable this test starting with GDB 6.7
@Override
@Test
public void testDeleteChildren() throws Throwable {
super.testDeleteChildren();
}
@Override
@Ignore("Causes a crash in GDB 6.7 only")
@Test
public void testRTTI() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testRTTI();
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIMemoryTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIMemoryTest_6_7 extends MIMemoryTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTargetAvailableTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_6_7 extends MIRunControlTargetAvailableTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTest_6_7 extends MIRunControlTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.OperationsWhileTargetIsRunningTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_6_7 extends OperationsWhileTargetIsRunningTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.PostMortemCoreTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_6_7 extends PostMortemCoreTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015 Kichwa Coders and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.SourceLookupTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class SourceLookupTest_6_7 extends SourceLookupTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.StepIntoSelectionTest_6_6;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_6_7 extends StepIntoSelectionTest_6_6 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
}
}

View file

@ -1,61 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 6.7
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_6_7.class,
MIRunControlTargetAvailableTest_6_7.class,
MIExpressionsTest_6_7.class,
GDBPatternMatchingExpressionsTest_6_7.class,
MIMemoryTest_6_7.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_6_7.class,
GDBProcessesTest_6_7.class,
LaunchConfigurationAndRestartTest_6_7.class,
OperationsWhileTargetIsRunningTest_6_7.class,
PostMortemCoreTest_6_7.class,
CommandTimeoutTest_6_7.class,
StepIntoSelectionTest_6_7.class,
SourceLookupTest_6_7.class,
/* Add your test class here */
})
public class Suite_6_7 {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,60 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseRemoteSuite;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 6.7
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_6_7.class,
MIRunControlTargetAvailableTest_6_7.class,
MIExpressionsTest_6_7.class,
GDBPatternMatchingExpressionsTest_6_7.class,
MIMemoryTest_6_7.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_6_7.class,
GDBProcessesTest_6_7.class,
OperationsWhileTargetIsRunningTest_6_7.class,
CommandTimeoutTest_6_7.class,
StepIntoSelectionTest_6_7.class,
SourceLookupTest_6_7.class,
/* Add your test class here */
})
public class Suite_Remote_6_7 extends BaseRemoteSuite {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Mentor Graphics and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mentor Graphics - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.CommandTimeoutTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_6_8 extends CommandTimeoutTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.GDBPatternMatchingExpressionsTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBPatternMatchingExpressionsTest_6_8 extends GDBPatternMatchingExpressionsTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.GDBProcessesTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBProcessesTest_6_8 extends GDBProcessesTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.LaunchConfigurationAndRestartTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_6_8 extends LaunchConfigurationAndRestartTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,26 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIDisassemblyTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_6_8 extends MIDisassemblyTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,39 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIExpressionsTest_6_7;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIExpressionsTest_6_8 extends MIExpressionsTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
// Re-enable this test starting with GDB 6.8
@Override
@Test
public void testCanWriteLValue() throws Throwable {
super.testCanWriteLValue();
}
// Re-enable this test starting with GDB 6.8
@Override
@Test
public void testRTTI() throws Throwable {
super.testRTTI();
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIMemoryTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIMemoryTest_6_8 extends MIMemoryTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTargetAvailableTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_6_8 extends MIRunControlTargetAvailableTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTest_6_8 extends MIRunControlTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.OperationsWhileTargetIsRunningTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_6_8 extends OperationsWhileTargetIsRunningTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.PostMortemCoreTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_6_8 extends PostMortemCoreTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015 Kichwa Coders and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.SourceLookupTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class SourceLookupTest_6_8 extends SourceLookupTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.StepIntoSelectionTest_6_7;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_6_8 extends StepIntoSelectionTest_6_7 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
}
}

View file

@ -1,61 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 6.8
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_6_8.class,
MIRunControlTargetAvailableTest_6_8.class,
MIExpressionsTest_6_8.class,
GDBPatternMatchingExpressionsTest_6_8.class,
MIMemoryTest_6_8.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_6_8.class,
GDBProcessesTest_6_8.class,
LaunchConfigurationAndRestartTest_6_8.class,
OperationsWhileTargetIsRunningTest_6_8.class,
PostMortemCoreTest_6_8.class,
CommandTimeoutTest_6_8.class,
StepIntoSelectionTest_6_8.class,
SourceLookupTest_6_8.class,
/* Add your test class here */
})
public class Suite_6_8 {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,60 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseRemoteSuite;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 6.8
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_6_8.class,
MIRunControlTargetAvailableTest_6_8.class,
MIExpressionsTest_6_8.class,
GDBPatternMatchingExpressionsTest_6_8.class,
MIMemoryTest_6_8.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_6_8.class,
GDBProcessesTest_6_8.class,
OperationsWhileTargetIsRunningTest_6_8.class,
CommandTimeoutTest_6_8.class,
StepIntoSelectionTest_6_8.class,
SourceLookupTest_6_8.class,
/* Add your test class here */
})
public class Suite_Remote_6_8 extends BaseRemoteSuite {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Mentor Graphics and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mentor Graphics - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.CommandTimeoutTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_7_0 extends CommandTimeoutTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.GDBPatternMatchingExpressionsTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBPatternMatchingExpressionsTest_7_0 extends GDBPatternMatchingExpressionsTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.GDBProcessesTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBProcessesTest_7_0 extends GDBProcessesTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,360 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2014 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Simon Marchi (Ericsson) - Disable some reverse tests for gdb 7.0 and 7.1.
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.Query;
import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.mi.service.command.output.CLITraceInfo;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakListInfo;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakpoint;
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.LaunchConfigurationAndRestartTest_6_8;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAndRestartTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
/**
* This test will confirm that we have turned on "pending breakpoints"
* The pending breakpoint setting only affects CLI commands so we have
* to test with one. We don't have classes to set breakpoints using CLI,
* but we do for tracepoints, which is the same for this test.
*
* The pending breakpoint feature only works with tracepoints starting
* with GDB 7.0.
*
* We could run this test before 7.0 but we would have to use a breakpoint
* set using CLI commands.
*/
@Test
public void testPendingBreakpointSetting() throws Throwable {
doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
final IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(stoppedEvent.getDMContext(),
IBreakpointsTargetDMContext.class);
Query<MIBreakListInfo> query = new Query<MIBreakListInfo>() {
@Override
protected void execute(final DataRequestMonitor<MIBreakListInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createCLITrace(bpTargetDmc, "invalid", ""),
new ImmediateDataRequestMonitor<CLITraceInfo>(rm) {
@Override
protected void handleSuccess() {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIBreakList(bpTargetDmc),
new ImmediateDataRequestMonitor<MIBreakListInfo>(rm) {
@Override
protected void handleSuccess() {
rm.setData(getData());
rm.done();
}
});
}
});
}
};
try {
fExpService.getExecutor().execute(query);
MIBreakListInfo value = query.get(500, TimeUnit.MILLISECONDS);
MIBreakpoint[] bps = value.getMIBreakpoints();
assertTrue("Expected 1 breakpoint but got " + bps.length,
bps.length == 1);
assertTrue("Expending a <PENDING> breakpoint but got one at " + bps[0].getAddress(),
bps[0].getAddress().equals("<PENDING>"));
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
}
/**
* This test will tell the launch to "stop on main" at method main() with reverse
* debugging enabled. We will verify that the launch stops at main() and that
* reverse debugging is enabled.
*
* In this test, the execution crosses getenv() while recording is enabled. gdb 7.0
* and 7.1 have trouble with that. We disable the test for those, and enable it for
* 7.2 and upwards.
*/
@Test
@Ignore
public void testStopAtMainWithReverse() throws Throwable {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// Make sure we stopped at the first line of main
assertTrue("Expected to stop at main:" + FIRST_LINE_IN_MAIN + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN);
// Step a couple of times and check where we are
final int NUM_STEPS = 3;
stoppedEvent = SyncUtil.step(NUM_STEPS, StepType.STEP_OVER);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN+NUM_STEPS) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN+NUM_STEPS);
// Now step backwards to make sure reverse was enabled
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
new ServiceEventWaitor<MIStoppedEvent>(
fSession,
MIStoppedEvent.class);
final int REVERSE_NUM_STEPS = 2;
final IExecutionDMContext execDmc = stoppedEvent.getDMContext();
Query<MIInfo> query = new Query<MIInfo>() {
@Override
protected void execute(DataRequestMonitor<MIInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIExecReverseNext(execDmc, REVERSE_NUM_STEPS),
rm);
}
};
try {
fGdbControl.getExecutor().execute(query);
query.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
stoppedEvent = eventWaitor.waitForEvent(1000);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN+NUM_STEPS-REVERSE_NUM_STEPS) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN+NUM_STEPS-REVERSE_NUM_STEPS);
}
/**
* Repeat the test testStopAtMainWithReverse, but after a restart.
*/
@Test
@Ignore
public void testStopAtMainWithReverseRestart() throws Throwable {
fRestart = true;
testStopAtMainWithReverse();
}
/**
* This test will tell the launch to "stop on main" at method stopAtOther(),
* with reverse debugging enabled. We will then verify that the launch is properly
* stopped at stopAtOther() and that it can go backwards until main() (this will
* confirm that reverse debugging was enabled at the very start).
*
* In this test, the execution crosses getenv() while recording is enabled. gdb 7.0
* and 7.1 have trouble with that. We disable the test for those, and enable it for
* 7.2 and upwards.
*/
@Test
@Ignore
public void testStopAtOtherWithReverse() throws Throwable {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
doLaunch();
// Wait for the launch to properly complete. This is because with reverse
// the first stopped event does not mean the launch is complete. There will
// be another stopped event
synchronized (this) {
wait(1000);
}
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// The initial stopped event is not the last stopped event.
// With reverse we have to stop the program, turn on reverse and start it again.
// Let's get the frame where we really are stopped right now.
final IExecutionDMContext execDmc = stoppedEvent.getDMContext();
IFrameDMData frame = SyncUtil.getFrameData(execDmc, 0);
// Make sure we stopped at the first line of main
assertTrue("Expected to stop at stopAtOther but got " +
frame.getFunction(),
frame.getFunction().equals("stopAtOther"));
// Now step backwards all the way to the start to make sure reverse was enabled from the very start
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
new ServiceEventWaitor<MIStoppedEvent>(
fSession,
MIStoppedEvent.class);
final int REVERSE_NUM_STEPS = 3;
Query<MIInfo> query2 = new Query<MIInfo>() {
@Override
protected void execute(DataRequestMonitor<MIInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIExecReverseNext(execDmc, REVERSE_NUM_STEPS),
rm);
}
};
try {
fGdbControl.getExecutor().execute(query2);
query2.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
stoppedEvent = eventWaitor.waitForEvent(1000);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN);
}
/**
* Repeat the test testStopAtOtherWithReverse, but after a restart.
*/
@Test
@Ignore
public void testStopAtOtherWithReverseRestart() throws Throwable {
fRestart = true;
testStopAtOtherWithReverse();
}
/**
* This test will set a breakpoint at the last line of the program and will tell
* the launch to NOT "stop on main", with reverse debugging enabled. We will
* verify that the first stop is at the last line of the program but that the program
* can run backwards until main() (this will confirm that reverse debugging was
* enabled at the very start).
*/
@Ignore
@Test
public void testNoStopAtMainWithReverse() throws Throwable {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
// Set this one as well to make sure it gets ignored
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// see testNoStopAtMain()
doLaunch();
// Wait for the launch to properly complete. This is because with reverse
// the first stopped event does not mean the launch is complete. There will
// be another stopped event
synchronized (this) {
wait(1000);
}
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// The initial stopped event is not the last stopped event.
// With reverse we have to stop the program, turn on reverse and start it again.
// Let's get the frame where we really are stopped right now.
final IExecutionDMContext execDmc = stoppedEvent.getDMContext();
IFrameDMData frame = SyncUtil.getFrameData(execDmc, 0);
// Make sure we stopped at the first line of main
assertTrue("Expected to stop at main:" + LAST_LINE_IN_MAIN + " but got " +
frame.getFunction() + ":" +
Integer.toString(frame.getLine()),
frame.getFunction().equals("main") &&
frame.getLine() == LAST_LINE_IN_MAIN);
// Now step backwards all the way to the start to make sure reverse was enabled from the very start
final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
new ServiceEventWaitor<MIStoppedEvent>(
fSession,
MIStoppedEvent.class);
final int REVERSE_NUM_STEPS = 3;
Query<MIInfo> query2 = new Query<MIInfo>() {
@Override
protected void execute(DataRequestMonitor<MIInfo> rm) {
fGdbControl.queueCommand(
fGdbControl.getCommandFactory().createMIExecReverseNext(execDmc, REVERSE_NUM_STEPS),
rm);
}
};
try {
fGdbControl.getExecutor().execute(query2);
query2.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
fail(e.getMessage());
} catch (ExecutionException e) {
fail(e.getCause().getMessage());
} catch (TimeoutException e) {
fail(e.getMessage());
}
stoppedEvent = eventWaitor.waitForEvent(1000);
assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN) + " but got " +
stoppedEvent.getFrame().getFunction() + ":" +
Integer.toString(stoppedEvent.getFrame().getLine()),
stoppedEvent.getFrame().getFunction().equals("main") &&
stoppedEvent.getFrame().getLine() == FIRST_LINE_IN_MAIN);
}
/**
* Repeat the test testNoStopAtMainWithReverse, but after a restart.
*/
@Ignore
@Test
public void testNoStopAtMainWithReverseRestart() throws Throwable {
fRestart = true;
testNoStopAtMainWithReverse();
}
}

View file

@ -1,26 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIDisassemblyTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_7_0 extends MIDisassemblyTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIExpressionsTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIExpressionsTest_7_0 extends MIExpressionsTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIMemoryTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIMemoryTest_7_0 extends MIMemoryTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTargetAvailableTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class MIRunControlTest_7_0 extends MIRunControlTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
@Override
protected StateChangeReason getExpectedMainThreadStopReason() {
return StateChangeReason.BREAKPOINT;
}
}

View file

@ -1,34 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningNonStopTest_7_0 extends OperationsWhileTargetIsRunningTest_7_0 {
@BeforeClass
public static void beforeClass() {
Assume.assumeTrue(supportsNonStop());
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.OperationsWhileTargetIsRunningTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_7_0 extends OperationsWhileTargetIsRunningTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.PostMortemCoreTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_7_0 extends PostMortemCoreTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2015 Kichwa Coders and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Jonah Graham (Kichwa Coders) - initial API and implementation to Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.SourceLookupTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class SourceLookupTest_7_0 extends SourceLookupTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013, 2014 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionNonStopTest_7_0 extends StepIntoSelectionTest_7_0 {
@BeforeClass
public static void beforeClass() {
Assume.assumeTrue(supportsNonStop());
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2013 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Support for Step into selection (bug 244865)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.StepIntoSelectionTest_6_8;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionTest_7_0 extends StepIntoSelectionTest_6_8 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
}

View file

@ -1,67 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_0 to suite
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 7.0
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
MIRegistersTest.class,
MIRunControlTest_7_0.class,
MIRunControlTargetAvailableTest_7_0.class,
MIRunControlNonStopTargetAvailableTest_7_0.class,
MIExpressionsTest_7_0.class,
MIExpressionsNonStopTest_7_0.class,
GDBPatternMatchingExpressionsTest_7_0.class,
MIMemoryTest_7_0.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_7_0.class,
GDBProcessesTest_7_0.class,
LaunchConfigurationAndRestartTest_7_0.class,
OperationsWhileTargetIsRunningTest_7_0.class,
OperationsWhileTargetIsRunningNonStopTest_7_0.class,
PostMortemCoreTest_7_0.class,
CommandTimeoutTest_7_0.class,
GDBMultiNonStopRunControlTest_7_0.class,
StepIntoSelectionTest_7_0.class,
StepIntoSelectionNonStopTest_7_0.class,
SourceLookupTest_7_0.class,
/* Add your test class here */
})
public class Suite_7_0 {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,67 +0,0 @@
/*******************************************************************************
* Copyright (c) 2009, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson - Initial Implementation
* Alvaro Sanchez-Leon (Ericsson) - Bug 437562 - Split the dsf-gdb tests to a plug-in and fragment pair
* Jonah Graham (Kichwa Coders) - Bug 469007 - Add MIExpressionsNonStopTest_7_0 to suite
* Jonah Graham (Kichwa Coders) - Add support for gdb's "set substitute-path" (Bug 472765)
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseRemoteSuite;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
* This class is meant to be empty. It enables us to define
* the annotations which list all the different JUnit class we
* want to run. When creating a new test class, it should be
* added to the list below.
*
* This suite is for tests to be run with GDB 7.0
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256
GDBRemoteTracepointsTest_7_0.class,
MIRegistersTest.class,
MIRunControlTargetAvailableTest_7_0.class,
MIRunControlNonStopTargetAvailableTest_7_0.class,
MIRunControlTest_7_0.class,
MIExpressionsTest_7_0.class,
MIExpressionsNonStopTest_7_0.class,
GDBPatternMatchingExpressionsTest_7_0.class,
MIMemoryTest_7_0.class,
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIDisassemblyTest_7_0.class,
GDBProcessesTest_7_0.class,
OperationsWhileTargetIsRunningTest_7_0.class,
OperationsWhileTargetIsRunningNonStopTest_7_0.class,
CommandTimeoutTest_7_0.class,
GDBMultiNonStopRunControlTest_7_0.class,
StepIntoSelectionTest_7_0.class,
StepIntoSelectionNonStopTest_7_0.class,
SourceLookupTest_7_0.class,
/* Add your test class here */
})
public class Suite_Remote_7_0 extends BaseRemoteSuite {
@BeforeClass
public static void beforeClassMethod() {
BaseTestCase.setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
BaseTestCase.ignoreIfGDBMissing();
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Mentor Graphics and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Mentor Graphics - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.CommandTimeoutTest_7_0;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_7_1 extends CommandTimeoutTest_7_0 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
}

View file

@ -1,29 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBMultiNonStopRunControlTest_7_0;
import org.junit.runner.RunWith;
/**
* Tests IMultiRunControl class for Non-stop multi-threaded application.
*/
@RunWith(BackgroundRunner.class)
public class GDBMultiNonStopRunControlTest_7_1 extends GDBMultiNonStopRunControlTest_7_0 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Marc Khouzam (Ericsson) - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBPatternMatchingExpressionsTest_7_0;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBPatternMatchingExpressionsTest_7_1 extends GDBPatternMatchingExpressionsTest_7_0 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010, 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Ericsson AB - Initial implementation of Test cases
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBProcessesTest_7_0;
import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class)
public class GDBProcessesTest_7_1 extends GDBProcessesTest_7_0 {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
}

Some files were not shown because too many files have changed in this diff Show more