1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +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.
*/
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) {
GdbDebugOptions.trace("===============================================================================================\n");
@ -394,8 +394,7 @@ public class BaseTestCase {
return;
}
if (launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE)
.equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE)) {
if (isRemoteSession()) {
if (launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP).equals(Boolean.TRUE)) {
String server = (String)launchAttributes.get(ATTR_DEBUG_SERVER_NAME);
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.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -2843,7 +2844,14 @@ public class MIBreakpointsTest extends BaseTestCase {
// ------------------------------------------------------------------------
@Test
public void updateBreakpoint_AfterRestart() throws Throwable {
try {
// 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 {
// 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.
queueConsoleCommand(String.format("break %s:%d", SOURCE_NAME, LINE_NUMBER_5));