mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
Bug 572581: fix terminating launches at end of test
this fixes cases where a single test failing does not clean up properly causing subsequent tests to then fail. Change-Id: I4bd9c08e5ce1a4cd2ccd5e710a446e6e96c4d353
This commit is contained in:
parent
6c2fc2d927
commit
e701b76d87
24 changed files with 49 additions and 45 deletions
|
@ -18,7 +18,6 @@ package org.eclipse.cdt.tests.dsf.gdb.framework;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.junit.Assert.fail;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
|
@ -321,12 +320,12 @@ public class BaseTestCase {
|
||||||
* Make sure we are starting with a clean/known state. That means no
|
* Make sure we are starting with a clean/known state. That means no
|
||||||
* existing launches.
|
* existing launches.
|
||||||
*/
|
*/
|
||||||
public void removeTeminatedLaunchesBeforeTest() throws CoreException {
|
public void teminateAndRemoveLaunches() throws Exception {
|
||||||
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
|
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
|
||||||
ILaunch[] launches = launchManager.getLaunches();
|
ILaunch[] launches = launchManager.getLaunches();
|
||||||
for (ILaunch launch : launches) {
|
for (ILaunch launch : launches) {
|
||||||
if (!launch.isTerminated()) {
|
if (!launch.isTerminated()) {
|
||||||
fail("Something has gone wrong, there is an unterminated launch from a previous test!");
|
assertLaunchTerminates((GdbLaunch) launch, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (launches.length > 0) {
|
if (launches.length > 0) {
|
||||||
|
@ -354,7 +353,7 @@ public class BaseTestCase {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
removeAllPlatformBreakpoints();
|
removeAllPlatformBreakpoints();
|
||||||
setLaunchAttributes();
|
setLaunchAttributes();
|
||||||
doLaunch();
|
doLaunch();
|
||||||
|
@ -602,11 +601,26 @@ public class BaseTestCase {
|
||||||
assertLaunchTerminates(launch);
|
assertLaunchTerminates(launch);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertLaunchTerminates(GdbLaunch launch) throws InterruptedException {
|
/**
|
||||||
|
* Assert that the launch terminates, optionally requesting this method to terminate unterminated launch.
|
||||||
|
*/
|
||||||
|
protected void assertLaunchTerminates(boolean terminate) throws Exception {
|
||||||
|
GdbLaunch launch = fLaunch;
|
||||||
|
assertLaunchTerminates(launch, terminate);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void assertLaunchTerminates(GdbLaunch launch) throws Exception {
|
||||||
|
assertLaunchTerminates(launch, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void assertLaunchTerminates(GdbLaunch launch, boolean terminate) throws Exception {
|
||||||
if (launch != null) {
|
if (launch != null) {
|
||||||
// Give a few seconds to allow the launch to terminate
|
// Give a few seconds to allow the launch to terminate
|
||||||
int waitCount = 100;
|
int waitCount = 100;
|
||||||
while (!launch.isTerminated() && !launch.getDsfExecutor().isShutdown() && --waitCount > 0) {
|
while (!launch.isTerminated() && !launch.getDsfExecutor().isShutdown() && --waitCount > 0) {
|
||||||
|
if (terminate) {
|
||||||
|
launch.terminate();
|
||||||
|
}
|
||||||
Thread.sleep(TestsPlugin.massageTimeout(100));
|
Thread.sleep(TestsPlugin.massageTimeout(100));
|
||||||
}
|
}
|
||||||
assertTrue("Launch failed to terminate before timeout", launch.isTerminated());
|
assertTrue("Launch failed to terminate before timeout", launch.isTerminated());
|
||||||
|
@ -621,6 +635,7 @@ public class BaseTestCase {
|
||||||
fLaunch = null;
|
fLaunch = null;
|
||||||
}
|
}
|
||||||
removeAllPlatformBreakpoints();
|
removeAllPlatformBreakpoints();
|
||||||
|
teminateAndRemoveLaunches();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class CommandLineArgsTest extends BaseParametrizedTestCase {
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
assumeLocalSession();
|
assumeLocalSession();
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
setLaunchAttributes();
|
setLaunchAttributes();
|
||||||
// Can't run the launch right away because each test needs to first set
|
// Can't run the launch right away because each test needs to first set
|
||||||
// ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS
|
// ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class CommandTimeoutTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
setLaunchAttributes();
|
setLaunchAttributes();
|
||||||
// Can't run the launch right away because each test needs to first set some
|
// Can't run the launch right away because each test needs to first set some
|
||||||
// parameters. The individual tests will be responsible for starting the launch.
|
// parameters. The individual tests will be responsible for starting the launch.
|
||||||
|
|
|
@ -92,12 +92,12 @@ public class GDBPatternMatchingExpressionsTest extends BaseParametrizedTestCase
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
fExpService = null;
|
fExpService = null;
|
||||||
if (fServicesTracker != null) {
|
if (fServicesTracker != null) {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fServicesTracker = null;
|
fServicesTracker = null;
|
||||||
}
|
}
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
//**************************************************************************************
|
//**************************************************************************************
|
||||||
|
|
|
@ -69,11 +69,10 @@ public class GDBProcessesTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
fProcService = null;
|
fProcService = null;
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -205,13 +205,13 @@ public class GDBRemoteTracepointsTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
if (fSession != null)
|
if (fSession != null)
|
||||||
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBRemoteTracepointsTest.this))
|
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(GDBRemoteTracepointsTest.this))
|
||||||
.get();
|
.get();
|
||||||
fBreakpointService = null;
|
fBreakpointService = null;
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
// *********************************************************************
|
// *********************************************************************
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class LaunchConfigurationAndRestartTest extends BaseParametrizedTestCase
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
assumeLocalSession();
|
assumeLocalSession();
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
setLaunchAttributes();
|
setLaunchAttributes();
|
||||||
// Can't run the launch right away because each test needs to first set some
|
// Can't run the launch right away because each test needs to first set some
|
||||||
// parameters. The individual tests will be responsible for starting the launch.
|
// parameters. The individual tests will be responsible for starting the launch.
|
||||||
|
@ -142,10 +142,9 @@ public class LaunchConfigurationAndRestartTest extends BaseParametrizedTestCase
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
// *********************************************************************
|
// *********************************************************************
|
||||||
|
|
|
@ -220,7 +220,6 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
// cleanup cannot assume sane state since it runs even test is failed or skipped
|
// cleanup cannot assume sane state since it runs even test is failed or skipped
|
||||||
if (fSession != null) {
|
if (fSession != null) {
|
||||||
// Clear the references (not strictly necessary)
|
// Clear the references (not strictly necessary)
|
||||||
|
@ -233,6 +232,7 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fServicesTracker = null;
|
fServicesTracker = null;
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
// Event Management Functions
|
// Event Management Functions
|
||||||
|
|
|
@ -196,7 +196,6 @@ public class MICatchpointsTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
if (fSession != null) {
|
if (fSession != null) {
|
||||||
Runnable runnable = () -> fRunControl.getSession().removeServiceEventListener(MICatchpointsTest.this);
|
Runnable runnable = () -> fRunControl.getSession().removeServiceEventListener(MICatchpointsTest.this);
|
||||||
fSession.getExecutor().submit(runnable).get();
|
fSession.getExecutor().submit(runnable).get();
|
||||||
|
@ -208,6 +207,7 @@ public class MICatchpointsTest extends BaseParametrizedTestCase {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fServicesTracker = null;
|
fServicesTracker = null;
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|
|
@ -120,14 +120,13 @@ public class MIDisassemblyTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
fExpressionService = null;
|
fExpressionService = null;
|
||||||
fDisassembly = null;
|
fDisassembly = null;
|
||||||
if (fServicesTracker != null) {
|
if (fServicesTracker != null) {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fServicesTracker = null;
|
fServicesTracker = null;
|
||||||
}
|
}
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|
|
@ -112,7 +112,6 @@ public class MIExpressionsTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
if (fSession != null) {
|
if (fSession != null) {
|
||||||
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(MIExpressionsTest.this)).get();
|
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(MIExpressionsTest.this)).get();
|
||||||
}
|
}
|
||||||
|
@ -120,6 +119,7 @@ public class MIExpressionsTest extends BaseParametrizedTestCase {
|
||||||
if (fServicesTracker != null) {
|
if (fServicesTracker != null) {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
}
|
}
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -138,7 +138,6 @@ public class MIMemoryTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
// Clear the references (not strictly necessary)
|
// Clear the references (not strictly necessary)
|
||||||
if (fSession != null)
|
if (fSession != null)
|
||||||
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(MIMemoryTest.this)).get();
|
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(MIMemoryTest.this)).get();
|
||||||
|
@ -150,6 +149,7 @@ public class MIMemoryTest extends BaseParametrizedTestCase {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fServicesTracker = null;
|
fServicesTracker = null;
|
||||||
clearEventCounters();
|
clearEventCounters();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class MIModifiedServicesTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
setLaunchAttributes();
|
setLaunchAttributes();
|
||||||
|
|
||||||
// Can't run the launch right away because each test needs to first set some
|
// Can't run the launch right away because each test needs to first set some
|
||||||
|
|
|
@ -133,11 +133,10 @@ public class MIRegistersTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fRegService = null;
|
fRegService = null;
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -76,11 +76,10 @@ public class MIRunControlReverseTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null) {
|
if (fServicesTracker != null) {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
}
|
}
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -78,10 +78,9 @@ public class MIRunControlTargetAvailableTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -128,10 +128,9 @@ public class MIRunControlTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -87,14 +87,13 @@ public class OperationsWhileTargetIsRunningTest extends BaseParametrizedTestCase
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
|
||||||
// Restore the different preferences we might have changed
|
// Restore the different preferences we might have changed
|
||||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(GdbPlugin.PLUGIN_ID);
|
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(GdbPlugin.PLUGIN_ID);
|
||||||
node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, fgAutoTerminate);
|
node.putBoolean(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, fgAutoTerminate);
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class PostMortemCoreTest extends BaseParametrizedTestCase {
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
assumeLocalSession();
|
assumeLocalSession();
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
setLaunchAttributes();
|
setLaunchAttributes();
|
||||||
// Can't run the launch right away because each test needs to first set some
|
// Can't run the launch right away because each test needs to first set some
|
||||||
// parameters. The individual tests will be responsible for starting the launch.
|
// parameters. The individual tests will be responsible for starting the launch.
|
||||||
|
@ -124,8 +124,6 @@ public class PostMortemCoreTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fSession != null) {
|
if (fSession != null) {
|
||||||
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(PostMortemCoreTest.this)).get();
|
fSession.getExecutor().submit(() -> fSession.removeServiceEventListener(PostMortemCoreTest.this)).get();
|
||||||
}
|
}
|
||||||
|
@ -133,6 +131,8 @@ public class PostMortemCoreTest extends BaseParametrizedTestCase {
|
||||||
fExpService = null;
|
fExpService = null;
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class SourceLookupTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
||||||
manager.addBreakpointListener(fBreakpointListener);
|
manager.addBreakpointListener(fBreakpointListener);
|
||||||
setExeNames();
|
setExeNames();
|
||||||
|
@ -229,11 +229,10 @@ public class SourceLookupTest extends BaseParametrizedTestCase {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
removeAllPlatformBreakpoints();
|
removeAllPlatformBreakpoints();
|
||||||
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
||||||
manager.removeBreakpointListener(fBreakpointListener);
|
manager.removeBreakpointListener(fBreakpointListener);
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doLaunch(String programName) throws Exception {
|
protected void doLaunch(String programName) throws Exception {
|
||||||
|
@ -912,7 +911,7 @@ public class SourceLookupTest extends BaseParametrizedTestCase {
|
||||||
sourceFinderMappingAC_ActiveLaunchHelper(withBackend);
|
sourceFinderMappingAC_ActiveLaunchHelper(withBackend);
|
||||||
|
|
||||||
// Terminate the launch, but don't remove it
|
// Terminate the launch, but don't remove it
|
||||||
doAfterTest();
|
assertLaunchTerminates(true);
|
||||||
assertFinderFinds(EXEC_AC_NAME, new File(SOURCE_PATH, SOURCE_NAME).getAbsolutePath());
|
assertFinderFinds(EXEC_AC_NAME, new File(SOURCE_PATH, SOURCE_NAME).getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,9 @@ public class StepIntoSelectionTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class TraceFileTest extends BaseParametrizedTestCase {
|
||||||
assumeRemoteSession();
|
assumeRemoteSession();
|
||||||
resolveLineTagLocations(SOURCE_NAME, LINE_TAGS);
|
resolveLineTagLocations(SOURCE_NAME, LINE_TAGS);
|
||||||
assumeGdbVersionAtLeast(ITestConstants.SUFFIX_GDB_7_4);
|
assumeGdbVersionAtLeast(ITestConstants.SUFFIX_GDB_7_4);
|
||||||
removeTeminatedLaunchesBeforeTest();
|
teminateAndRemoveLaunches();
|
||||||
// Suppress settings of the launch attributes and launching.
|
// Suppress settings of the launch attributes and launching.
|
||||||
// Each test sets its own launch attributes
|
// Each test sets its own launch attributes
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,6 @@ public class TraceFileTest extends BaseParametrizedTestCase {
|
||||||
@Override
|
@Override
|
||||||
@After
|
@After
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
fBreakpointService = null;
|
fBreakpointService = null;
|
||||||
fTraceService = null;
|
fTraceService = null;
|
||||||
fBreakpointsDmc = null;
|
fBreakpointsDmc = null;
|
||||||
|
@ -134,6 +133,7 @@ public class TraceFileTest extends BaseParametrizedTestCase {
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
fServicesTracker = null;
|
fServicesTracker = null;
|
||||||
}
|
}
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -90,10 +90,9 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
private abstract class AsyncRunnable<V> {
|
private abstract class AsyncRunnable<V> {
|
||||||
|
|
|
@ -126,9 +126,9 @@ public class ThreadStackFrameSyncTest extends BaseParametrizedTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterTest() throws Exception {
|
public void doAfterTest() throws Exception {
|
||||||
super.doAfterTest();
|
|
||||||
if (fServicesTracker != null)
|
if (fServicesTracker != null)
|
||||||
fServicesTracker.dispose();
|
fServicesTracker.dispose();
|
||||||
|
super.doAfterTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Reference in a new issue