1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 379568: Refactoring of DSF-GDB JUnit tests to use inheritance.

Change-Id: I81af3d27f802ab690f79b43bb9e2a3230696418a
Reviewed-on: https://git.eclipse.org/r/5999
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2012-05-17 11:41:34 -04:00
parent 2d5f3da68e
commit 8bb266decf
156 changed files with 800 additions and 961 deletions

View file

@ -31,16 +31,15 @@ import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.utils.spawner.ProcessFactory; import org.eclipse.cdt.utils.spawner.ProcessFactory;
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchManager;
import org.junit.After; import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule; import org.junit.Rule;
import org.junit.rules.TestName; import org.junit.rules.TestName;
@ -62,10 +61,8 @@ public class BaseTestCase {
private static GdbLaunch fLaunch; private static GdbLaunch fLaunch;
// The set of attributes used for the launch // The set of attributes used for the launch of a single test.
// These are seset to their default whenever a new class private Map<String, Object> launchAttributes;
// of tests is started.
private static Map<String, Object> launchAttributes;
// A set of global launch attributes which are not // A set of global launch attributes which are not
// reset when we load a new class of tests. // reset when we load a new class of tests.
@ -87,11 +84,11 @@ public class BaseTestCase {
public GdbLaunch getGDBLaunch() { return fLaunch; } public GdbLaunch getGDBLaunch() { return fLaunch; }
public static void setLaunchAttribute(String key, Object value) { public void setLaunchAttribute(String key, Object value) {
launchAttributes.put(key, value); launchAttributes.put(key, value);
} }
public static void removeLaunchAttribute(String key) { public void removeLaunchAttribute(String key) {
launchAttributes.remove(key); launchAttributes.remove(key);
} }
@ -105,7 +102,7 @@ public class BaseTestCase {
public synchronized MIStoppedEvent getInitialStoppedEvent() { return fInitialStoppedEvent; } public synchronized MIStoppedEvent getInitialStoppedEvent() { return fInitialStoppedEvent; }
public static boolean isRemoteSession() { public boolean isRemoteSession() {
return launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE) return launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE)
.equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE); .equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
} }
@ -174,12 +171,16 @@ public class BaseTestCase {
} }
} }
@BeforeClass @Before
public static void baseBeforeClassMethod() { public void doBeforeTest() throws Exception {
// Clear all launch attributes before starting a new class of tests setLaunchAttributes();
doLaunch();
}
protected void setLaunchAttributes() {
// Clear all launch attributes before starting a new test
launchAttributes = new HashMap<String, Object>(); launchAttributes = new HashMap<String, Object>();
// Setup information for the launcher
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, DEFAULT_TEST_APP); launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, DEFAULT_TEST_APP);
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
@ -196,14 +197,21 @@ public class BaseTestCase {
launchAttributes.put(IGDBLaunchConfigurationConstants.ATTR_HOST, "localhost"); launchAttributes.put(IGDBLaunchConfigurationConstants.ATTR_HOST, "localhost");
launchAttributes.put(IGDBLaunchConfigurationConstants.ATTR_PORT, "9999"); launchAttributes.put(IGDBLaunchConfigurationConstants.ATTR_PORT, "9999");
setGdbVersion();
// Set the global launch attributes // Set the global launch attributes
launchAttributes.putAll(globalLaunchAttributes); launchAttributes.putAll(globalLaunchAttributes);
} }
@Before /**
public void baseBeforeMethod() throws Exception { * 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);
System.out.println("===================================================================================================="); System.out.println("====================================================================================================");
System.out.println("Running test: " + testName.getMethodName() + " using GDB: " + launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME)); System.out.println(String.format("Running test: %s using GDB: %s remote %s",
testName.getMethodName(), launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME), remote ? "on" : "off"));
System.out.println("===================================================================================================="); System.out.println("====================================================================================================");
boolean postMortemLaunch = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE) boolean postMortemLaunch = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE)
@ -272,22 +280,22 @@ public class BaseTestCase {
} }
@After @After
public void baseAfterMethod() throws Exception { public void doAfterTest() throws Exception {
if (fLaunch != null) { if (fLaunch != null) {
try {
fLaunch.terminate(); fLaunch.terminate();
} catch (DebugException e) {
assert false : "Could not terminate launch";
}
fLaunch = null; fLaunch = null;
} }
} }
@AfterClass
public static void baseAfterClassMehod() throws Exception {
}
/** /**
* This method start gdbserver on the localhost. * This method start gdbserver on the localhost.
* If the user specified a different host, things won't work. * If the user specified a different host, things won't work.
*/ */
private static void launchGdbServer() { private void launchGdbServer() {
if (launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE) if (launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE)
.equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE)) { .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)) {
@ -331,11 +339,15 @@ public class BaseTestCase {
* string that contains the major and minor version number, e.g., * string that contains the major and minor version number, e.g.,
* "6.8" * "6.8"
*/ */
protected static void setGdbProgramNamesLaunchAttributes(String version) { public static void setGdbProgramNamesLaunchAttributes(String version) {
// See bugzilla 303811 for why we have to append ".exe" on Windows // See bugzilla 303811 for why we have to append ".exe" on Windows
boolean isWindows = Platform.getOS().equals(Platform.OS_WIN32); boolean isWindows = Platform.getOS().equals(Platform.OS_WIN32);
BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb." + version + (isWindows ? ".exe" : "")); setGlobalLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb." + version + (isWindows ? ".exe" : ""));
BaseTestCase.setLaunchAttribute(ATTR_DEBUG_SERVER_NAME, "gdbserver." + version + (isWindows ? ".exe" : "")); setGlobalLaunchAttribute(ATTR_DEBUG_SERVER_NAME, "gdbserver." + version + (isWindows ? ".exe" : ""));
}
protected void setGdbVersion() {
// Leave empty for the base class
} }
/** /**

View file

@ -22,8 +22,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugException;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -35,8 +33,7 @@ public class CommandTimeoutTest extends BaseTestCase {
private static int fgTimeout = IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT; private static int fgTimeout = IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT;
@BeforeClass @BeforeClass
public static void beforeClassMethod() { public static void doBeforeClass() throws Exception {
// Save the original values of the timeout-related preferences
fgTimeoutEnabled = Platform.getPreferencesService().getBoolean( fgTimeoutEnabled = Platform.getPreferencesService().getBoolean(
GdbPlugin.PLUGIN_ID, GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT, IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT,
@ -49,20 +46,31 @@ public class CommandTimeoutTest extends BaseTestCase {
null ); null );
} }
@Before
@Override @Override
public void baseBeforeMethod() throws Exception { public void doBeforeTest() throws Exception {
setLaunchAttributes();
// 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.
// Save the original values of the timeout-related preferences
} }
@After
@Override @Override
public void baseAfterMethod() throws Exception { public void doAfterTest() throws Exception {
// Don't call super here, as the launch is already terminated
// Restore the timeout preferences // Restore the timeout preferences
IEclipsePreferences node = InstanceScope.INSTANCE.getNode( GdbPlugin.PLUGIN_ID ); IEclipsePreferences node = InstanceScope.INSTANCE.getNode( GdbPlugin.PLUGIN_ID );
node.putBoolean( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT, fgTimeoutEnabled ); node.putBoolean( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT, fgTimeoutEnabled );
node.putInt( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT_VALUE, fgTimeout ); node.putInt( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT_VALUE, fgTimeout );
} }
protected void performLaunchAndTerminate() throws Exception {
// perform the launch
doLaunch();
// terminate the launch right away
super.doAfterTest();
}
@Override @Override
protected boolean reallyLaunchGDBServer() { protected boolean reallyLaunchGDBServer() {
return false; return false;
@ -109,11 +117,6 @@ public class CommandTimeoutTest extends BaseTestCase {
} }
} }
private void performLaunchAndTerminate() throws Exception {
super.baseBeforeMethod();
super.baseAfterMethod();
}
/** /**
* Checks whether the given exception is an instance of {@link CoreException} * Checks whether the given exception is an instance of {@link CoreException}
* with the status code 20100 which indicates that a gdb command has been timed out. * with the status code 20100 which indicates that a gdb command has been timed out.

View file

@ -1,117 +0,0 @@
/*******************************************************************************
* Copyright (c) 2007, 2009 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 - Initial Implementation
*******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertTrue;
import java.io.FileNotFoundException;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
/*
* This is an example of how to write new JUnit test cases
* for services of DSF.
*
* Each test class should extend BaseTestCase
* so as to automatically launch the application before
* each testcase and tear it down after.
*
* Also, each new test class must be added to the list within AllTest.
*
* Finally, each testcase should be @RunWith(BackgroundRunner.class)
* so as to release the UI thread and allow things such as
* timeouts to work in JUnit
*/
// Each test must run with the BackgroundRunner so as
// to release the UI thread
@RunWith(BackgroundRunner.class)
public class ExampleTest extends BaseTestCase {
@BeforeClass
public static void beforeClassMethod() {
// Things to run once specifically for this class,
// before starting this set of tests.
// Any method name can be used
// To choose your own test application, use the following form
// You must make sure the compiled binary is available in the
// specified location.
// If this method call is not made, the default GDBMIGenericTestApp
// will be used
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
"data/launch/bin/SpecialTestApp.exe");
// Other attributes can be changed here
}
@AfterClass
public static void afterClassMethod() {
// Things to run once specifically for this class,
// after the launch has been performed
// Any method name can be used
}
@Before
public void beforeMethod() {
// Things to run specifically for this class,
// before each test but after the launch has been performed
// The Launched used is for the default test application
// Any method name can be used
}
@After
public void afterMethod() {
// Things to run specifically for this class
// after each test but before the launch has been torn down
// Any method name can be used
}
// @Override
// public void baseBeforeMethod() {
// // Can be used to override and prevent the baseSetup from being run
// // The name baseBeforeMethod must be used
// }
// @Override
// public void baseAfterMethod() {
// // Can be used to override and prevent the baseTeardown from being run
// // The name baseAfterMethod must be used
// }
@Test
public void basicTest() {
// First test to run
assertTrue("", true);
}
@Test(timeout=5000)
public void timeoutTest() {
// Second test to run, which will timeout if not finished on time
assertTrue("", true);
}
@Test(expected=FileNotFoundException.class)
public void exceptionTest() throws FileNotFoundException {
// Third test to run which expects an exception
throw new FileNotFoundException("Just testing");
}
}

