1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Disable restart test in case of remote debugging

Change-Id: I08310791fe23c31219ea0e6ae26ea7f0a14eeff7
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2015-06-24 15:53:02 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 10079aca6b
commit 5028a94396
2 changed files with 11 additions and 4 deletions

View file

@ -303,7 +303,7 @@ public class BaseTestCase {
* Launch GDB. The launch attributes must have been set already. * Launch GDB. The launch attributes must have been set already.
*/ */
protected void doLaunch() throws Exception { protected void doLaunch() throws Exception {
boolean remote = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE).equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE); boolean remote = isRemoteSession();
if (GdbDebugOptions.DEBUG) { if (GdbDebugOptions.DEBUG) {
GdbDebugOptions.trace("===============================================================================================\n"); GdbDebugOptions.trace("===============================================================================================\n");
@ -394,8 +394,7 @@ public class BaseTestCase {
return; return;
} }
if (launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE) if (isRemoteSession()) {
.equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE)) {
if (launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP).equals(Boolean.TRUE)) { if (launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP).equals(Boolean.TRUE)) {
String server = (String)launchAttributes.get(ATTR_DEBUG_SERVER_NAME); String server = (String)launchAttributes.get(ATTR_DEBUG_SERVER_NAME);
String port = (String)launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_PORT); String port = (String)launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_PORT);

View file

@ -64,6 +64,7 @@ import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager; import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint; import org.eclipse.debug.core.model.IBreakpoint;
import org.junit.Assert;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -2843,6 +2844,13 @@ public class MIBreakpointsTest extends BaseTestCase {
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
@Test @Test
public void updateBreakpoint_AfterRestart() throws Throwable { public void updateBreakpoint_AfterRestart() throws Throwable {
// Restart is not supported for a remote session
if (isRemoteSession()) {
Assert.assertFalse("Restart operation should not be allowed for a remote session",
SyncUtil.canRestart());
return;
}
try { try {
// Create a line breakpoint in the platform. To do that, create a bp from // Create a line breakpoint in the platform. To do that, create a bp from
// the gdb console and let CDT create the corresponding platform bp. // the gdb console and let CDT create the corresponding platform bp.