1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Bug 455992 - MIRunControlTest.getExecutionContexts fails when run in

remote mode 

Change-Id: I869a7496e63380f3839d641105fa29fc0c1c3b74
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/38692
Tested-by: Hudson CI
This commit is contained in:
Marc Khouzam 2014-12-22 13:49:25 -05:00
parent c647a52118
commit ca6d07cf0c

View file

@ -284,12 +284,7 @@ public class MIRunControlTest extends BaseTestCase {
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER); // over the printf
SyncUtil.step(stoppedEvent.getDMContext(), StepType.STEP_OVER); // over the create-thread call
SyncUtil.step(stoppedEvent.getDMContext(), StepType.STEP_OVER, TestsPlugin.massageTimeout(2000)); // over the one second sleep
// Make sure thread started event was received
IStartedDMEvent startedEvent = startedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
Assert.assertEquals("Thread created event is for wrong thread id", sProgramIsCygwin ? 3 : 2, ((IMIExecutionDMContext)startedEvent.getDMContext()).getThreadId());
final IContainerDMContext containerDmc = SyncUtil.getContainerContext();
/*
@ -304,6 +299,13 @@ public class MIRunControlTest extends BaseTestCase {
wait.waitUntilDone(TestsPlugin.massageTimeout(5000));
Assert.assertTrue(wait.getMessage(), wait.isOK());
wait.waitReset();
// Make sure thread started event was received
// We check this _after_ we ask for the execution contexts because when running remote (i.e., with gdbserver),
// thread events are not sent by gdb until a request for a thread list is given (Bug 455992)
IStartedDMEvent startedEvent = startedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
Assert.assertEquals("Thread created event is for wrong thread id", sProgramIsCygwin ? 3 : 2, ((IMIExecutionDMContext)startedEvent.getDMContext()).getThreadId());
/*
* Get data
*/