View file

@ -32,10 +32,7 @@ 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.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -62,8 +59,10 @@ public class GDBProcessesTest extends BaseTestCase {
*/ */
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor(); private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
@ -75,14 +74,18 @@ public class GDBProcessesTest extends BaseTestCase {
fSession.getExecutor().submit(runnable).get(); fSession.getExecutor().submit(runnable).get();
} }
@After @Override
public void tearDown() { public void doAfterTest() throws Exception {
super.doAfterTest();
fProcService = null; fProcService = null;
fServicesTracker.dispose(); fServicesTracker.dispose();
} }
@BeforeClass @Override
public static void beforeClassMethod() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME); EXEC_PATH + EXEC_NAME);
} }

View file

@ -45,8 +45,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchManager;
import org.junit.After;
import org.junit.Before;
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;
@ -71,29 +69,27 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
protected boolean fRestart; protected boolean fRestart;
@Override @Override
@Before public void doBeforeTest() throws Exception {
public void baseBeforeMethod() throws Exception { setLaunchAttributes();
// The class BaseTestCase sets up the launch in its @BeforeClass method.
// Usually this is ok, because every test uses the same launch configuration.
// However, for the tests of this class, we are changing the launch
// configuration every time. Therefore, we need to reset it to the default
// before every test; that means in the @Before method instead of @BeforeClass
// Reset the launch configuration
super.baseBeforeClassMethod();
// Set the binary
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, PROGRAM);
// 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.
} }
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
// Set the binary
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, PROGRAM);
}
// This method cannot be tagged as @Before, because the launch is not // This method cannot be tagged as @Before, because the launch is not
// running yet. We have to call this manually after all the proper // running yet. We have to call this manually after all the proper
// parameters have been set for the launch // parameters have been set for the launch
public void performLaunch() throws Exception { @Override
protected void doLaunch() throws Exception {
// perform the launch // perform the launch
super.baseBeforeMethod(); super.doLaunch();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@ -121,8 +117,10 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
} }
} }
@After @Override
public void shutdown() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest();
if (fServicesTracker != null) fServicesTracker.dispose(); if (fServicesTracker != null) fServicesTracker.dispose();
} }
@ -132,7 +130,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
private static String fFullProgramPath; private static String fFullProgramPath;
@Test @Test
public void getFullPath() throws Throwable { public void getFullPath() throws Throwable {
performLaunch(); doLaunch();
MIStoppedEvent stopped = getInitialStoppedEvent(); MIStoppedEvent stopped = getInitialStoppedEvent();
fFullProgramPath = stopped.getFrame().getFullname(); fFullProgramPath = stopped.getFrame().getFullname();
} }
@ -153,7 +151,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, dir); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, dir);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, dir + PROGRAM_NAME); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, dir + PROGRAM_NAME);
performLaunch(); doLaunch();
Query<MIInfo> query = new Query<MIInfo>() { Query<MIInfo> query = new Query<MIInfo>() {
@Override @Override
@ -185,7 +183,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
"gdbinitThatDoesNotExist"); "gdbinitThatDoesNotExist");
try { try {
performLaunch(); doLaunch();
} catch (CoreException e) { } catch (CoreException e) {
// Success of the test // Success of the test
return; return;
@ -203,7 +201,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
".gdbinit"); ".gdbinit");
try { try {
performLaunch(); doLaunch();
} catch (CoreException e) { } catch (CoreException e) {
fail("Launch has failed even though the gdbinit file has the default name of .gdbinit"); fail("Launch has failed even though the gdbinit file has the default name of .gdbinit");
} }
@ -219,7 +217,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
public void testSourceGdbInit() throws Throwable { public void testSourceGdbInit() throws Throwable {
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT,
"data/launch/src/launchConfigTestGdbinit"); "data/launch/src/launchConfigTestGdbinit");
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
@ -286,7 +284,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
@Test @Test
public void testClearingEnvironment() throws Throwable { public void testClearingEnvironment() throws Throwable {
setLaunchAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, false); setLaunchAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, false);
performLaunch(); doLaunch();
SyncUtil.runToLocation("envTest"); SyncUtil.runToLocation("envTest");
MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER); MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER);
@ -335,7 +333,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
Map<String, String> map = new HashMap<String, String>(1); Map<String, String> map = new HashMap<String, String>(1);
map.put("LAUNCHTEST", "IS SET"); map.put("LAUNCHTEST", "IS SET");
setLaunchAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map); setLaunchAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map);
performLaunch(); doLaunch();
SyncUtil.runToLocation("envTest"); SyncUtil.runToLocation("envTest");
MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER); MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER);
@ -409,7 +407,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
Map<String, String> map = new HashMap<String, String>(1); Map<String, String> map = new HashMap<String, String>(1);
map.put("LAUNCHTEST", "IS SET"); map.put("LAUNCHTEST", "IS SET");
setLaunchAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map); setLaunchAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map);
performLaunch(); doLaunch();
SyncUtil.runToLocation("envTest"); SyncUtil.runToLocation("envTest");
MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER); MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER);
@ -477,7 +475,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
@Test @Test
public void testSettingArguments() throws Throwable { public void testSettingArguments() throws Throwable {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "1 2 3\n4 5 6"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "1 2 3\n4 5 6");
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
@ -544,7 +542,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
public void testStopAtMain() throws Throwable { public void testStopAtMain() throws Throwable {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
assertTrue("Expected to stop at main:27 but got " + assertTrue("Expected to stop at main:27 but got " +
@ -571,7 +569,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
public void testStopAtOther() throws Throwable { public void testStopAtOther() throws Throwable {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther");
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
assertTrue("Expected to stop at stopAtOther but got " + assertTrue("Expected to stop at stopAtOther but got " +
@ -608,7 +606,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
IFile fakeFile = null; IFile fakeFile = null;
CDIDebugModel.createLineBreakpoint(PROGRAM, fakeFile, ICBreakpointType.REGULAR, LAST_LINE_IN_MAIN + 1, true, 0, "", true); //$NON-NLS-1$ CDIDebugModel.createLineBreakpoint(PROGRAM, fakeFile, ICBreakpointType.REGULAR, LAST_LINE_IN_MAIN + 1, true, 0, "", true); //$NON-NLS-1$
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
assertTrue("Expected to stop at envTest but got " + assertTrue("Expected to stop at envTest but got " +

View file

@ -55,10 +55,6 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
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;
@ -167,18 +163,17 @@ public class MIBreakpointsTest extends BaseTestCase {
// Housekeeping stuff // Housekeeping stuff
// ======================================================================== // ========================================================================
@BeforeClass @Override
public static void testSuiteInitialization() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
// Select the binary to run the tests against // Select the binary to run the tests against
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL);
} }
@AfterClass @Override
public static void testSuiteCleanup() { public void doBeforeTest() throws Exception {
} super.doBeforeTest();
@Before
public void testCaseInitialization() throws Exception {
// Get a reference to the breakpoint service // Get a reference to the breakpoint service
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
@ -210,8 +205,9 @@ public class MIBreakpointsTest extends BaseTestCase {
assert(fBreakpointsDmc != null); assert(fBreakpointsDmc != null);
} }
@After @Override
public void testCaseCleanup() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest();
// Clear the references (not strictly necessary) // Clear the references (not strictly necessary)
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {

View file

@ -61,10 +61,6 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -148,18 +144,9 @@ public class MICatchpointsTest extends BaseTestCase {
// Housekeeping stuff // Housekeeping stuff
// ======================================================================== // ========================================================================
@BeforeClass @Override
public static void testSuiteInitialization() { public void doBeforeTest() throws Exception {
// Select the binary to run the tests against super.doBeforeTest();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL);
}
@AfterClass
public static void testSuiteCleanup() {
}
@Before
public void testCaseInitialization() throws Exception {
// Get a reference to the breakpoint service // Get a reference to the breakpoint service
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
@ -190,11 +177,20 @@ public class MICatchpointsTest extends BaseTestCase {
IContainerDMContext containerDmc = SyncUtil.getContainerContext(); IContainerDMContext containerDmc = SyncUtil.getContainerContext();
fBreakpointsDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class); fBreakpointsDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class);
assertNotNull(fBreakpointsDmc); assertNotNull(fBreakpointsDmc);
} }
@After @Override
public void testCaseCleanup() throws Exception { protected void setLaunchAttributes() {
super.setLaunchAttributes();
// Select the binary to run the tests against
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL);
}
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
public void run() { public void run() {

View file

@ -40,10 +40,6 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64; import org.eclipse.cdt.utils.Addr64;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -78,18 +74,10 @@ public class MIDisassemblyTest extends BaseTestCase {
// Housekeeping stuff // Housekeeping stuff
// ======================================================================== // ========================================================================
@BeforeClass @Override
public static void testSuiteInitialization() { public void doBeforeTest() throws Exception {
// Select the binary to run the tests against super.doBeforeTest();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/MemoryTestApp.exe");
}
@AfterClass
public static void testSuiteCleanup() {
}
@Before
public void testCaseInitialization() throws Exception {
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
@ -113,8 +101,18 @@ public class MIDisassemblyTest extends BaseTestCase {
} }
@After @Override
public void testCaseCleanup() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
// Select the binary to run the tests against
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/MemoryTestApp.exe");
}
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
fExpressionService = null; fExpressionService = null;
fDisassembly = null; fDisassembly = null;
fServicesTracker.dispose(); fServicesTracker.dispose();

View file

@ -10,8 +10,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.tests.dsf.gdb.tests; package org.eclipse.cdt.tests.dsf.gdb.tests;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
@ -52,9 +52,6 @@ import org.eclipse.cdt.utils.Addr32;
import org.eclipse.cdt.utils.Addr64; import org.eclipse.cdt.utils.Addr64;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
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;
@ -75,14 +72,17 @@ public class MIExpressionsTest extends BaseTestCase {
private IExpressionDMContext globalExpressionCtx1 = null; private IExpressionDMContext globalExpressionCtx1 = null;
private IExpressionDMContext globalExpressionCtx2 = null; private IExpressionDMContext globalExpressionCtx2 = null;
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
@BeforeClass
public static void beforeClassMethod() {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/ExpressionTestApp.exe"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/ExpressionTestApp.exe");
} }
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
@ -97,8 +97,10 @@ public class MIExpressionsTest extends BaseTestCase {
fSession.getExecutor().submit(runnable).get(); fSession.getExecutor().submit(runnable).get();
} }
@After @Override
public void shutdown() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
public void run() { public void run() {

View file

@ -40,10 +40,6 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.utils.Addr64; import org.eclipse.cdt.utils.Addr64;
import org.eclipse.debug.core.model.MemoryByte; import org.eclipse.debug.core.model.MemoryByte;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -81,18 +77,12 @@ public class MIMemoryTest extends BaseTestCase {
// Housekeeping stuff // Housekeeping stuff
// ======================================================================== // ========================================================================
@BeforeClass
public static void testSuiteInitialization() {
// Select the binary to run the tests against
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/MemoryTestApp.exe");
}
@AfterClass
public static void testSuiteCleanup() {
}
@Before @Override
public void testCaseInitialization() throws Throwable { public void doBeforeTest() throws Exception {
super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
fMemoryDmc = (IMemoryDMContext)SyncUtil.getContainerContext(); fMemoryDmc = (IMemoryDMContext)SyncUtil.getContainerContext();
assert(fMemoryDmc != null); assert(fMemoryDmc != null);
@ -121,8 +111,18 @@ public class MIMemoryTest extends BaseTestCase {
fSession.getExecutor().submit(runnable).get(); fSession.getExecutor().submit(runnable).get();
} }
@After @Override
public void testCaseCleanup() throws Exception { protected void setLaunchAttributes() {
super.setLaunchAttributes();
// Select the binary to run the tests against
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/MemoryTestApp.exe");
}
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
// Clear the references (not strictly necessary) // Clear the references (not strictly necessary)
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override

View file

@ -55,16 +55,12 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
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;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest extends BaseTestCase { public class MIRegistersTest extends BaseTestCase {
protected List<String> get_X86_REGS() { protected List<String> get_X86_REGS() {
@ -90,16 +86,16 @@ public class MIRegistersTest extends BaseTestCase {
private static final String EXEC_NAME = "MultiThread.exe"; private static final String EXEC_NAME = "MultiThread.exe";
private static final String SRC_NAME = "MultiThread.cc"; private static final String SRC_NAME = "MultiThread.cc";
// Will be used to wait for asynchronous call to complete
//private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
private DsfSession fSession; private DsfSession fSession;
private DsfServicesTracker fServicesTracker; private DsfServicesTracker fServicesTracker;
private IContainerDMContext fContainerDmc; private IContainerDMContext fContainerDmc;
private IRegisters fRegService; private IRegisters fRegService;
private IRunControl fRunControl; private IRunControl fRunControl;
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@ -121,15 +117,19 @@ public class MIRegistersTest extends BaseTestCase {
fSession.getExecutor().submit(runnable).get(); fSession.getExecutor().submit(runnable).get();
} }
@BeforeClass @Override
public static void beforeClassMethod() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME); EXEC_PATH + EXEC_NAME);
} }
@After @Override
public void tearDown() { public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose(); fServicesTracker.dispose();
fRegService = null; fRegService = null;
} }

View file

@ -37,10 +37,7 @@ 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.ServiceEventWaitor;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -70,8 +67,10 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase {
private static final String EXEC_NAME = "TargetAvail.exe"; private static final String EXEC_NAME = "TargetAvail.exe";
private static final String SOURCE_NAME = "TargetAvail.cc"; private static final String SOURCE_NAME = "TargetAvail.cc";
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
final DsfSession session = getGDBLaunch().getSession(); final DsfSession session = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@ -91,13 +90,17 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase {
} }
@After @Override
public void tearDown() { public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose(); fServicesTracker.dispose();
} }
@BeforeClass @Override
public static void beforeClassMethod() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME); EXEC_PATH + EXEC_NAME);
} }

View file

@ -52,10 +52,7 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
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;
@ -98,8 +95,10 @@ public class MIRunControlTest extends BaseTestCase {
private static final String EXEC_NAME = "MultiThread.exe"; private static final String EXEC_NAME = "MultiThread.exe";
private static final String SOURCE_NAME = "MultiThread.cc"; private static final String SOURCE_NAME = "MultiThread.cc";
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
final DsfSession session = getGDBLaunch().getSession(); final DsfSession session = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@ -123,13 +122,17 @@ public class MIRunControlTest extends BaseTestCase {
} }
@After @Override
public void tearDown() { public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose(); fServicesTracker.dispose();
} }
@BeforeClass @Override
public static void beforeClassMethod() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME); EXEC_PATH + EXEC_NAME);

View file

@ -38,10 +38,7 @@ 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.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.core.runtime.preferences.DefaultScope; import org.eclipse.core.runtime.preferences.DefaultScope;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.osgi.service.prefs.Preferences; import org.osgi.service.prefs.Preferences;
@ -70,8 +67,10 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
*/ */
private static final String EXEC_NAME = "TargetAvail.exe"; private static final String EXEC_NAME = "TargetAvail.exe";
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
final DsfSession session = getGDBLaunch().getSession(); final DsfSession session = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@ -92,13 +91,17 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
} }
@After @Override
public void tearDown() { public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose(); fServicesTracker.dispose();
} }
@BeforeClass @Override
public static void beforeClassMethod() { protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME); EXEC_PATH + EXEC_NAME);
} }
@ -110,7 +113,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
@Test @Test
public void restartWhileTargetRunningKillGDB() throws Throwable { public void restartWhileTargetRunningKillGDB() throws Throwable {
// Restart is not supported for a remote session // Restart is not supported for a remote session
if (BaseTestCase.isRemoteSession()) { if (isRemoteSession()) {
Assert.assertFalse("Restart operation should not be allowed for a remote session", Assert.assertFalse("Restart operation should not be allowed for a remote session",
SyncUtil.canRestart()); SyncUtil.canRestart());
return; return;
@ -140,7 +143,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
@Test @Test
public void restartWhileTargetRunningGDBAlive() throws Throwable { public void restartWhileTargetRunningGDBAlive() throws Throwable {
// Restart is not supported for a remote session // Restart is not supported for a remote session
if (BaseTestCase.isRemoteSession()) { if (isRemoteSession()) {
Assert.assertFalse("Restart operation should not be allowed for a remote session", Assert.assertFalse("Restart operation should not be allowed for a remote session",
SyncUtil.canRestart()); SyncUtil.canRestart());
return; return;

View file

@ -51,9 +51,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.MemoryByte; import org.eclipse.debug.core.model.MemoryByte;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
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;
@ -70,22 +67,16 @@ public class PostMortemCoreTest extends BaseTestCase {
private IMemoryDMContext fMemoryDmc; private IMemoryDMContext fMemoryDmc;
@Override
@BeforeClass public void doBeforeTest() throws Exception {
public static void beforeClassMethod() { setLaunchAttributes();
// 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.
} }
@Override @Override
@Before protected void setLaunchAttributes() {
public void baseBeforeMethod() throws Exception { super.setLaunchAttributes();
// The class BaseTestCase sets up the launch in its @BeforeClass method.
// Usually this is ok, because every test uses the same launch configuration.
// However, for some of the tests of this class, we are changing the launch
// configuration. Therefore, we need to reset it to the default
// before every test; that means in the @Before method instead of @BeforeClass
// Reset the launch configuration
super.baseBeforeClassMethod();
// Set a working directory for GDB that is different than eclipse's directory. // Set a working directory for GDB that is different than eclipse's directory.
// This allows us to make sure we properly handle finding the core file, // This allows us to make sure we properly handle finding the core file,
@ -103,18 +94,15 @@ public class PostMortemCoreTest extends BaseTestCase {
IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_CORE_FILE); IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_CORE_FILE);
// Set default core file path // Set default core file path
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, "data/launch/bin/core"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, "data/launch/bin/core");
// 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.
} }
// This method cannot be tagged as @Before, because the launch is not // This method cannot be tagged as @Before, because the launch is not
// running yet. We have to call this manually after all the proper // running yet. We have to call this manually after all the proper
// parameters have been set for the launch // parameters have been set for the launch
public void performLaunch() throws Exception { @Override
protected void doLaunch() throws Exception {
// perform the launch // perform the launch
super.baseBeforeMethod(); super.doLaunch();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
@ -132,8 +120,10 @@ public class PostMortemCoreTest extends BaseTestCase {
fSession.getExecutor().submit(runnable).get(); fSession.getExecutor().submit(runnable).get();
} }
@After @Override
public void shutdown() throws Exception { public void doAfterTest() throws Exception {
super.doAfterTest();
if (fSession != null) { if (fSession != null) {
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
@ -161,7 +151,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile);
performLaunch(); doLaunch();
// If the launch passed, we are ok, nothing more to check // If the launch passed, we are ok, nothing more to check
} }
@ -178,7 +168,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile);
performLaunch(); doLaunch();
// If the launch passed, we are ok, nothing more to check // If the launch passed, we are ok, nothing more to check
} }
@ -196,7 +186,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile);
try { try {
performLaunch(); doLaunch();
} catch (DebugException e) { } catch (DebugException e) {
// Success of the test // Success of the test
return; return;
@ -218,7 +208,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile);
try { try {
performLaunch(); doLaunch();
} catch (CoreException e) { } catch (CoreException e) {
// Success of the test // Success of the test
return; return;
@ -240,7 +230,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile);
try { try {
performLaunch(); doLaunch();
} catch (CoreException e) { } catch (CoreException e) {
// Success of the test // Success of the test
return; return;
@ -262,7 +252,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile);
try { try {
performLaunch(); doLaunch();
} catch (CoreException e) { } catch (CoreException e) {
// Success of the test // Success of the test
return; return;
@ -319,7 +309,7 @@ public class PostMortemCoreTest extends BaseTestCase {
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, coreFile); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, coreFile);
performLaunch(); doLaunch();
} }
/** /**
@ -327,7 +317,7 @@ public class PostMortemCoreTest extends BaseTestCase {
*/ */
@Test @Test
public void testLiteralIntegerExpressions() throws Throwable { public void testLiteralIntegerExpressions() throws Throwable {
performLaunch(); doLaunch();
// Create a map of expressions and their expected values. // Create a map of expressions and their expected values.
Map<String, String[]> tests = new HashMap<String, String[]>(); Map<String, String[]> tests = new HashMap<String, String[]>();
@ -350,7 +340,7 @@ public class PostMortemCoreTest extends BaseTestCase {
*/ */
@Test @Test
public void testLiteralFloatingPointExpressions() throws Throwable { public void testLiteralFloatingPointExpressions() throws Throwable {
performLaunch(); doLaunch();
// Create a map of expressions and their expected values. // Create a map of expressions and their expected values.
Map<String, String[]> tests = new HashMap<String, String[]>(); Map<String, String[]> tests = new HashMap<String, String[]>();
@ -374,7 +364,7 @@ public class PostMortemCoreTest extends BaseTestCase {
*/ */
@Test @Test
public void testLocalVariables() throws Throwable { public void testLocalVariables() throws Throwable {
performLaunch(); doLaunch();
// Create a map of expressions to expected values. // Create a map of expressions to expected values.
Map<String, String[]> tests1 = new HashMap<String, String[]>(); Map<String, String[]> tests1 = new HashMap<String, String[]>();
@ -406,7 +396,7 @@ public class PostMortemCoreTest extends BaseTestCase {
@Test @Test
public void readMemoryArray() throws Throwable { public void readMemoryArray() throws Throwable {
performLaunch(); doLaunch();
IAddress address = evaluateExpression(SyncUtil.getStackFrame(SyncUtil.getExecutionContext(0), 0), "&lBoolPtr2"); IAddress address = evaluateExpression(SyncUtil.getStackFrame(SyncUtil.getExecutionContext(0), 0), "&lBoolPtr2");

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest; import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_6_6 extends CommandTimeoutTest { public class CommandTimeoutTest_6_6 extends CommandTimeoutTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest; import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBProcessesTest_6_6 extends GDBProcessesTest { public class GDBProcessesTest_6_6 extends GDBProcessesTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,17 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.LaunchConfigurationAndRestartTest; import org.eclipse.cdt.tests.dsf.gdb.tests.LaunchConfigurationAndRestartTest;
import org.junit.Before;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_6_6 extends LaunchConfigurationAndRestartTest { public class LaunchConfigurationAndRestartTest_6_6 extends LaunchConfigurationAndRestartTest {
@Override
// For the launch config test, we must set the attributes in the @Before method protected void setGdbVersion() {
// instead of the @BeforeClass method. This is because the attributes are overwritten
// by the tests themselves
@Before
public void beforeMethod_6_6() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIBreakpointsTest_6_6 extends MIBreakpointsTest { public class MIBreakpointsTest_6_6 extends MIBreakpointsTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MICatchpointsTest_6_6 extends MICatchpointsTest { public class MICatchpointsTest_6_6 extends MICatchpointsTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -14,14 +14,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_6_6 extends MIDisassemblyTest { public class MIDisassemblyTest_6_6 extends MIDisassemblyTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,15 +13,14 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest;
import org.junit.BeforeClass;
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;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIExpressionsTest_6_6 extends MIExpressionsTest { public class MIExpressionsTest_6_6 extends MIExpressionsTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
@ -29,17 +28,26 @@ public class MIExpressionsTest_6_6 extends MIExpressionsTest {
@Ignore("Only works in versions later than GDB6.7") @Ignore("Only works in versions later than GDB6.7")
@Test @Test
public void testCanWriteLValue() throws Throwable { public void testCanWriteLValue() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testCanWriteLValue();
} }
@Override @Override
@Ignore("Only works in versions later than GDB6.6") @Ignore("Only works in versions later than GDB6.6")
@Test @Test
public void testChildren() throws Throwable { public void testChildren() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testChildren();
} }
@Override @Override
@Ignore("Only works in versions later than GDB6.6") @Ignore("Only works in versions later than GDB6.6")
@Test @Test
public void testDeleteChildren() throws Throwable { public void testDeleteChildren() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.testDeleteChildren();
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIMemoryTest_6_6 extends MIMemoryTest { public class MIMemoryTest_6_6 extends MIMemoryTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest_6_6 extends MIRegistersTest { public class MIRegistersTest_6_6 extends MIRegistersTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTargetAvailableTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTargetAvailableTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_6_6 extends MIRunControlTargetAvailableTest { public class MIRunControlTargetAvailableTest_6_6 extends MIRunControlTargetAvailableTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTest_6_6 extends MIRunControlTest { public class MIRunControlTest_6_6 extends MIRunControlTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.OperationsWhileTargetIsRunningTest; import org.eclipse.cdt.tests.dsf.gdb.tests.OperationsWhileTargetIsRunningTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_6_6 extends OperationsWhileTargetIsRunningTest { public class OperationsWhileTargetIsRunningTest_6_6 extends OperationsWhileTargetIsRunningTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_6_6 extends PostMortemCoreTest { public class PostMortemCoreTest_6_6 extends PostMortemCoreTest {
@BeforeClass @Override
public static void beforeClassMethod_6_6() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6);
} }
} }

View file

@ -12,15 +12,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.CommandTimeoutTest_6_6;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_6_7 extends CommandTimeoutTest { public class CommandTimeoutTest_6_7 extends CommandTimeoutTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -11,15 +11,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.GDBProcessesTest_6_6;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBProcessesTest_6_7 extends GDBProcessesTest { public class GDBProcessesTest_6_7 extends GDBProcessesTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -13,17 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.LaunchConfigurationAndRestartTest_6_6; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.LaunchConfigurationAndRestartTest_6_6;
import org.junit.Before;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_6_7 extends LaunchConfigurationAndRestartTest_6_6 { public class LaunchConfigurationAndRestartTest_6_7 extends LaunchConfigurationAndRestartTest_6_6 {
@Override
// For the launch config test, we must set the attributes in the @Before method protected void setGdbVersion() {
// instead of the @BeforeClass method. This is because the attributes are overwritten
// by the tests themselves
@Before
public void beforeMethod_6_7() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIBreakpointsTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIBreakpointsTest_6_7 extends MIBreakpointsTest { public class MIBreakpointsTest_6_7 extends MIBreakpointsTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MICatchpointsTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MICatchpointsTest_6_7 extends MICatchpointsTest { public class MICatchpointsTest_6_7 extends MICatchpointsTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -13,15 +13,14 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIDisassemblyTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_6_7 extends MIDisassemblyTest { public class MIDisassemblyTest_6_7 extends MIDisassemblyTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -12,22 +12,28 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIExpressionsTest_6_6;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIExpressionsTest_6_7 extends MIExpressionsTest { public class MIExpressionsTest_6_7 extends MIExpressionsTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
// Re-enable this test starting with GDB 6.7
@Override @Override
@Ignore("Only works in versions later than GDB6.7")
@Test @Test
public void testCanWriteLValue() throws Throwable { public void testChildren() throws Throwable {
super.testChildren();
}
// Re-enable this test starting with GDB 6.7
@Override
@Test
public void testDeleteChildren() throws Throwable {
super.testDeleteChildren();
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIMemoryTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIMemoryTest_6_7 extends MIMemoryTest { public class MIMemoryTest_6_7 extends MIMemoryTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRegistersTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest_6_7 extends MIRegistersTest { public class MIRegistersTest_6_7 extends MIRegistersTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTargetAvailableTest_6_6; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTargetAvailableTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_6_7 extends MIRunControlTargetAvailableTest_6_6 { public class MIRunControlTargetAvailableTest_6_7 extends MIRunControlTargetAvailableTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -13,14 +13,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTest_6_7 extends MIRunControlTest { public class MIRunControlTest_6_7 extends MIRunControlTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; 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.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.OperationsWhileTargetIsRunningTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_6_7 extends OperationsWhileTargetIsRunningTest_6_6 { public class OperationsWhileTargetIsRunningTest_6_7 extends OperationsWhileTargetIsRunningTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.PostMortemCoreTest_6_6;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_6_7 extends PostMortemCoreTest { public class PostMortemCoreTest_6_7 extends PostMortemCoreTest_6_6 {
@BeforeClass @Override
public static void beforeClassMethod_6_7() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7);
} }
} }

View file

@ -12,15 +12,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.CommandTimeoutTest_6_7;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_6_8 extends CommandTimeoutTest { public class CommandTimeoutTest_6_8 extends CommandTimeoutTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -11,15 +11,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.GDBProcessesTest_6_7;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBProcessesTest_6_8 extends GDBProcessesTest { public class GDBProcessesTest_6_8 extends GDBProcessesTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -13,17 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.LaunchConfigurationAndRestartTest_6_7; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.LaunchConfigurationAndRestartTest_6_7;
import org.junit.Before;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_6_8 extends LaunchConfigurationAndRestartTest_6_7 { public class LaunchConfigurationAndRestartTest_6_8 extends LaunchConfigurationAndRestartTest_6_7 {
@Override
// For the launch config test, we must set the attributes in the @Before method protected void setGdbVersion() {
// instead of the @BeforeClass method. This is because the attributes are overwritten
// by the tests themselves
@Before
public void beforeMethod_6_8() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -21,30 +21,30 @@ import org.eclipse.cdt.dsf.mi.service.MIBreakpoints.MIBreakpointDMContext;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIBreakpointsTest_6_7;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.junit.BeforeClass; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIBreakpointsTest_6_8 extends MIBreakpointsTest { public class MIBreakpointsTest_6_8 extends MIBreakpointsTest_6_7 {
@Override
@BeforeClass protected void setGdbVersion() {
public static void beforeClassMethod_6_8() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
@Override
@Test
public void breakpointHit_watchpointUpdateCondition() throws Throwable {
// GDB 6.8 has a bug that ignores watchpoint conditions,which makes this // GDB 6.8 has a bug that ignores watchpoint conditions,which makes this
// test fail. We therefore ignore this test for GDB 6.8 only, but run it // test fail. We therefore ignore this test for GDB 6.8 only, but run it
// for all other versions // for all other versions
if (getClass().equals(MIBreakpointsTest_6_8.class) == false) { @Override
@Ignore("This test does not work with GDB 6.8")
@Test
public void breakpointHit_watchpointUpdateCondition() throws Throwable {
// Must call the test in the super class to allow further derived
// classes to run this test.
super.breakpointHit_watchpointUpdateCondition(); super.breakpointHit_watchpointUpdateCondition();
} }
}
/** /**
* Starting with GDB 6.8, we request failed breakpoints to be pending in * Starting with GDB 6.8, we request failed breakpoints to be pending in

View file

@ -12,15 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MICatchpointsTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MICatchpointsTest_6_8 extends MICatchpointsTest { public class MICatchpointsTest_6_8 extends MICatchpointsTest_6_7 {
@Override
@BeforeClass protected void setGdbVersion() {
public static void beforeClassMethod_6_8() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -13,15 +13,14 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIDisassemblyTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_6_8 extends MIDisassemblyTest { public class MIDisassemblyTest_6_8 extends MIDisassemblyTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -12,14 +12,22 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIExpressionsTest_6_7;
import org.junit.BeforeClass; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIExpressionsTest_6_8 extends MIExpressionsTest { public class MIExpressionsTest_6_8 extends MIExpressionsTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
// Re-enable this test starting with GDB 6.8
@Override
@Test
public void testCanWriteLValue() throws Throwable {
super.testCanWriteLValue();
}
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIMemoryTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIMemoryTest_6_8 extends MIMemoryTest { public class MIMemoryTest_6_8 extends MIMemoryTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRegistersTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest_6_8 extends MIRegistersTest { public class MIRegistersTest_6_8 extends MIRegistersTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTargetAvailableTest_6_7; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTargetAvailableTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_6_8 extends MIRunControlTargetAvailableTest_6_7 { public class MIRunControlTargetAvailableTest_6_8 extends MIRunControlTargetAvailableTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -13,14 +13,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTest_6_8 extends MIRunControlTest { public class MIRunControlTest_6_8 extends MIRunControlTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; 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.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.OperationsWhileTargetIsRunningTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_6_8 extends OperationsWhileTargetIsRunningTest_6_7 { public class OperationsWhileTargetIsRunningTest_6_8 extends OperationsWhileTargetIsRunningTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.PostMortemCoreTest_6_7;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_6_8 extends PostMortemCoreTest { public class PostMortemCoreTest_6_8 extends PostMortemCoreTest_6_7 {
@BeforeClass @Override
public static void beforeClassMethod_6_8() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8);
} }
} }

View file

@ -12,15 +12,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.CommandTimeoutTest_6_8;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_7_0 extends CommandTimeoutTest { public class CommandTimeoutTest_7_0 extends CommandTimeoutTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -38,9 +38,6 @@ 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.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -50,6 +47,10 @@ import org.junit.runner.RunWith;
*/ */
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase { public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
@Override
protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
private DsfServicesTracker fServicesTracker; private DsfServicesTracker fServicesTracker;
@ -64,8 +65,10 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
*/ */
private static final String EXEC_NAME = "MultiThreadRunControl.exe"; private static final String EXEC_NAME = "MultiThreadRunControl.exe";
@Before @Override
public void init() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
final DsfSession session = getGDBLaunch().getSession(); final DsfSession session = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@ -80,15 +83,9 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
session.getExecutor().submit(runnable).get(); session.getExecutor().submit(runnable).get();
} }
@Override
@After protected void setLaunchAttributes() {
public void tearDown() { super.setLaunchAttributes();
fServicesTracker.dispose();
}
@BeforeClass
public static void beforeClassMethod_7_0() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
EXEC_PATH + EXEC_NAME); EXEC_PATH + EXEC_NAME);
@ -97,6 +94,13 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
fServicesTracker.dispose();
}
private abstract class AsyncRunnable<V> { private abstract class AsyncRunnable<V> {
public abstract void run(DataRequestMonitor<V> drm); public abstract void run(DataRequestMonitor<V> drm);
}; };

View file

@ -11,15 +11,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.GDBProcessesTest_6_8;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBProcessesTest_7_0 extends GDBProcessesTest { public class GDBProcessesTest_7_0 extends GDBProcessesTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -44,28 +44,15 @@ import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase;
import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
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;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase { public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/TracepointTestApp.exe");
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
// To test both fast and normal tracepoints, we use the FAST_THEN_NORMAL setting
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_TRACEPOINT_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_TRACEPOINT_FAST_THEN_NORMAL);
} }
protected DsfSession fSession; protected DsfSession fSession;
@ -161,8 +148,10 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
} }
@Before @Override
public void initialTest() throws Exception { public void doBeforeTest() throws Exception {
super.doBeforeTest();
fSession = getGDBLaunch().getSession(); fSession = getGDBLaunch().getSession();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
@ -190,8 +179,25 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
} }
@After @Override
public void shutdown() throws Exception { protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/TracepointTestApp.exe");
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
// To test both fast and normal tracepoints, we use the FAST_THEN_NORMAL setting
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_TRACEPOINT_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_TRACEPOINT_FAST_THEN_NORMAL);
}
@Override
public void doAfterTest() throws Exception {
super.doAfterTest();
Runnable runnable = new Runnable() { Runnable runnable = new Runnable() {
@Override @Override
public void run() { public void run() {

View file

@ -37,18 +37,14 @@ 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.framework.SyncUtil;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.LaunchConfigurationAndRestartTest_6_8; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.LaunchConfigurationAndRestartTest_6_8;
import org.junit.Before;
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;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAndRestartTest_6_8 { public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAndRestartTest_6_8 {
// For the launch config test, we must set the attributes in the @Before method @Override
// instead of the @BeforeClass method. This is because the attributes are overwritten protected void setGdbVersion() {
// by the tests themselves
@Before
public void beforeMethod_7_0() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
@ -66,7 +62,7 @@ public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAn
*/ */
@Test @Test
public void testPendingBreakpointSetting() throws Throwable { public void testPendingBreakpointSetting() throws Throwable {
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
final IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(stoppedEvent.getDMContext(), final IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(stoppedEvent.getDMContext(),
@ -119,7 +115,7 @@ public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAn
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
performLaunch(); doLaunch();
MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
// Make sure we stopped at the first line of main // Make sure we stopped at the first line of main
@ -195,7 +191,7 @@ public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAn
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther"); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther");
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true);
performLaunch(); doLaunch();
// Wait for the launch to properly complete. This is because with reverse // Wait for the launch to properly complete. This is because with reverse
// the first stopped event does not mean the launch is complete. There will // the first stopped event does not mean the launch is complete. There will
@ -280,7 +276,7 @@ public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAn
// MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED // MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED
// see testNoStopAtMain() // see testNoStopAtMain()
performLaunch(); doLaunch();
// Wait for the launch to properly complete. This is because with reverse // Wait for the launch to properly complete. This is because with reverse
// the first stopped event does not mean the launch is complete. There will // the first stopped event does not mean the launch is complete. There will

View file

@ -13,13 +13,23 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIBreakpointsTest_6_8; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIBreakpointsTest_6_8;
import org.junit.BeforeClass; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIBreakpointsTest_7_0 extends MIBreakpointsTest_6_8 { public class MIBreakpointsTest_7_0 extends MIBreakpointsTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
// GDB 6.8 has a bug that ignores watchpoint conditions,which makes this
// test fail. We therefore ignore this test for GDB 6.8 only, but run it
// for all other versions, so the code below re-enables the test starting
// with GDB 7.0.
@Override
@Test
public void breakpointHit_watchpointUpdateCondition() throws Throwable {
super.breakpointHit_watchpointUpdateCondition();
}
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MICatchpointsTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MICatchpointsTest_7_0 extends MICatchpointsTest { public class MICatchpointsTest_7_0 extends MICatchpointsTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -13,15 +13,14 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIDisassemblyTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_7_0 extends MIDisassemblyTest { public class MIDisassemblyTest_7_0 extends MIDisassemblyTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIExpressionsTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIExpressionsTest_7_0 extends MIExpressionsTest { public class MIExpressionsTest_7_0 extends MIExpressionsTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIMemoryTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIMemoryTest_7_0 extends MIMemoryTest { public class MIMemoryTest_7_0 extends MIMemoryTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRegistersTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest_7_0 extends MIRegistersTest { public class MIRegistersTest_7_0 extends MIRegistersTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlNonStopTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_7_0 { public class MIRunControlNonStopTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTargetAvailableTest_6_8; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTargetAvailableTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_6_8 { public class MIRunControlTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -14,14 +14,13 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason; import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTest_7_0 extends MIRunControlTest { public class MIRunControlTest_7_0 extends MIRunControlTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }

View file

@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningNonStopTest_7_0 extends OperationsWhileTargetIsRunningTest_7_0 { public class OperationsWhileTargetIsRunningNonStopTest_7_0 extends OperationsWhileTargetIsRunningTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; 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.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.OperationsWhileTargetIsRunningTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_7_0 extends OperationsWhileTargetIsRunningTest_6_8 { public class OperationsWhileTargetIsRunningTest_7_0 extends OperationsWhileTargetIsRunningTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.PostMortemCoreTest_6_8;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_7_0 extends PostMortemCoreTest { public class PostMortemCoreTest_7_0 extends PostMortemCoreTest_6_8 {
@BeforeClass @Override
public static void beforeClassMethod_7_0() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0);
} }
} }

View file

@ -12,15 +12,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.CommandTimeoutTest_7_0;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_7_1 extends CommandTimeoutTest { public class CommandTimeoutTest_7_1 extends CommandTimeoutTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -14,7 +14,6 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBMultiNonStopRunControlTest_7_0; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBMultiNonStopRunControlTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -23,8 +22,8 @@ import org.junit.runner.RunWith;
*/ */
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBMultiNonStopRunControlTest_7_1 extends GDBMultiNonStopRunControlTest_7_0 { public class GDBMultiNonStopRunControlTest_7_1 extends GDBMultiNonStopRunControlTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -11,15 +11,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBProcessesTest_7_0;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBProcessesTest_7_1 extends GDBProcessesTest { public class GDBProcessesTest_7_1 extends GDBProcessesTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBRemoteTracepointsTest_7_0; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBRemoteTracepointsTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBRemoteTracepointsTest_7_1 extends GDBRemoteTracepointsTest_7_0 { public class GDBRemoteTracepointsTest_7_1 extends GDBRemoteTracepointsTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -13,16 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.LaunchConfigurationAndRestartTest_7_0; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.LaunchConfigurationAndRestartTest_7_0;
import org.junit.Before;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_7_1 extends LaunchConfigurationAndRestartTest_7_0 { public class LaunchConfigurationAndRestartTest_7_1 extends LaunchConfigurationAndRestartTest_7_0 {
// For the launch config test, we must set the attributes in the @Before method @Override
// instead of the @BeforeClass method. This is because the attributes are overwritten protected void setGdbVersion() {
// by the tests themselves
@Before
public void beforeMethod_7_1() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIBreakpointsTest_7_0; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIBreakpointsTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIBreakpointsTest_7_1 extends MIBreakpointsTest_7_0 { public class MIBreakpointsTest_7_1 extends MIBreakpointsTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MICatchpointsTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MICatchpointsTest_7_1 extends MICatchpointsTest { public class MICatchpointsTest_7_1 extends MICatchpointsTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -13,15 +13,14 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIDisassemblyTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_7_1 extends MIDisassemblyTest { public class MIDisassemblyTest_7_1 extends MIDisassemblyTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIExpressionsTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIExpressionsTest_7_1 extends MIExpressionsTest { public class MIExpressionsTest_7_1 extends MIExpressionsTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIMemoryTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIMemoryTest_7_1 extends MIMemoryTest { public class MIMemoryTest_7_1 extends MIMemoryTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRegistersTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest_7_1 extends MIRegistersTest { public class MIRegistersTest_7_1 extends MIRegistersTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_1 { public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRunControlTargetAvailableTest_7_0; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRunControlTargetAvailableTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_0 { public class MIRunControlTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRunControlTest_7_0; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRunControlTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlTest_7_1 extends MIRunControlTest_7_0 { public class MIRunControlTest_7_1 extends MIRunControlTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningNonStopTest_7_1 extends OperationsWhileTargetIsRunningTest_7_1 { public class OperationsWhileTargetIsRunningNonStopTest_7_1 extends OperationsWhileTargetIsRunningTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; 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.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.OperationsWhileTargetIsRunningTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class OperationsWhileTargetIsRunningTest_7_1 extends OperationsWhileTargetIsRunningTest_7_0 { public class OperationsWhileTargetIsRunningTest_7_1 extends OperationsWhileTargetIsRunningTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.PostMortemCoreTest_7_0;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class PostMortemCoreTest_7_1 extends PostMortemCoreTest { public class PostMortemCoreTest_7_1 extends PostMortemCoreTest_7_0 {
@BeforeClass @Override
public static void beforeClassMethod_7_1() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1);
} }
} }

View file

@ -12,15 +12,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.CommandTimeoutTest_7_1;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class CommandTimeoutTest_7_2 extends CommandTimeoutTest { public class CommandTimeoutTest_7_2 extends CommandTimeoutTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -14,7 +14,6 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBMultiNonStopRunControlTest_7_1; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBMultiNonStopRunControlTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -23,8 +22,8 @@ import org.junit.runner.RunWith;
*/ */
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBMultiNonStopRunControlTest_7_2 extends GDBMultiNonStopRunControlTest_7_1 { public class GDBMultiNonStopRunControlTest_7_2 extends GDBMultiNonStopRunControlTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -11,15 +11,14 @@
package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2; 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.junit.BeforeClass; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBProcessesTest_7_1;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBProcessesTest_7_2 extends GDBProcessesTest { public class GDBProcessesTest_7_2 extends GDBProcessesTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -14,13 +14,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBRemoteTracepointsTest_7_1; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBRemoteTracepointsTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class GDBRemoteTracepointsTest_7_2 extends GDBRemoteTracepointsTest_7_1 { public class GDBRemoteTracepointsTest_7_2 extends GDBRemoteTracepointsTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }

View file

@ -13,16 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.LaunchConfigurationAndRestartTest_7_1; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.LaunchConfigurationAndRestartTest_7_1;
import org.junit.Before;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class LaunchConfigurationAndRestartTest_7_2 extends LaunchConfigurationAndRestartTest_7_1 { public class LaunchConfigurationAndRestartTest_7_2 extends LaunchConfigurationAndRestartTest_7_1 {
// For the launch config test, we must set the attributes in the @Before method @Override
// instead of the @BeforeClass method. This is because the attributes are overwritten protected void setGdbVersion() {
// by the tests themselves
@Before
public void beforeMethod_7_2() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -13,13 +13,12 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIBreakpointsTest_7_1; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIBreakpointsTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIBreakpointsTest_7_2 extends MIBreakpointsTest_7_1 { public class MIBreakpointsTest_7_2 extends MIBreakpointsTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MICatchpointsTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MICatchpointsTest_7_2 extends MICatchpointsTest { public class MICatchpointsTest_7_2 extends MICatchpointsTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -13,15 +13,14 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIDisassemblyTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIDisassemblyTest_7_2 extends MIDisassemblyTest { public class MIDisassemblyTest_7_2 extends MIDisassemblyTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIExpressionsTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIExpressionsTest_7_2 extends MIExpressionsTest { public class MIExpressionsTest_7_2 extends MIExpressionsTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -12,14 +12,13 @@ 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.framework.BackgroundRunner;
import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIMemoryTest_7_1;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIMemoryTest_7_2 extends MIMemoryTest { public class MIMemoryTest_7_2 extends MIMemoryTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }
} }

View file

@ -16,15 +16,14 @@ import java.util.List;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIRegistersTest_7_1;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRegistersTest_7_2 extends MIRegistersTest { public class MIRegistersTest_7_2 extends MIRegistersTest_7_1 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
} }

View file

@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2;
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; 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.ITestConstants;
import org.junit.BeforeClass;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@RunWith(BackgroundRunner.class) @RunWith(BackgroundRunner.class)
public class MIRunControlNonStopTargetAvailableTest_7_2 extends MIRunControlTargetAvailableTest_7_2 { public class MIRunControlNonStopTargetAvailableTest_7_2 extends MIRunControlTargetAvailableTest_7_2 {
@BeforeClass @Override
public static void beforeClassMethod_7_2() { protected void setGdbVersion() {
setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2);
}
@Override
protected void setLaunchAttributes() {
super.setLaunchAttributes();
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true);
} }
} }

Some files were not shown because too many files have changed in this diff Show more