1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +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">
<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.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;}"/>
<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 key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<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.launching;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.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
org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;x-internal:=true

View file

@ -36,7 +36,7 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
@Parameter public String parameter;
// other fields
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() {
if (globalVersion != null) {
@ -78,25 +78,43 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
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) {
String gdbVersion = getGdbVersion();
// otherwise it has to be strictly lower
// has to be strictly lower
boolean isLower = LaunchUtils.compareVersions(checkVersion, gdbVersion) > 0;
Assume.assumeTrue(
"Skipped because gdb " + gdbVersion + " does not support this feature: removed since " + checkVersion,
isLower);
}
protected String getGdbVersionParameter() {
if (gdbVersionPostfix == null) {
parseParameter();
if (gdbVersionPostfix == null) {
gdbVersionPostfix = globalVersion;
}
}
return gdbVersionPostfix;
}
protected String getGdbVersion() {
if (gdbVersionPostfix==null) gdbVersionPostfix=globalVersion;
String gdbPath = getProgramPath("gdb", gdbVersionPostfix);
String gdbPath = getProgramPath("gdb", getGdbVersionParameter());
return getGdbVersion(gdbPath);
}
public void assumeGdbVersionAtLeast(String checkVersion) {
String gdbVersion = getGdbVersion();
if (gdbVersion == GDB_NOT_FOUND) {
String gdbPath = getProgramPath("gdb", gdbVersionPostfix);
String gdbPath = getProgramPath("gdb", getGdbVersionParameter());
// fail assumption
Assume.assumeFalse("GDB cannot be run " + gdbPath, true);
}
@ -117,20 +135,13 @@ public abstract class BaseParametrizedTestCase extends BaseTestCase {
@Override
protected void initializeLaunchAttributes() {
parseParameter();
if (gdbVersionPostfix == null) {
// we are not running parametrized
setGdbVersion(); // old way
gdbVersionPostfix = globalVersion;
} else {
String gdbPath = getProgramPath("gdb", gdbVersionPostfix);
String gdbServerPath = getProgramPath("gdbserver", gdbVersionPostfix);
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);
}
String gdbPath = getProgramPath("gdb", getGdbVersionParameter());
String gdbServerPath = getProgramPath("gdbserver", gdbVersionPostfix);
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;
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.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
* 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.
* This suite runs 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(Suite.class)
@Suite.SuiteClasses({
Suite_7_11.class,
Suite_7_10.class,
Suite_7_9.class,
Suite_7_8.class,
Suite_7_7.class,
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 {}
@RunWith(AllTests.class)
public class AllSuites {
public static junit.framework.Test suite() {
String gdbVersions = String.join(",", 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

@ -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
* 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)
@Suite.SuiteClasses({
SuiteGdb.class,
SuiteGdbVersioned.class,
})
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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.CoreException;
@ -36,9 +35,10 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class CommandTimeoutTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class CommandTimeoutTest extends BaseParametrizedTestCase {
private static boolean fgTimeoutEnabled = false;
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.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64;
@ -58,14 +57,15 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/**
* This test case verifies whether breakpoints or watchpoints set from GDB console
* are properly synchronized with platform breakpoints.
*/
@SuppressWarnings( "restriction" )
@RunWith(BackgroundRunner.class)
public class GDBConsoleBreakpointsTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class GDBConsoleBreakpointsTest extends BaseParametrizedTestCase {
final static protected String SOURCE_NAME = "GDBMIGenericTestApp.cc";
@ -128,16 +128,16 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase {
@Override
@After
public void doAfterTest() throws Exception {
Runnable runnable = new Runnable() {
@Override
public void run() {
fSession.removeServiceEventListener(GDBConsoleBreakpointsTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
if (fSession != null) {
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBConsoleBreakpointsTest.this))
.get();
}
fBreakpointEvents.clear();
fServicesTracker.dispose();
fServicesTracker = null;
if (fServicesTracker != null) {
fServicesTracker.dispose();
fServicesTracker = null;
}
super.doAfterTest();

View file

@ -9,7 +9,7 @@
* 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.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.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.debug.core.model.MemoryByte;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/**
* This test case verifies that different commands issued from the
* GDB console cause proper updating within the CDT views.
*/
@RunWith(BackgroundRunner.class)
public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
@RunWith(Parameterized.class)
public class GDBConsoleSynchronizingTest extends BaseParametrizedTestCase {
final static private String EXEC_NAME = "ConsoleSyncTestApp.exe";
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>>();
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_6);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
}
@Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.6");
super.doBeforeTest();
fSession = getGDBLaunch().getSession();
@ -97,7 +91,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
public void run() {
fServicesTracker = new DsfServicesTracker(TestsPlugin.getBundleContext(), fSession.getId());
Assert.assertTrue(fServicesTracker != null);
fCommandControl = fServicesTracker.getService(IGDBControl.class);
Assert.assertTrue(fCommandControl != null);
@ -111,7 +105,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
Assert.assertTrue(fRunControl != null);
// Register to breakpoint events
fSession.addServiceEventListener(GDBConsoleSynchronizingTest_7_6.this, null);
fSession.addServiceEventListener(GDBConsoleSynchronizingTest.this, null);
}
};
fSession.getExecutor().submit(runnable).get();
@ -119,15 +113,12 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
@Override
public void doAfterTest() throws Exception {
Runnable runnable = new Runnable() {
@Override
public void run() {
fSession.removeServiceEventListener(GDBConsoleSynchronizingTest_7_6.this);
}
};
fSession.getExecutor().submit(runnable).get();
if (fSession != null) {
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBConsoleSynchronizingTest.this))
.get();
}
fEventsReceived.clear();
fServicesTracker.dispose();
if (fServicesTracker!=null) fServicesTracker.dispose();
super.doAfterTest();
}
@ -137,14 +128,14 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
/**
* This test verifies that setting a variable from the console
* using the set command will properly trigger a DSF event to
* using the set command will properly trigger a DSF event to
* indicate the change. This test makes sure the value that
* changes is in the memory cache also.
*/
@Test
public void testSettingVariableWithSetWithMemory() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testMemoryChanges");
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "i");
@ -158,15 +149,15 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
fSession.getExecutor().execute(query);
IExpressionDMAddress data = query.get();
IMemoryDMContext memoryDmc = DMContexts.getAncestorOfType(frameDmc, IMemoryDMContext.class);
SyncUtil.readMemory(memoryDmc, data.getAddress(), 0, 1, NEW_VAR_SIZE);
fEventsReceived.clear();
String newValue = NEW_VAR_VALUE;
queueConsoleCommand("set variable i=" + newValue);
IMemoryChangedEvent memoryEvent = waitForEvent(IMemoryChangedEvent.class);
assertEquals(1, memoryEvent.getAddresses().length);
assertEquals(data.getAddress(), memoryEvent.getAddresses()[0]);
@ -181,7 +172,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
assertEquals(NEW_MEM[i], memory[NEW_VAR_SIZE-1-i].getValue());
}
}
// Now verify the expressions service knows the new value
String exprValue = SyncUtil.getExpressionValue(exprDmc, IFormattedValues.HEX_FORMAT);
assertEquals(newValue, exprValue);
@ -203,7 +194,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
fSession.getExecutor().execute(query);
IExpressionDMAddress data = query.get();
fEventsReceived.clear();
final String newValue = NEW_VAR_VALUE;
@ -242,7 +233,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
/**
* This test verifies that setting a variable from the console
* using the print command will properly trigger a DSF event
* using the print command will properly trigger a DSF event
* to indicate the change.
*/
@Test
@ -251,13 +242,13 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
}
/**
* This test verifies that setting a memory location from the
* This test verifies that setting a memory location from the
* console will properly trigger a DSF event to indicate the change.
*/
@Test
public void testSettingMemory() throws Throwable {
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testMemoryChanges");
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
final IExpressionDMContext exprDmc = SyncUtil.createExpression(frameDmc, "i");
@ -271,7 +262,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
fSession.getExecutor().execute(query);
IExpressionDMAddress data = query.get();
fEventsReceived.clear();
final String newValue = NEW_VAR_VALUE;
@ -280,7 +271,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
IMemoryChangedEvent memoryEvent = waitForEvent(IMemoryChangedEvent.class);
assertEquals(1, memoryEvent.getAddresses().length);
assertEquals(data.getAddress(), memoryEvent.getAddresses()[0]);
// Now verify the memory service knows the new memory value
IMemoryDMContext memoryDmc = DMContexts.getAncestorOfType(frameDmc, IMemoryDMContext.class);
MemoryByte[] memory = SyncUtil.readMemory(memoryDmc, data.getAddress(), 0, 1, NEW_VAR_SIZE);
@ -297,9 +288,9 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
String exprValue = SyncUtil.getExpressionValue(exprDmc, IFormattedValues.HEX_FORMAT);
assertEquals(newValue, exprValue);
}
/**
* This test verifies that enabling reverse debugging from the
* This test verifies that enabling reverse debugging from the
* console will properly trigger a DSF event to indicate the change and
* will be processed by the service.
*/
@ -307,21 +298,21 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
public void testEnableRecord() throws Throwable {
assertTrue("Reverse debugging is not supported", fRunControl instanceof IReverseRunControl);
final IReverseRunControl reverseService = (IReverseRunControl)fRunControl;
SyncUtil.runToLocation("testMemoryChanges");
// check starting state
Query<Boolean> query = new Query<Boolean>() {
@Override
protected void execute(final DataRequestMonitor<Boolean> rm) {
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
}
};
fSession.getExecutor().execute(query);
Boolean enabled = query.get();
assertTrue("Reverse debugging should not be enabled", !enabled);
fEventsReceived.clear();
queueConsoleCommand("record");
@ -329,12 +320,12 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
// Wait for the event
IReverseModeChangedDMEvent event = waitForEvent(IReverseModeChangedDMEvent.class);
assertEquals(true, event.isReverseModeEnabled());
// Check the service
query = new Query<Boolean>() {
@Override
protected void execute(final DataRequestMonitor<Boolean> rm) {
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
}
};
fSession.getExecutor().execute(query);
@ -343,7 +334,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
}
/**
* This test verifies that disabling reverse debugging from the
* This test verifies that disabling reverse debugging from the
* console will properly trigger a DSF event to indicate the change and
* will be processed by the service.
*/
@ -351,7 +342,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
public void testDisableRecord() throws Throwable {
assertTrue("Reverse debugging is not supported", fRunControl instanceof IReverseRunControl);
final IReverseRunControl reverseService = (IReverseRunControl)fRunControl;
SyncUtil.runToLocation("testMemoryChanges");
fEventsReceived.clear();
@ -364,7 +355,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
new ImmediateRequestMonitor(rm) {
@Override
protected void handleSuccess() {
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
}
});
}
@ -373,7 +364,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
fSession.getExecutor().execute(query);
Boolean enabled = query.get();
assertTrue("Reverse debugging should be enabled", enabled);
// Wait for the event to avoid confusing it with the next one
IReverseModeChangedDMEvent event = waitForEvent(IReverseModeChangedDMEvent.class);
assertEquals(true, event.isReverseModeEnabled());
@ -384,12 +375,12 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
// Wait for the event
event = waitForEvent(IReverseModeChangedDMEvent.class);
assertEquals(false, event.isReverseModeEnabled());
// Check the service
query = new Query<Boolean>() {
@Override
protected void execute(final DataRequestMonitor<Boolean> rm) {
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
reverseService.isReverseModeEnabled(fCommandControl.getContext(), rm);
}
};
fSession.getExecutor().execute(query);
@ -400,7 +391,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
//////////////////////////////////////////////////////////////////////////////////////
// End of tests
//////////////////////////////////////////////////////////////////////////////////////
@DsfServiceEventHandler
public void eventDispatched(IDMEvent<? extends IDMContext> e) {
synchronized(this) {
@ -419,7 +410,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
protected void execute(DataRequestMonitor<MIInfo> rm) {
fCommandControl.queueCommand(
fCommandControl.getCommandFactory().createMIInterpreterExecConsole(
fCommandControl.getContext(),
fCommandControl.getContext(),
command),
rm);
}
@ -427,7 +418,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
fSession.getExecutor().execute(query);
query.get(timeout, unit);
}
private <V extends IDMEvent<? extends IDMContext>> V waitForEvent(Class<V> eventType) throws Exception {
return waitForEvent(eventType, DEFAULT_TIMEOUT);
}
@ -439,7 +430,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
synchronized(this) {
try {
wait(timeout);
}
}
catch (InterruptedException ex) {
}
}
@ -450,7 +441,7 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
}
return (V)event;
}
@SuppressWarnings("unchecked")
private synchronized <V extends IDMEvent<? extends IDMContext>> V getEvent(Class<V> eventType) {
for (IDMEvent<?> e : fEventsReceived) {

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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.launching.TestsPlugin;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class GDBPatternMatchingExpressionsTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class GDBPatternMatchingExpressionsTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "PatternMatchingExpressionsTestApp.exe";
private DsfSession fSession;
@ -97,7 +97,10 @@ public class GDBPatternMatchingExpressionsTest extends BaseTestCase {
public void doAfterTest() throws Exception {
super.doAfterTest();
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;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
import java.util.concurrent.ExecutionException;
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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.launching.TestsPlugin;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class GDBProcessesTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class GDBProcessesTest extends BaseParametrizedTestCase {
/*
* Name of the executable
*/
@ -72,14 +71,14 @@ public class GDBProcessesTest extends BaseTestCase {
super.doAfterTest();
fProcService = null;
fServicesTracker.dispose();
if (fServicesTracker!=null) fServicesTracker.dispose();
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME);
}
@ -114,14 +113,15 @@ public class GDBProcessesTest extends BaseTestCase {
* This defaults to false, and is overridden for specific versions of gdb.
*/
protected boolean threadNamesSupported() {
return false;
return !runningOnWindows() && !isRemoteSession();
}
/*
/*
* getThreadData() for multiple threads
*/
@Test
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
// order.
for (int i = 0; i < 5; i++) {

View file

@ -4,11 +4,11 @@
* 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 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;
@ -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.EvaluateAction;
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.MIBreakpoints;
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.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.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
@RunWith(Parameterized.class)
public class GDBRemoteTracepointsTest extends BaseParametrizedTestCase {
protected DsfSession fSession;
protected DsfServicesTracker fServicesTracker;
protected IBreakpoints fBreakpointService;
@ -76,7 +73,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
protected static final String NO_CONDITION = "";
protected static final String NO_COMMANDS = "";
// private static final int LAST_LINE_NUMBER = 94;
//
//
// private static final int TOTAL_FRAMES_TO_BE_COLLECTED = 1 + 1 + 10 + 1 + 10000;
protected final static int[] PASS_COUNTS = {12, 2, 32, 6, 128, 0, 0, 0, 0, 0, 0, 0};
@ -153,8 +150,9 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@Override
public void doBeforeTest() throws Exception {
Assume.assumeTrue("Skipping non-remote", remote);
super.doBeforeTest();
fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() {
@Override
@ -164,7 +162,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
fBreakpointService = fServicesTracker.getService(IBreakpoints.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
fTracepoints = new IBreakpointDMContext[100];
@ -185,13 +183,13 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
// To test both fast and normal tracepoints, we use the FAST_THEN_NORMAL setting
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_TRACEPOINT_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_TRACEPOINT_FAST_THEN_NORMAL);
@ -200,19 +198,14 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
Runnable runnable = new Runnable() {
@Override
public void run() {
fSession.removeServiceEventListener(GDBRemoteTracepointsTest_7_0.this);
}
};
fSession.getExecutor().submit(runnable).get();
if (fSession != null)
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBRemoteTracepointsTest.this))
.get();
fBreakpointService = null;
fServicesTracker.dispose();
if (fServicesTracker != null)
fServicesTracker.dispose();
}
// *********************************************************************
// 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).
// *********************************************************************
@ -338,13 +324,13 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
}
}
protected void updateBreakpoint(final IBreakpointDMContext breakpoint, final Map<String, Object> delta)
protected void updateBreakpoint(final IBreakpointDMContext breakpoint, final Map<String, Object> delta)
throws Throwable
{
Query<Object> query = new Query<Object>() {
@Override
protected void execute(DataRequestMonitor<Object> rm) {
fBreakpointService.updateBreakpoint(breakpoint, delta, rm);
fBreakpointService.updateBreakpoint(breakpoint, delta, rm);
}
};
@ -356,7 +342,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
}
}
protected IBreakpointDMData getBreakpoint(final IBreakpointDMContext breakpoint)
protected IBreakpointDMData getBreakpoint(final IBreakpointDMContext breakpoint)
throws Throwable
{
Query<IBreakpointDMData> query = new Query<IBreakpointDMData>() {
@ -409,7 +395,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
//
// fTraceService.getExecutor().submit(new Runnable() {
// public void run() {
// fTraceService.canStartTracing(fTraceTargetDmc,
// fTraceService.canStartTracing(fTraceTargetDmc,
// new DataRequestMonitor<Boolean>(fTraceService.getExecutor(), null) {
// @Override
// protected void handleCompleted() {
@ -425,10 +411,10 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// assertTrue("Not allowed to start tracing!", (Boolean)wait.getReturnInfo());
//
// wait.waitReset();
//
//
// fTraceService.getExecutor().submit(new Runnable() {
// public void run() {
// fTraceService.startTracing(fTraceTargetDmc,
// fTraceService.startTracing(fTraceTargetDmc,
// new RequestMonitor(fTraceService.getExecutor(), null) {
// @Override
// protected void handleCompleted() {
@ -454,7 +440,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
//
// fTraceService.getExecutor().submit(new Runnable() {
// public void run() {
// fTraceService.canStopTracing(fTraceTargetDmc,
// fTraceService.canStopTracing(fTraceTargetDmc,
// new DataRequestMonitor<Boolean>(fTraceService.getExecutor(), null) {
// @Override
// protected void handleCompleted() {
@ -470,10 +456,10 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// assertTrue("Not allowed to stop tracing!", (Boolean)wait.getReturnInfo());
//
// wait.waitReset();
//
//
// fTraceService.getExecutor().submit(new Runnable() {
// public void run() {
// fTraceService.stopTracing(fTraceTargetDmc,
// fTraceService.stopTracing(fTraceTargetDmc,
// new RequestMonitor(fTraceService.getExecutor(), null) {
// @Override
// protected void handleCompleted() {
@ -493,7 +479,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
//
// fTraceService.getExecutor().submit(new Runnable() {
// public void run() {
// fTraceService.isTracing(fTraceTargetDmc,
// fTraceService.isTracing(fTraceTargetDmc,
// new DataRequestMonitor<Boolean>(fTraceService.getExecutor(), null) {
// @Override
// protected void handleCompleted() {
@ -506,17 +492,17 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
//
// wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
// assertTrue(wait.getMessage(), wait.isOK());
//
//
// return (Boolean)wait.getReturnInfo();
// }
//
//
// private ITraceStatusDMData getTraceStatus() throws InterruptedException
// {
// final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
//
// fTraceService.getExecutor().submit(new Runnable() {
// public void run() {
// fTraceService.getTraceStatus(fTraceTargetDmc,
// fTraceService.getTraceStatus(fTraceTargetDmc,
// new DataRequestMonitor<ITraceStatusDMData>(fTraceService.getExecutor(), null) {
// @Override
// protected void handleCompleted() {
@ -529,7 +515,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
//
// wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
// assertTrue(wait.getMessage(), wait.isOK());
//
//
// return (ITraceStatusDMData)wait.getReturnInfo();
// }
@ -539,7 +525,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
protected IBreakpointDMContext[] fTracepoints = null;
// private void checkTraceStatus(boolean supported, boolean active, int frames,
// private void checkTraceStatus(boolean supported, boolean active, int frames,
// STOP_REASON_ENUM reason, Integer stoppingTracepoint) throws Throwable {
// ITraceStatusDMData status = getTraceStatus();
// assertTrue("Error tracing supported should be " + supported + " but was " + status.isTracingSupported(),
@ -556,16 +542,16 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// assertTrue("Total buffer size should be positive but is " +
// status.getTotalBufferSize(),
// status.getTotalBufferSize() > 0);
//
//
// if (fTotalTracingBufferSize == 0) {
// // Initialize buffer
// fTotalTracingBufferSize = status.getTotalBufferSize();
// fTotalTracingBufferSize = status.getTotalBufferSize();
// } else {
// assertTrue("Total buffer size changed! Should be " + fTotalTracingBufferSize +
// " but got " + status.getTotalBufferSize(),
// status.getTotalBufferSize() == fTotalTracingBufferSize);
// }
//
//
// assertTrue("Expected stopping reason " + reason + " but got " + status.getStopReason(),
// status.getStopReason() == reason);
// assertTrue("Expected stopping bp " + stoppingTracepoint + " but got " + status.getStoppingTracepoint(),
@ -621,9 +607,9 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// Ensure that the tracepoints were correctly installed
MIBreakpointDMData tp = (MIBreakpointDMData) getBreakpoint(fTracepoints[i]);
assertTrue("tracepoint "+i+" is not a tracepoint but a " + tp.getBreakpointType(),
tp.getBreakpointType().equals(MIBreakpoints.TRACEPOINT));
tp.getBreakpointType().equals(MIBreakpoints.TRACEPOINT));
assertTrue("tracepoint "+i+" should be a " + (data.isFastTp?"fast":"normal")+" tracepoint but is not",
tp.getType().equals("fast tracepoint") == data.isFastTp);
tp.getType().equals("fast tracepoint") == data.isFastTp);
assertTrue("tracepoint "+i+" mismatch (wrong file name) got " + tp.getFileName(),
tp.getFileName().equals(data.sourceFile));
assertTrue("tracepoint "+i+" mismatch (wrong line number) got " + tp.getLineNumber(),
@ -642,7 +628,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
}
}
protected void checkTracepoints(boolean useCond, boolean useCount, boolean enabled, boolean useActions)
protected void checkTracepoints(boolean useCond, boolean useCount, boolean enabled, boolean useActions)
throws Throwable {
TracepointData[] dataArray = new TracepointData[] {
new TracepointData(LINE_NUMBER_1_BYTE_INSTR, useCond ? CONDITIONS[0] : NO_CONDITION, useCount ? PASS_COUNTS[0] : 0, enabled, useActions ? COLLECT_ACTIONS[0].toString() : NO_COMMANDS, false),
@ -654,19 +640,19 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
checkTracepoints(dataArray);
}
protected void createTracepoints(boolean useCond, boolean useCount, boolean enabled, boolean useActions)
throws Throwable
protected void createTracepoints(boolean useCond, boolean useCount, boolean enabled, boolean useActions)
throws Throwable
{
Map<String, Object> attributes = null;
int[] lineNumbers = {
LINE_NUMBER_1_BYTE_INSTR,
LINE_NUMBER_2_BYTE_INSTR,
LINE_NUMBER_3_BYTE_INSTR,
LINE_NUMBER_4_BYTE_INSTR,
int[] lineNumbers = {
LINE_NUMBER_1_BYTE_INSTR,
LINE_NUMBER_2_BYTE_INSTR,
LINE_NUMBER_3_BYTE_INSTR,
LINE_NUMBER_4_BYTE_INSTR,
LINE_NUMBER_5_BYTE_INSTR };
for (int i = 0; i < lineNumbers.length; i++) {
attributes = new HashMap<String, Object>();
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
@ -676,7 +662,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
if (useCount) attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[i]);
if (useCond) attributes.put(MIBreakpoints.CONDITION, CONDITIONS[i]);
if (useActions) attributes.put(MIBreakpoints.COMMANDS, COLLECT_ACTIONS[i].getName());
fTracepoints[i] = insertBreakpoint(fBreakpointsDmc, attributes);
waitForBreakpointEvent();
@ -687,12 +673,12 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
checkTracepoints(useCond, useCount, enabled, useActions);
}
/**
* This test makes sure that the tracing status is correct when we start.
* It also stores the total buffer size to be used by other tests.
* This test is being run before every other test by being called
* by the @Before method; this allows to verify every launch of GDB.
* by the @Before method; this allows to verify every launch of GDB.
*/
@Test
@Ignore
@ -706,7 +692,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
* - using a method name
* - using a filename and line number
*
* It also set a fast tracepoint by
* It also set a fast tracepoint by
*/
@Test
public void createTracepoints() throws Throwable {
@ -861,7 +847,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
*/
@Test
public void createTracepointWithMultipleCommands() throws Throwable {
String commandsNames1 = COLLECT_ACTIONS[0].getName() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
COLLECT_ACTIONS[1].getName() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
COLLECT_ACTIONS[3].getName();
@ -882,26 +868,26 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
String commandsResult3 = COLLECT_ACTIONS[4].toString() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
COLLECT_ACTIONS[0].toString() + TracepointActionManager.TRACEPOINT_ACTION_DELIMITER +
COLLECT_ACTIONS[1].toString();
String cmdNames[] = new String[] { commandsNames1, COLLECT_ACTIONS[0].getName(), commandsNames2, COLLECT_ACTIONS[2].getName(), commandsNames3 };
String cmdResults[] = new String[] { commandsResult1, COLLECT_ACTIONS[0].toString(), commandsResult2, COLLECT_ACTIONS[2].toString(), commandsResult3};
Map<String, Object> attributes = null;
int[] lineNumbers = {
LINE_NUMBER_1_BYTE_INSTR,
LINE_NUMBER_2_BYTE_INSTR,
LINE_NUMBER_3_BYTE_INSTR,
LINE_NUMBER_4_BYTE_INSTR,
int[] lineNumbers = {
LINE_NUMBER_1_BYTE_INSTR,
LINE_NUMBER_2_BYTE_INSTR,
LINE_NUMBER_3_BYTE_INSTR,
LINE_NUMBER_4_BYTE_INSTR,
LINE_NUMBER_5_BYTE_INSTR };
for (int i = 0; i < lineNumbers.length; i++) {
attributes = new HashMap<String, Object>();
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_NAME);
attributes.put(MIBreakpoints.LINE_NUMBER, lineNumbers[i]);
attributes.put(MIBreakpoints.COMMANDS, cmdNames[i]);
fTracepoints[i] = insertBreakpoint(fBreakpointsDmc, attributes);
waitForBreakpointEvent();
@ -936,7 +922,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
public void createTracepointDisabledWithCommandsConditionPasscount() throws Throwable {
createTracepoints(true, true, false, true);
}
// /**
// * This test sets the different types of tracepoints and then sets some eval actions
// */
@ -949,7 +935,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// testCreateTracepoints();
// testActions(new String[] {ACTIONS1, ACTIONS2, ACTIONS3, ""});
// }
//
//
// /**
// * This test sets the different types of tracepoints and then sets some while-stepping actions
// */
@ -964,7 +950,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// }
//
// /**
// * This test sets the different types of tracepoints and then sets a mix of different
// * This test sets the different types of tracepoints and then sets a mix of different
// * tracepoint actions
// */
// //@Test
@ -1004,7 +990,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// * - using a filename and line number
// * - using a method name
// * - using a method address
// *
// *
// * and confirms they are installed when tracing starts
// */
// @Test
@ -1016,7 +1002,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// stopTracing();
// checkTraceStatus(true, false, TOTAL_FRAMES_TO_BE_COLLECTED);
// }
//
//
// /**
// * This test sets the different types of tracepoints and then deletes them
// * and confirms they are not installed when tracing starts
@ -1064,7 +1050,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// testTracepointPasscount();
// startTracing();
// SyncUtil.SyncRunToLocation(Integer.toString(LAST_LINE_NUMBER));
//
//
// checkTraceStatus(true, false,
// 1 + 1 + 10 + 1 + PASS_COUNTS[4],
// STOP_REASON_ENUM.PASSCOUNT, 6);
@ -1085,7 +1071,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
//
// startTracing();
// SyncUtil.SyncRunToLocation(Integer.toString(LAST_LINE_NUMBER));
//
//
// checkTraceStatus(true, false,
// 1 + 1 + 10 + 1,
// STOP_REASON_ENUM.PASSCOUNT, 5);
@ -1099,7 +1085,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// public void testTracepointConditionAndRun() throws Throwable {
// // Use trace state variables and stuff
// }
//
//
// /**
// * This test sets the different types of tracepoints and then sets some collect actions
// * and confirms the proper information is collected
@ -1128,7 +1114,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
// }
//
// /**
// * This test sets the different types of tracepoints and then sets a mix of different
// * This test sets the different types of tracepoints and then sets a mix of different
// * tracepoint actions and confirms the proper information is collected
// */
// //@Test
@ -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

@ -4,7 +4,7 @@
* 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
* Marc Khouzam (Ericsson) - Tests for GDB 7.4
@ -14,7 +14,6 @@ package org.eclipse.cdt.tests.dsf.gdb.tests;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
public interface ITestConstants {
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_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_10 = "7.10";
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
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;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assert.*;
import java.io.File;
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.model.ICBreakpointType;
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.IExpressions;
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.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.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
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.mi.service.MIExpressions;
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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.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.SyncUtil;
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.model.IProcess;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest extends BaseTestCase {
@RunWith(Parameterized.class)
@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 int FIRST_LINE_IN_MAIN = 27;
@ -115,9 +126,9 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
// Restart the program if we are testing such a case
if (fRestart) {
synchronized (this) {
wait(1000);
wait(1000); // XXX: horrible hack, what are we waiting for?
}
fRestart = false;
fRestart = false;
SyncUtil.restart(getGDBLaunch());
}
}
@ -215,8 +226,9 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
* 17^done
*/
@Test
@Ignore
public void testSourceGdbInit() throws Throwable {
assumeGdbVersionAtLeast("7.2");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
"data/launch/src/launchConfigTestGdbinit");
doLaunch();
@ -274,8 +286,8 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
* Repeat the test testSourceGdbInit, but after a restart.
*/
@Test
@Ignore
public void testSourceGdbInitRestart() throws Throwable {
assumeGdbVersionAtLeast("7.2");
fRestart = true;
testSourceGdbInit();
}
@ -743,6 +755,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
*/
@Test
public void testExitCodeSet() throws Throwable {
assumeGdbVersionAtLeast("7.3");
doLaunch();
ServiceEventWaitor<ICommandControlShutdownDMEvent> shutdownEventWaitor = new ServiceEventWaitor<ICommandControlShutdownDMEvent>(
@ -779,4 +792,305 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
}
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
if (fSession != null) {
// Clear the references (not strictly necessary)
Runnable runnable = new Runnable() {
@Override
public void run() {
fRunControl.getSession().removeServiceEventListener(MIBreakpointsTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
fSession.getExecutor().submit(()->fRunControl.getSession().removeServiceEventListener(MIBreakpointsTest.this)).get();
}
fBreakpointService = 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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64;
@ -44,6 +43,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/*
* 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.
*/
@RunWith(BackgroundRunner.class)
public class MIDisassemblyTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class MIDisassemblyTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "MemoryTestApp.exe";
private static final String SOURCE_NAME = "MemoryTestApp.cc";
private static final int LINE_NUMBER = 35;
@ -119,8 +119,10 @@ public class MIDisassemblyTest extends BaseTestCase {
fExpressionService = null;
fDisassembly = null;
fServicesTracker.dispose();
fServicesTracker = null;
if (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.DsfSession;
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.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
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.launching.TestsPlugin;
@ -64,9 +63,10 @@ import org.eclipse.core.runtime.Status;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class MIExpressionsTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class MIExpressionsTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "ExpressionTestApp.exe";
private DsfSession fSession;
@ -110,16 +110,13 @@ public class MIExpressionsTest extends BaseTestCase {
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
Runnable runnable = new Runnable() {
@Override
public void run() {
fSession.removeServiceEventListener(MIExpressionsTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
fExpService = null;
fServicesTracker.dispose();
if (fSession != null) {
fSession.getExecutor().submit(()->fSession.removeServiceEventListener(MIExpressionsTest.this)).get();
}
fExpService = null;
if (fServicesTracker != null) {
fServicesTracker.dispose();
}
}
// Handles ExpressionChangedEvent
@ -314,6 +311,7 @@ public class MIExpressionsTest extends BaseTestCase {
*/
@Test
public void testChildren() throws Throwable {
assumeGdbVersionAtLeast("6.7");
// Get the children of some variables
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testChildren");
@ -1831,6 +1829,9 @@ public class MIExpressionsTest extends BaseTestCase {
*/
@Test
public void testDeleteChildren() throws Throwable {
assumeGdbVersionAtLeast("6.7");
assumeGdbVersionLowerThen("7.3");
SyncUtil.runToLocation("testDeleteChildren");
MIStoppedEvent stoppedEvent = SyncUtil.step(1, StepType.STEP_OVER);
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
@ -2885,6 +2886,7 @@ public class MIExpressionsTest extends BaseTestCase {
*/
@Test
public void testCanWriteLValue() throws Throwable {
assumeGdbVersionAtLeast("6.8");
MIStoppedEvent stoppedEvent = SyncUtil.runToLocation("testCanWrite"); // Re-use test
final IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
@ -3461,6 +3463,8 @@ public class MIExpressionsTest extends BaseTestCase {
*/
@Test
public void testRTTI() throws Throwable {
assumeGdbVersionNot("6.7"); // crashing
assumeGdbVersionLowerThen("7.5");
SyncUtil.runToLocation("testRTTI");
MIStoppedEvent stoppedEvent = SyncUtil.step(3, StepType.STEP_OVER);
IFrameDMContext frameDmc = SyncUtil.getStackFrame(stoppedEvent.getDMContext(), 0);
@ -4257,4 +4261,198 @@ public class MIExpressionsTest extends BaseTestCase {
assertEquals(expectedType, 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.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.MemoryByteBuffer;
import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
@ -53,22 +52,23 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/*
* This is the Memory Service test suite.
*
*
* It is meant to be a regression suite to be executed automatically against
* the DSF nightly builds.
*
*
* It is also meant to be augmented with a proper test case(s) every time a
* feature is added or in the event (unlikely :-) that a bug is found in the
* Memory Service.
*
*
* Refer to the JUnit4 documentation for an explanation of the annotations.
*/
@RunWith(BackgroundRunner.class)
public class MIMemoryTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class MIMemoryTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "MemoryTestApp.exe";
private DsfSession fSession;
@ -98,7 +98,7 @@ public class MIMemoryTest extends BaseTestCase {
@Override
public void doBeforeTest() throws Exception {
super.doBeforeTest();
fSession = getGDBLaunch().getSession();
fMemoryDmc = (IMemoryDMContext)SyncUtil.getContainerContext();
assert(fMemoryDmc != null);
@ -141,21 +141,15 @@ public class MIMemoryTest extends BaseTestCase {
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
// Clear the references (not strictly necessary)
Runnable runnable = new Runnable() {
@Override
public void run() {
fSession.removeServiceEventListener(MIMemoryTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
fBaseAddress = null;
if (fSession != null)
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(MIMemoryTest.this)).get();
fBaseAddress = null;
fExpressionService = null;
fMemoryService = null;
fRunControl = null;
fServicesTracker.dispose();
if (fServicesTracker != null)
fServicesTracker.dispose();
fServicesTracker = null;
clearEventCounters();
}
@ -169,7 +163,7 @@ public class MIMemoryTest extends BaseTestCase {
* ------------------------------------------------------------------------
* Processes MemoryChangedEvents.
* First checks if the memory block base address was set so the individual
* test can control if it wants to verify the event(s).
* test can control if it wants to verify the event(s).
* ------------------------------------------------------------------------
* @param e The MemoryChangedEvent
* ------------------------------------------------------------------------
@ -812,7 +806,7 @@ public class MIMemoryTest extends BaseTestCase {
}
// Write an initialized memory block
ByteBuffer buffer = ByteBuffer.allocate(count * fWordSize);
ByteBuffer buffer = ByteBuffer.allocate(count * fWordSize);
for (int i = 0; i < count; i++) {
buffer.put(valueToBytes(i));
}

View file

@ -179,7 +179,7 @@ public class MIRegistersTest extends BaseParametrizedTestCase {
public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose();
if (fServicesTracker!=null) fServicesTracker.dispose();
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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/**
* Tests MIRunControl class for for the execWhileTargetAvailable() method.
*/
@RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class MIRunControlTargetAvailableTest extends BaseParametrizedTestCase {
private static final String TIMEOUT_MESSAGE = "Timeout";
@ -89,7 +89,7 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase {
public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose();
if (fServicesTracker!=null) fServicesTracker.dispose();
}
@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.DsfSession;
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.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseParametrizedTestCase;
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.launching.TestsPlugin;
@ -60,13 +59,14 @@ import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/**
* Tests MIRunControl class for Multi-threaded application.
*/
@RunWith(BackgroundRunner.class)
public class MIRunControlTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class MIRunControlTest extends BaseParametrizedTestCase {
/**
* 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 {
super.doAfterTest();
fServicesTracker.dispose();
if (fServicesTracker!=null) fServicesTracker.dispose();
}
@Override
@ -363,7 +363,7 @@ public class MIRunControlTest extends BaseTestCase {
/*
* 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.service.DsfServicesTracker;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
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.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
@ -44,6 +43,7 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
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
* is running.
*/
@RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class OperationsWhileTargetIsRunningTest extends BaseParametrizedTestCase {
private static final String TIMEOUT_MESSAGE = "Timeout";
@ -103,7 +103,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose();
if (fServicesTracker!=null) fServicesTracker.dispose();
// Restore the different preferences we might have changed
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.DsfSession;
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.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.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64;
@ -53,9 +52,10 @@ import org.eclipse.debug.core.model.MemoryByte;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class PostMortemCoreTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class PostMortemCoreTest extends BaseParametrizedTestCase {
private static final String EXEC_NAME = "ExpressionTestApp.exe";
private static final String INVALID_CORE_NAME = "MultiThread.exe";
private static final String CORE_NAME = "core";
@ -126,13 +126,7 @@ public class PostMortemCoreTest extends BaseTestCase {
super.doAfterTest();
if (fSession != null) {
Runnable runnable = new Runnable() {
@Override
public void run() {
fSession.removeServiceEventListener(PostMortemCoreTest.this);
}
};
fSession.getExecutor().submit(runnable).get();
fSession.getExecutor().submit(()->fSession.removeServiceEventListener(PostMortemCoreTest.this)).get();
}
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.IFrameDMData;
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.mi.service.command.CommandFactory;
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.DsfSession;
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.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.IResource;
import org.eclipse.core.resources.IStorage;
@ -83,15 +82,16 @@ import org.eclipse.debug.core.sourcelookup.containers.DirectorySourceContainer;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/**
* Tests that interaction with source lookups works as expected.
*
*
* All of these tests use one of SourceLookup*.exe that was built from a file
* that was "moved" since build time. At build time the SourceLookup.cc file was
* located in the {@link #BUILD_PATH} directory, but it is now located in the
* {@link BaseTestCase#SOURCE_PATH} directory.
*
*
* The wild card in SourceLookup*.exe can be one of the following to cover the
* different effective types of source lookups that need to be done depending on
* how the program was compiled. Each of these options produces different debug
@ -110,16 +110,16 @@ import org.junit.runner.RunWith;
* </ul>
* In addition, there can also be a <b>Dwarf2</b> in the name. That means it is
* designed to run with GDB <= 7.4, see comment in Makefile for OLDDWARFFLAGS.
*
*
* The result of the variations on compilation arguments means that some of the
* tests are parameterised.
*
*
* Some of the CDT source lookup features require newer versions of GDB than
* others, therefore the relevant tests are ignored as needed in the subclasses
* of {@link SourceLookupTest}.
*/
@RunWith(BackgroundRunner.class)
public class SourceLookupTest extends BaseTestCase {
@RunWith(Parameterized.class)
public class SourceLookupTest extends BaseParametrizedTestCase {
protected static final String BUILD_PATH = "data/launch/build/";
protected static final String BUILD2_PATH = "data/launch/build2/";
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.
*/
protected void setExeNames() {
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$
String gdbVersion = getGdbVersion();
// has to be strictly lower
boolean isLower = LaunchUtils.compareVersions("7.4", gdbVersion) > 0;
if (isLower) {
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();
@ -403,10 +414,10 @@ public class SourceLookupTest extends BaseTestCase {
/**
* Mapping test common.
*
*
* If backend is used for mapping then every layer should be able to find
* source.
*
*
* If backned is not used for mapping then only once the source lookup
* director gets involved should the source be found as GDB will not know
* how to find it on its own.
@ -456,6 +467,7 @@ public class SourceLookupTest extends BaseTestCase {
*/
@Test
public void sourceMappingAC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_AC_NAME, false);
}
@ -474,6 +486,7 @@ public class SourceLookupTest extends BaseTestCase {
*/
@Test
public void sourceMappingAN() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_AN_NAME, false);
}
@ -493,6 +506,7 @@ public class SourceLookupTest extends BaseTestCase {
*/
@Test
public void sourceMappingRC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_RC_NAME, false);
}
@ -511,6 +525,7 @@ public class SourceLookupTest extends BaseTestCase {
*/
@Test
public void sourceMappingRN() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMapping(EXEC_RN_NAME, false);
}
@ -530,6 +545,7 @@ public class SourceLookupTest extends BaseTestCase {
*/
@Test
public void sourceMappingBreakpointsAC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMappingBreakpoints(EXEC_AC_NAME, false);
}
@ -568,6 +584,7 @@ public class SourceLookupTest extends BaseTestCase {
*/
@Test
public void sourceMappingBreakpointsRC() throws Throwable {
assumeGdbVersionAtLeast("7.6");
sourceMappingBreakpoints(EXEC_RC_NAME, false);
}
@ -683,7 +700,7 @@ public class SourceLookupTest extends BaseTestCase {
* Test that if the user changes the source mappings in the middle of a
* debug session (e.g. with CSourceNotFoundEditor) that the lookups are
* updated.
*
*
* This version is for a new source mapping where there wasn't one
* previously.
*/
@ -724,12 +741,13 @@ public class SourceLookupTest extends BaseTestCase {
* Test with default source locators and a {@link DirectorySourceContainer}
* for SOURCE_ABSPATH that GDB does not locate the file, but the source
* lookup director and the source lookup service do find the file.
*
*
* This test does not work with modern GDBs because the path passed into
* DirectorySourceContainer is an absolute path. See versioned test suites.
*/
@Test
public void directorySource() throws Throwable {
assumeGdbVersionLowerThen("7.6");
DirectorySourceContainer container = new DirectorySourceContainer(new Path(SOURCE_ABSPATH), false);
setSourceContainer(container);
doLaunch(EXEC_PATH + EXEC_RC_NAME);
@ -739,7 +757,7 @@ public class SourceLookupTest extends BaseTestCase {
/**
* Create an IBinary with the minimum necessary for use in
* org.eclipse.cdt.debug.internal.core.srcfinder.CSourceFinder.
*
*
* A mock is used to avoid having to set up the significant of glue
* necessary to create a real IBinary. All that CSourceFinder needs is the
* path to the file.
@ -808,7 +826,7 @@ public class SourceLookupTest extends BaseTestCase {
/**
* Test the CSourceFinder's use of source lookup when there is an active
* launch.
*
*
* In this case, the DSF specific director created as part of the launch
* gets used.
*/
@ -831,7 +849,7 @@ public class SourceLookupTest extends BaseTestCase {
/**
* Test the CSourceFinder's use of source lookup when there is a terminated
* launch.
*
*
* In this case, the DSF specific director created as part of the launch
* gets used.
*/
@ -856,7 +874,7 @@ public class SourceLookupTest extends BaseTestCase {
/**
* Test the CSourceFinder's use of source lookup when there is a not active
* launch, but a launch configuration that can be used.
*
*
* In this case, the c general director created as part of the launch gets
* used.
*/

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

View file

@ -11,6 +11,11 @@
package org.eclipse.cdt.tests.dsf.gdb.tests;
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.runner.RunWith;
import org.junit.runners.Suite;
@ -21,18 +26,41 @@ import org.junit.runners.Suite;
* If you running this from IDE use java var to control version like this -Dcdt.tests.dsf.gdb.versions=gdb.7.7,gdbserver.7.7
* If you don't it will run default gdb (without version postfix) for new tests. It will run 7.11 for all non-converted tests.
*
* If you adding a new test class do not use gdb version naming.
* If you adding a new test class do not use gdb version naming.
* Use flat version extending BaseParametrizedTestCase see {@link MIBreakpointsTest}
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
// new style tests
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIRegistersTest.class,
/* Add your test class here */
// new style tests
MIBreakpointsTest.class,
MICatchpointsTest.class,
MIRegistersTest.class,
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 {
@BeforeClass
public static void before() {
// 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.
*******************************************************************************/
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.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.DsfSession;
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.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
@ -59,10 +58,13 @@ import org.junit.After;
import org.junit.AfterClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.junit.runners.Parameterized;
@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 EXEC_NAME = "TracepointTestApp.exe";
@ -81,15 +83,12 @@ public class TraceFileTest_7_4 extends BaseTestCase {
private IBreakpointsTargetDMContext fBreakpointsDmc;
private ITraceTargetDMContext fTraceTargetDmc;
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4);
}
@Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.4");
removeTeminatedLaunchesBeforeTest();
// Suppress settings of the launch attributes and launching.
// Suppress settings of the launch attributes and launching.
// Each test sets its own launch attributes
}
@ -104,7 +103,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
System.out.println("ERROR: Failed to delete all breakpoints");
}
}
@Override
@After
public void doAfterTest() throws Exception {
@ -142,30 +141,30 @@ public class TraceFileTest_7_4 extends BaseTestCase {
MIBreakpointDMContext bptDMC = setBreakpointAtEndLine();
startTracing();
MIStoppedEvent stoppedEvent = SyncUtil.resumeUntilStopped();
assertTrue(stoppedEvent instanceof MIBreakpointHitEvent
assertTrue(stoppedEvent instanceof MIBreakpointHitEvent
&& ((MIBreakpointHitEvent)stoppedEvent).getNumber() == bptDMC.getReference());
stopTracing();
saveTraceData();
}
/**
* This test removes all existing tracepoint actions and tracepoints
* and verifies that corresponding platform tracepoints with the proper
* This test removes all existing tracepoint actions and tracepoints
* and verifies that corresponding platform tracepoints with the proper
* actions are created.
*/
@Test
public void b_testTraceFile() throws Throwable {
// Make sure that there are no tracepoint actions and no platform breakpoints in the workspace.
deleteActionsAndBreakpoints();
startTraceFileSession();
// Verify that required tracepoints and new tracepoint actions are created.
checkActionsAndTracepoints();
}
/**
* This test verifies that the tracepoint actions and platform tracepoints
* created by 'testTraceFile()' are associated with the corresponding target
* This test verifies that the tracepoint actions and platform tracepoints
* created by 'testTraceFile()' are associated with the corresponding target
* tracepoints and are not created a second time.
*/
@Test
@ -209,7 +208,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
private static void deleteActionsAndBreakpoints() throws Throwable {
TracepointActionManager tam = TracepointActionManager.getInstance();
IBreakpointManager bm = DebugPlugin.getDefault().getBreakpointManager();
// Delete all existing actions
@SuppressWarnings( "unchecked" )
ArrayList<ITracepointAction> actions = (ArrayList<ITracepointAction>)tam.getActions().clone();
@ -245,16 +244,16 @@ public class TraceFileTest_7_4 extends BaseTestCase {
TracepointActionManager tam = TracepointActionManager.getInstance();
assertTrue(SOURCE_NAME.equals(new Path(tracepoint.getFileName()).lastSegment()));
assertTrue(LINE_NUMBER_1 == tracepoint.getLineNumber() || LINE_NUMBER_2 == tracepoint.getLineNumber());
String[] actionNames =
String[] actionNames =
((String)tracepoint.getMarker().getAttribute(BreakpointActionManager.BREAKPOINT_ACTION_ATTRIBUTE)).split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
for (String name : actionNames) {
for (String name : actionNames) {
ITracepointAction a = tam.findAction(name);
assertNotNull(a);
if (a instanceof EvaluateAction) {
assertTrue(TEVAL_STRING.equals(((EvaluateAction)a).getEvalString()));
}
if (a instanceof CollectAction) {
assertTrue(COLLECT_STRING1.equals(((CollectAction)a).getCollectString())
assertTrue(COLLECT_STRING1.equals(((CollectAction)a).getCollectString())
|| COLLECT_STRING2.equals(((CollectAction)a).getCollectString()));
}
}
@ -262,17 +261,17 @@ public class TraceFileTest_7_4 extends BaseTestCase {
private void startRemoteSession() throws Throwable {
// Set launch attributes
super.setLaunchAttributes();
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_TRACEPOINT_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_TRACEPOINT_MODE_DEFAULT);
// Start the session
doLaunch();
// Initialize
fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() {
@ -294,18 +293,18 @@ public class TraceFileTest_7_4 extends BaseTestCase {
private void startTracing() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
fSession.getExecutor().submit(new Runnable() {
fSession.getExecutor().submit(new Runnable() {
@Override
public void run() {
fTraceService.getTraceStatus(
fTraceTargetDmc,
fTraceTargetDmc,
new DataRequestMonitor<ITraceStatusDMData>(fSession.getExecutor(), null) {
@Override
@ConfinedToDsfExecutor("fExecutor")
protected void handleCompleted() {
if (isSuccess() && getData().isTracingSupported()) {
fTraceService.startTracing(
fTraceTargetDmc,
fTraceService.startTracing(
fTraceTargetDmc,
new RequestMonitor(fSession.getExecutor(), null) {
@Override
@ConfinedToDsfExecutor("fExecutor")
@ -320,18 +319,18 @@ public class TraceFileTest_7_4 extends BaseTestCase {
}
});
}
});
});
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
assertTrue(wait.getMessage(), wait.isOK());
}
private void stopTracing() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
fSession.getExecutor().submit(new Runnable() {
fSession.getExecutor().submit(new Runnable() {
@Override
public void run() {
fTraceService.stopTracing(
fTraceTargetDmc,
fTraceService.stopTracing(
fTraceTargetDmc,
new RequestMonitor(fSession.getExecutor(), null) {
@Override
@ConfinedToDsfExecutor("fExecutor")
@ -340,7 +339,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
}
});
}
});
});
wait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER);
assertTrue(wait.getMessage(), wait.isOK());
}
@ -357,18 +356,18 @@ public class TraceFileTest_7_4 extends BaseTestCase {
private void setTracepoints() throws Throwable {
TracepointActionManager tam = TracepointActionManager.getInstance();
CollectAction collectAction1 = new CollectAction();
collectAction1.setCollectString(COLLECT_STRING1);
collectAction1.setName(String.format("Collect %s", COLLECT_STRING1));
tam.addAction(collectAction1);
CollectAction collectAction2 = new CollectAction();
collectAction2.setCollectString(COLLECT_STRING2);
collectAction2.setName(String.format("Collect %s", COLLECT_STRING2));
tam.addAction(collectAction2);
EvaluateAction evalAction = new EvaluateAction();
evalAction.setEvalString(TEVAL_STRING);
evalAction.setName(String.format("Evaluate %s", TEVAL_STRING));
@ -380,10 +379,10 @@ public class TraceFileTest_7_4 extends BaseTestCase {
attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
attributes.put(MIBreakpoints.COMMANDS, evalAction.getName());
insertBreakpoint(fBreakpointsDmc, attributes);
attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_2);
attributes.put(MIBreakpoints.COMMANDS,
String.format("%s%s%s", collectAction1.getName(),
attributes.put(MIBreakpoints.COMMANDS,
String.format("%s%s%s", collectAction1.getName(),
TracepointActionManager.TRACEPOINT_ACTION_DELIMITER, collectAction2.getName()));
insertBreakpoint(fBreakpointsDmc, attributes);
}
@ -422,9 +421,9 @@ public class TraceFileTest_7_4 extends BaseTestCase {
@Override
public void run() {
fTraceService.saveTraceData(
fTraceTargetDmc,
traceFile.getAbsolutePath(),
false,
fTraceTargetDmc,
traceFile.getAbsolutePath(),
false,
new RequestMonitor(fSession.getExecutor(), null) {
@Override
protected void handleCompleted() {

View file

@ -4,30 +4,37 @@
* 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;
package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
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.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class MIExpressionsNonStopTest_7_0 extends MIExpressionsTest_7_0 {
@RunWith(Parameterized.class)
public class MIExpressionsNonStopTest extends MIExpressionsTest {
@BeforeClass
public static void beforeClass() {
Assume.assumeTrue(supportsNonStop());
}
@Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest();
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
}

View file

@ -4,31 +4,41 @@
* 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;
package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
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.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class MIRunControlNonStopTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_7_0 {
@RunWith(Parameterized.class)
public class MIRunControlNonStopTargetAvailableTest extends MIRunControlTargetAvailableTest {
@BeforeClass
public static void beforeClass() {
Assume.assumeTrue(supportsNonStop());
}
@Override
public void doBeforeTest() throws Exception {
assumeGdbVersionAtLeast("7.0");
super.doBeforeTest();
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
}
@Test
public void checknothing(){
}
}

View file

@ -4,22 +4,22 @@
* 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;
package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
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.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_1 {
@RunWith(Parameterized.class)
public class OperationsWhileTargetIsRunningNonStopTest extends OperationsWhileTargetIsRunningTest {
@BeforeClass
public static void beforeClass() {
Assume.assumeTrue(supportsNonStop());
@ -28,7 +28,16 @@ public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTarg
@Override
protected void 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

@ -4,30 +4,40 @@
* 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_2;
package org.eclipse.cdt.tests.dsf.gdb.tests.nonstop;
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.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(BackgroundRunner.class)
public class StepIntoSelectionNonStopTest_7_2 extends StepIntoSelectionTest_7_2 {
@RunWith(Parameterized.class)
public class StepIntoSelectionNonStopTest extends StepIntoSelectionTest {
@BeforeClass
public static void beforeClass() {
Assume.assumeTrue(supportsNonStop());
}
@Override
@Override
protected void 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