Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2011-05-06 20:20:53 +0000
committerMarc Khouzam2011-05-06 20:20:53 +0000
commite4320d05fcc5622d9f874ea324e477853cad9d99 (patch)
treeba1d888c1b19ccca97c8085c549cb318ede9661b /dsf-gdb/org.eclipse.cdt.tests.dsf.gdb
parent7273934121a7d2ef94fdf690daa85b04bf85367d (diff)
downloadorg.eclipse.cdt-e4320d05fcc5622d9f874ea324e477853cad9d99.tar.gz
org.eclipse.cdt-e4320d05fcc5622d9f874ea324e477853cad9d99.tar.xz
org.eclipse.cdt-e4320d05fcc5622d9f874ea324e477853cad9d99.zip
Bug 345026: JUnit tests to test operations while the target is running
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.tests.dsf.gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/ServiceEventWaitor.java9
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java11
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuitesRemote.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java326
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java1
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java27
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java26
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java2
30 files changed, 664 insertions, 4 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/ServiceEventWaitor.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/ServiceEventWaitor.java
index 60d64529ef5..755e82a568a 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/ServiceEventWaitor.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/ServiceEventWaitor.java
@@ -157,7 +157,14 @@ public class ServiceEventWaitor<V> {
}
}
- return fEvent;
+ // Mark that we have consumed the event.
+ // This will allow to wait for the next similar event.
+ // For example, for a restart, there could be more than one
+ // stopped event, and we need to wait for the second one.
+ V event = fEvent;
+ fEvent = null;
+
+ return event;
}
/*
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
index 79e64799079..997ce670643 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
@@ -47,6 +47,7 @@ import org.eclipse.cdt.dsf.mi.service.IMIRunControl;
import org.eclipse.cdt.dsf.mi.service.MIStack;
import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.mi.service.command.events.MIRunningEvent;
+import org.eclipse.cdt.dsf.mi.service.command.events.MISignalEvent;
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakListInfo;
@@ -587,7 +588,7 @@ public class SyncUtil {
/**
* Restart the program.
*/
- public static void restart(final GdbLaunch launch) throws Throwable {
+ public static MIStoppedEvent restart(final GdbLaunch launch) throws Throwable {
final IContainerDMContext containerDmc = getContainerContext();
// Check if restart is allowed
@@ -636,6 +637,12 @@ public class SyncUtil {
fGdbControl.getExecutor().execute(query2);
query2.get(500, TimeUnit.MILLISECONDS);
- eventWaitor.waitForEvent(DefaultTimeouts.get(ETimeout.waitForStop));
+
+ MIStoppedEvent event = eventWaitor.waitForEvent(DefaultTimeouts.get(ETimeout.waitForStop));
+ if (event instanceof MISignalEvent) {
+ // This is not the stopped event we were waiting for. Get the next one.
+ event = eventWaitor.waitForEvent(DefaultTimeouts.get(ETimeout.waitForStop));
+ }
+ return event;
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuitesRemote.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuitesRemote.java
index 9b2daea1f59..78ed63c9c6f 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuitesRemote.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuitesRemote.java
@@ -15,6 +15,8 @@ import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.Suite_Remote_6_7;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.Suite_Remote_6_8;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.Suite_Remote_7_0;
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_2.Suite_Remote_7_2;
+import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.Suite_Remote_7_3;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -34,6 +36,8 @@ import org.junit.runners.Suite;
Suite_Remote_6_8.class,
Suite_Remote_7_0.class,
Suite_Remote_7_1.class,
+ Suite_Remote_7_2.class,
+ Suite_Remote_7_3.class,
/* Add your suite class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java
index 9d352dd25d4..141cae39e2a 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Ericsson and others.
+ * Copyright (c) 2009, 2011 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
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
+import org.eclipse.cdt.dsf.mi.service.command.commands.Suite_Sessionless_Tests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -27,6 +28,7 @@ import org.junit.runners.Suite;
LaunchUtilsTest.class,
MIRegistersTest.class,
MIRunControlTest.class,
+ MIRunControlTargetAvailableTest.class,
MIExpressionsTest.class,
MIMemoryTest.class,
MIBreakpointsTest.class,
@@ -34,6 +36,8 @@ import org.junit.runners.Suite;
MIDisassemblyTest.class,
GDBProcessesTest.class,
LaunchConfigurationAndRestartTest.class,
+ OperationsWhileTargetIsRunningTest.class,
+ Suite_Sessionless_Tests.class,
/* Add your suite class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java
new file mode 100644
index 00000000000..6439b22acf3
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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;
+
+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.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExitedDMEvent;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
+import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants;
+import org.eclipse.cdt.dsf.gdb.service.IGDBProcesses;
+import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl;
+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.ServiceEventWaitor;
+import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
+import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+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 {
+
+ private static final String TIMEOUT_MESSAGE = "Timeout";
+
+ private DsfServicesTracker fServicesTracker;
+ private IGDBProcesses fProcesses;
+ private IMIContainerDMContext fContainerDmc;
+ private IGDBControl fControl;
+
+ /*
+ * Path to executable
+ */
+ private static final String EXEC_PATH = "data/launch/bin/";
+ /*
+ * Name of the executable
+ */
+ private static final String EXEC_NAME = "TargetAvail.exe";
+
+ @Before
+ public void init() throws Exception {
+ final DsfSession session = getGDBLaunch().getSession();
+
+ Runnable runnable = new Runnable() {
+ public void run() {
+ fServicesTracker =
+ new DsfServicesTracker(TestsPlugin.getBundleContext(),
+ session.getId());
+
+ fProcesses = fServicesTracker.getService(IGDBProcesses.class);
+ fControl = fServicesTracker.getService(IGDBControl.class);
+ }
+ };
+ session.getExecutor().submit(runnable).get();
+
+ fContainerDmc = (IMIContainerDMContext)SyncUtil.getContainerContext();
+
+ }
+
+
+ @After
+ public void tearDown() {
+ fServicesTracker.dispose();
+ }
+
+ @BeforeClass
+ public static void beforeClassMethod() {
+ setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
+ EXEC_PATH + EXEC_NAME);
+ }
+
+ /**
+ * Test that the restart operation works properly while the target is running, and
+ * with the option to kill GDB after the process terminate enabled.
+ */
+ @Test
+ public void restartWhileTargetRunningKillGDB() throws Throwable {
+ // First set the preference to kill GDB (although it should not happen in this test)
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.cdt.dsf.gdb.ui");
+ node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, true);
+
+ // The target is currently stopped. We resume to get it running
+ // then we do the restart, and confirm we are then stopped on main
+ SyncUtil.resume();
+ MIStoppedEvent stoppedEvent = SyncUtil.restart(getGDBLaunch());
+
+ String func = stoppedEvent.getFrame().getFunction();
+ Assert.assertTrue("Expected to be stopped at main, but is stopped at " + func,
+ "main".equals(func));
+
+ // Now make sure GDB is still alive
+ Assert.assertTrue("GDB should have been still alive", fControl.isActive());
+ }
+
+ /**
+ * Test that the restart operation works properly while the target is running, and
+ * with the option to kill GDB after the process terminate disabled.
+ */
+ @Test
+ public void restartWhileTargetRunningGDBAlive() throws Throwable {
+ // First set the preference not to kill gdb
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.cdt.dsf.gdb.ui");
+ node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, false);
+
+ // The target is currently stopped. We resume to get it running
+ // then we do the restart, and confirm we are then stopped on main
+ SyncUtil.resume();
+ MIStoppedEvent stoppedEvent = SyncUtil.restart(getGDBLaunch());
+
+ String func = stoppedEvent.getFrame().getFunction();
+ Assert.assertTrue("Expected to be stopped at main, but is stopped at " + func,
+ "main".equals(func));
+
+ // Now make sure GDB is still alive
+ Assert.assertTrue("GDB should have been still alive", fControl.isActive());
+ }
+
+ /**
+ * Test that the terminate operation works properly while the target is running, and
+ * with the option to kill GDB after the process terminate enabled.
+ */
+ @Test
+ public void terminateWhileTargetRunningKillGDB() throws Throwable {
+ // First set the preference to kill GDB
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.cdt.dsf.gdb.ui");
+ node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, true);
+
+ // The target is currently stopped. We resume to get it running
+ // then we terminate, and confirm that we shutdown right away
+ SyncUtil.resume();
+
+ ServiceEventWaitor<ICommandControlShutdownDMEvent> shutdownEventWaitor = new ServiceEventWaitor<ICommandControlShutdownDMEvent>(
+ getGDBLaunch().getSession(),
+ ICommandControlShutdownDMEvent.class);
+
+ // Don't use a query here. The terminate, because it kills GDB, may not return right away
+ // But that is ok because we wait for a shutdown event right after
+ Runnable runnable = new Runnable() {
+ public void run() {
+ IProcessDMContext processDmc = DMContexts.getAncestorOfType(fContainerDmc, IProcessDMContext.class);
+ fProcesses.terminate(processDmc, new RequestMonitor(ImmediateExecutor.getInstance(), null));
+ }
+ };
+ fProcesses.getExecutor().execute(runnable);
+
+ // The shutdown must happen quickly, which will confirm that it was
+ // our own terminate that did it. If it take longer, it indicates
+ // that the program terminated on its own, which is not what we want.
+ shutdownEventWaitor.waitForEvent(TestsPlugin.massageTimeout(500));
+
+ // Now make sure GDB is dead
+ Assert.assertTrue("GDB should have been terminated", !fControl.isActive());
+ }
+
+ /**
+ * Test that the terminate operation works properly while the target is running, and
+ * with the option to kill GDB after the process terminate disabled.
+ */
+ @Test
+ public void terminateWhileTargetRunningKeepGDBAlive() throws Throwable {
+ // First set the preference not to kill gdb
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.cdt.dsf.gdb.ui");
+ node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, false);
+
+ // The target is currently stopped. We resume to get it running
+ // then we terminate the process, and confirm that there are no more processes
+ SyncUtil.resume();
+
+ ServiceEventWaitor<IExitedDMEvent> exitedEventWaitor = new ServiceEventWaitor<IExitedDMEvent>(
+ getGDBLaunch().getSession(),
+ IExitedDMEvent.class);
+
+ Query<Object> query = new Query<Object>() {
+ @Override
+ protected void execute(final DataRequestMonitor<Object> rm) {
+ IProcessDMContext processDmc = DMContexts.getAncestorOfType(fContainerDmc, IProcessDMContext.class);
+ fProcesses.terminate(processDmc, rm);
+ }
+ };
+ try {
+ fProcesses.getExecutor().execute(query);
+ query.get(1000, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ fail(e.getMessage());
+ } catch (ExecutionException e) {
+ fail(e.getCause().getMessage());
+ } catch (TimeoutException e) {
+ fail(TIMEOUT_MESSAGE);
+ }
+
+ IExitedDMEvent event = exitedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(500));
+ if (!(event.getDMContext() instanceof IMIContainerDMContext)) {
+ // This was the thread exited event, we want the container exited event
+ event = exitedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(500));
+ }
+
+ // Make sure this event shows that the process was terminated
+ Assert.assertTrue("Process was not terminated", event.getDMContext() instanceof IMIContainerDMContext);
+ IMIContainerDMContext dmc = (IMIContainerDMContext)event.getDMContext();
+ Assert.assertTrue("Expected process " + fContainerDmc.getGroupId() + " but got " + dmc.getGroupId(),
+ fContainerDmc.getGroupId().equals(dmc.getGroupId()));
+
+ // Now make sure GDB is still alive
+ Assert.assertTrue("GDB should have been still alive", fControl.isActive());
+ }
+
+ /**
+ * Test that the detach operation works properly while the target is running, and
+ * with the option to kill GDB after the process terminate enabled.
+ */
+ @Test
+ public void detachWhileTargetRunningKillGDB() throws Throwable {
+ // First set the preference to kill GDB
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.cdt.dsf.gdb.ui");
+ node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, true);
+
+ // The target is currently stopped. We resume to get it running
+ // then we detach the process, and confirm that we are shutdown
+ SyncUtil.resume();
+
+ ServiceEventWaitor<ICommandControlShutdownDMEvent> shutdownEventWaitor = new ServiceEventWaitor<ICommandControlShutdownDMEvent>(
+ getGDBLaunch().getSession(),
+ ICommandControlShutdownDMEvent.class);
+
+ // Don't use a query here. Because GDB will be killed, the call to detach may not return right away
+ // But that is ok because we wait for a shutdown event right after
+ Runnable runnable = new Runnable() {
+ public void run() {
+ fProcesses.detachDebuggerFromProcess(fContainerDmc, new RequestMonitor(ImmediateExecutor.getInstance(), null));
+ }
+ };
+ fProcesses.getExecutor().execute(runnable);
+
+ // The shutdown must happen quickly, which will confirm that it was
+ // our own terminate that did it. If it take longer, it indicates
+ // that the program terminated on its own, which is not what we want.
+ shutdownEventWaitor.waitForEvent(TestsPlugin.massageTimeout(500));
+
+ // Now make sure GDB is dead
+ Assert.assertTrue("GDB should have been terminated", !fControl.isActive());
+ }
+
+ /**
+ * Test that the detach operation works properly while the target is running, and
+ * with the option to kill GDB after the process terminate disabled.
+ */
+ @Test
+ public void detachWhileTargetRunningGDBAlive() throws Throwable {
+ // First set the preference not to kill gdb
+ Preferences node = DefaultScope.INSTANCE.getNode("org.eclipse.cdt.dsf.gdb.ui");
+ node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, false);
+
+ // The target is currently stopped. We resume to get it running
+ // then we detach the process, and confirm that we are not longer running
+ SyncUtil.resume();
+
+ ServiceEventWaitor<IExitedDMEvent> exitedEventWaitor = new ServiceEventWaitor<IExitedDMEvent>(
+ getGDBLaunch().getSession(),
+ IExitedDMEvent.class);
+
+ Query<Object> query = new Query<Object>() {
+ @Override
+ protected void execute(final DataRequestMonitor<Object> rm) {
+ fProcesses.detachDebuggerFromProcess(fContainerDmc, rm);
+ }
+ };
+ try {
+ fProcesses.getExecutor().execute(query);
+ query.get(1000, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ fail(e.getMessage());
+ } catch (ExecutionException e) {
+ fail(e.getCause().getMessage());
+ } catch (TimeoutException e) {
+ fail(TIMEOUT_MESSAGE);
+ }
+
+ IExitedDMEvent event = exitedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(500));
+ if (!(event.getDMContext() instanceof IMIContainerDMContext)) {
+ // This was the thread exited event, we want the container exited event
+ event = exitedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(500));
+ }
+
+ // Make sure this event shows that the process was detached
+ Assert.assertTrue("Process was not detached", event.getDMContext() instanceof IMIContainerDMContext);
+ IMIContainerDMContext dmc = (IMIContainerDMContext)event.getDMContext();
+ Assert.assertTrue("Expected process " + fContainerDmc.getGroupId() + " but got " + dmc.getGroupId(),
+ fContainerDmc.getGroupId().equals(dmc.getGroupId()));
+
+ // Now make sure GDB is still alive
+ Assert.assertTrue("GDB should have been still alive", fControl.isActive());
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java
new file mode 100644
index 00000000000..6ac401efee9
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_6_6 extends OperationsWhileTargetIsRunningTest {
+ @BeforeClass
+ public static void beforeClassMethod_6_6() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java
index 86c1a814518..cce8c17bd6b 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java
@@ -36,6 +36,7 @@ import org.junit.runners.Suite;
MIDisassemblyTest_6_6.class,
GDBProcessesTest_6_6.class,
LaunchConfigurationAndRestartTest_6_6.class,
+ OperationsWhileTargetIsRunningTest_6_6.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java
index 9a809475196..69b69af69d5 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java
@@ -39,6 +39,7 @@ import org.junit.runners.Suite;
MICatchpointsTest_6_6.class,
MIDisassemblyTest_6_6.class,
GDBProcessesTest_6_6.class,
+ OperationsWhileTargetIsRunningTest_6_6.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java
new file mode 100644
index 00000000000..47279cf429b
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_6_7 extends OperationsWhileTargetIsRunningTest_6_6 {
+ @BeforeClass
+ public static void beforeClassMethod_6_7() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java
index 075b1c791bf..d9ed9021279 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java
@@ -36,6 +36,7 @@ import org.junit.runners.Suite;
MIDisassemblyTest_6_7.class,
GDBProcessesTest_6_7.class,
LaunchConfigurationAndRestartTest_6_7.class,
+ OperationsWhileTargetIsRunningTest_6_7.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java
index 206cb33fc57..aefa2fce6f5 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java
@@ -39,6 +39,7 @@ import org.junit.runners.Suite;
MICatchpointsTest_6_7.class,
MIDisassemblyTest_6_7.class,
GDBProcessesTest_6_7.class,
+ OperationsWhileTargetIsRunningTest_6_7.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java
new file mode 100644
index 00000000000..c59f4db02f8
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_6_8 extends OperationsWhileTargetIsRunningTest_6_7 {
+ @BeforeClass
+ public static void beforeClassMethod_6_8() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java
index 573788f3ba7..9834a494975 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java
@@ -36,6 +36,7 @@ import org.junit.runners.Suite;
MIDisassemblyTest_6_8.class,
GDBProcessesTest_6_8.class,
LaunchConfigurationAndRestartTest_6_8.class,
+ OperationsWhileTargetIsRunningTest_6_8.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java
index 773df38506e..10bd4c72c06 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java
@@ -39,6 +39,7 @@ import org.junit.runners.Suite;
MICatchpointsTest_6_8.class,
MIDisassemblyTest_6_8.class,
GDBProcessesTest_6_8.class,
+ OperationsWhileTargetIsRunningTest_6_8.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java
new file mode 100644
index 00000000000..d4634088a67
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
+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 beforeClassMethod_7_0() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
+ setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java
new file mode 100644
index 00000000000..a79c85194f8
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_7_0 extends OperationsWhileTargetIsRunningTest_6_8 {
+ @BeforeClass
+ public static void beforeClassMethod_7_0() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java
index a340444f1bc..1c745e14039 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java
@@ -37,6 +37,8 @@ import org.junit.runners.Suite;
MIDisassemblyTest_7_0.class,
GDBProcessesTest_7_0.class,
LaunchConfigurationAndRestartTest_7_0.class,
+ OperationsWhileTargetIsRunningTest_7_0.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_0.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java
index 3ff3d2eabd0..b0c14208037 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java
@@ -41,6 +41,8 @@ import org.junit.runners.Suite;
MICatchpointsTest_7_0.class,
MIDisassemblyTest_7_0.class,
GDBProcessesTest_7_0.class,
+ OperationsWhileTargetIsRunningTest_7_0.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_0.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java
new file mode 100644
index 00000000000..8cce5f1d54c
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
+import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningNonStopTest_7_1 extends OperationsWhileTargetIsRunningTest_7_1 {
+ @BeforeClass
+ public static void beforeClassMethod_7_1() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
+ setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java
new file mode 100644
index 00000000000..03348f63442
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.OperationsWhileTargetIsRunningTest_7_0;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_7_1 extends OperationsWhileTargetIsRunningTest_7_0 {
+ @BeforeClass
+ public static void beforeClassMethod_7_1() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java
index 2339172c49c..afff3d316cc 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_7_1.java
@@ -37,6 +37,8 @@ import org.junit.runners.Suite;
MIDisassemblyTest_7_1.class,
GDBProcessesTest_7_1.class,
LaunchConfigurationAndRestartTest_7_1.class,
+ OperationsWhileTargetIsRunningTest_7_1.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_1.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java
index fac05b40828..b5ebedcc6ec 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java
@@ -41,6 +41,8 @@ import org.junit.runners.Suite;
MICatchpointsTest_7_1.class,
MIDisassemblyTest_7_1.class,
GDBProcessesTest_7_1.class,
+ OperationsWhileTargetIsRunningTest_7_1.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_1.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java
new file mode 100644
index 00000000000..8727ff705b3
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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_2;
+
+
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
+import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningNonStopTest_7_2 extends OperationsWhileTargetIsRunningTest_7_2 {
+ @BeforeClass
+ public static void beforeClassMethod_7_2() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
+ setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java
new file mode 100644
index 00000000000..47ff6656ed6
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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_2;
+
+
+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_1.OperationsWhileTargetIsRunningTest_7_1;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_7_2 extends OperationsWhileTargetIsRunningTest_7_1 {
+ @BeforeClass
+ public static void beforeClassMethod_7_2() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java
index d42b171db0b..cbea4aa9895 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_7_2.java
@@ -37,6 +37,8 @@ import org.junit.runners.Suite;
MIDisassemblyTest_7_2.class,
GDBProcessesTest_7_2.class,
LaunchConfigurationAndRestartTest_7_2.class,
+ OperationsWhileTargetIsRunningTest_7_2.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_2.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java
index b224ab012e1..32ee042ea23 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java
@@ -41,6 +41,8 @@ import org.junit.runners.Suite;
MICatchpointsTest_7_2.class,
MIDisassemblyTest_7_2.class,
GDBProcessesTest_7_2.class,
+ OperationsWhileTargetIsRunningTest_7_2.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_2.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java
new file mode 100644
index 00000000000..dedbf042fba
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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_3;
+
+
+import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
+import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
+import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningNonStopTest_7_3 extends OperationsWhileTargetIsRunningTest_7_3 {
+ @BeforeClass
+ public static void beforeClassMethod_7_3() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3);
+ setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java
new file mode 100644
index 00000000000..d1d2b5b13a1
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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_3;
+
+
+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_2.OperationsWhileTargetIsRunningTest_7_2;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+
+@RunWith(BackgroundRunner.class)
+public class OperationsWhileTargetIsRunningTest_7_3 extends OperationsWhileTargetIsRunningTest_7_2 {
+ @BeforeClass
+ public static void beforeClassMethod_7_3() {
+ setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java
index 2c767c60742..14568f887e7 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_7_3.java
@@ -37,6 +37,8 @@ import org.junit.runners.Suite;
MIDisassemblyTest_7_3.class,
GDBProcessesTest_7_3.class,
LaunchConfigurationAndRestartTest_7_3.class,
+ OperationsWhileTargetIsRunningTest_7_3.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_3.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java
index ee4c2d32bfa..2f7f74edd9d 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java
@@ -41,6 +41,8 @@ import org.junit.runners.Suite;
MICatchpointsTest_7_3.class,
MIDisassemblyTest_7_3.class,
GDBProcessesTest_7_3.class,
+ OperationsWhileTargetIsRunningTest_7_3.class,
+ OperationsWhileTargetIsRunningNonStopTest_7_3.class,
Suite_Sessionless_Tests.class
/* Add your test class here */
})

Back to the top