diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java index 7d20fe9db2c..94c5d2decea 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java @@ -31,16 +31,15 @@ import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; import org.eclipse.cdt.utils.spawner.ProcessFactory; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Platform; +import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; import org.junit.After; -import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Rule; import org.junit.rules.TestName; @@ -62,10 +61,8 @@ public class BaseTestCase { private static GdbLaunch fLaunch; - // The set of attributes used for the launch - // These are seset to their default whenever a new class - // of tests is started. - private static Map launchAttributes; + // The set of attributes used for the launch of a single test. + private Map launchAttributes; // A set of global launch attributes which are not // reset when we load a new class of tests. @@ -87,11 +84,11 @@ public class BaseTestCase { public GdbLaunch getGDBLaunch() { return fLaunch; } - public static void setLaunchAttribute(String key, Object value) { + public void setLaunchAttribute(String key, Object value) { launchAttributes.put(key, value); } - public static void removeLaunchAttribute(String key) { + public void removeLaunchAttribute(String key) { launchAttributes.remove(key); } @@ -105,7 +102,7 @@ public class BaseTestCase { public synchronized MIStoppedEvent getInitialStoppedEvent() { return fInitialStoppedEvent; } - public static boolean isRemoteSession() { + public boolean isRemoteSession() { return launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE) .equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE); } @@ -173,13 +170,17 @@ public class BaseTestCase { } } } - - @BeforeClass - public static void baseBeforeClassMethod() { - // Clear all launch attributes before starting a new class of tests + + @Before + public void doBeforeTest() throws Exception { + setLaunchAttributes(); + doLaunch(); + } + + protected void setLaunchAttributes() { + // Clear all launch attributes before starting a new test launchAttributes = new HashMap(); - // Setup information for the launcher launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, DEFAULT_TEST_APP); 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_PORT, "9999"); + setGdbVersion(); + // Set the global launch attributes 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("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("===================================================================================================="); boolean postMortemLaunch = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE) @@ -272,22 +280,22 @@ public class BaseTestCase { } @After - public void baseAfterMethod() throws Exception { + public void doAfterTest() throws Exception { if (fLaunch != null) { - fLaunch.terminate(); + try { + fLaunch.terminate(); + } catch (DebugException e) { + assert false : "Could not terminate launch"; + } fLaunch = null; } } - - @AfterClass - public static void baseAfterClassMehod() throws Exception { - } - + /** * This method start gdbserver on the localhost. * 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) .equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE)) { if (launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP).equals(Boolean.TRUE)) { @@ -331,13 +339,17 @@ public class BaseTestCase { * string that contains the major and minor version number, e.g., * "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 boolean isWindows = Platform.getOS().equals(Platform.OS_WIN32); - BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb." + version + (isWindows ? ".exe" : "")); - BaseTestCase.setLaunchAttribute(ATTR_DEBUG_SERVER_NAME, "gdbserver." + version + (isWindows ? ".exe" : "")); + setGlobalLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb." + version + (isWindows ? ".exe" : "")); + setGlobalLaunchAttribute(ATTR_DEBUG_SERVER_NAME, "gdbserver." + version + (isWindows ? ".exe" : "")); } + protected void setGdbVersion() { + // Leave empty for the base class + } + /** * In some tests we need to start a gdbserver session without starting gdbserver. * This method allows super classes of this class control the launch of gdbserver. diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/CommandTimeoutTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/CommandTimeoutTest.java index 065d6924c15..7f30d962e89 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/CommandTimeoutTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/CommandTimeoutTest.java @@ -22,8 +22,6 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugException; -import org.junit.After; -import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,8 +33,7 @@ public class CommandTimeoutTest extends BaseTestCase { private static int fgTimeout = IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT; @BeforeClass - public static void beforeClassMethod() { - // Save the original values of the timeout-related preferences + public static void doBeforeClass() throws Exception { fgTimeoutEnabled = Platform.getPreferencesService().getBoolean( GdbPlugin.PLUGIN_ID, IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT, @@ -48,21 +45,32 @@ public class CommandTimeoutTest extends BaseTestCase { IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT, null ); } + + @Override + 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 + } - @Before @Override - public void baseBeforeMethod() throws Exception { - } + public void doAfterTest() throws Exception { + // Don't call super here, as the launch is already terminated - @After - @Override - public void baseAfterMethod() throws Exception { // Restore the timeout preferences IEclipsePreferences node = InstanceScope.INSTANCE.getNode( GdbPlugin.PLUGIN_ID ); node.putBoolean( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT, fgTimeoutEnabled ); 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 protected boolean reallyLaunchGDBServer() { 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} * with the status code 20100 which indicates that a gdb command has been timed out. diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ExampleTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ExampleTest.java deleted file mode 100644 index d2a7f003227..00000000000 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ExampleTest.java +++ /dev/null @@ -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"); - } - -} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java index 8c8fb00d626..773c08aa3b5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java @@ -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.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -62,8 +59,10 @@ public class GDBProcessesTest extends BaseTestCase { */ private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor(); - @Before - public void init() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + fSession = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @Override @@ -75,14 +74,18 @@ public class GDBProcessesTest extends BaseTestCase { fSession.getExecutor().submit(runnable).get(); } - @After - public void tearDown() { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + fProcService = null; fServicesTracker.dispose(); } - @BeforeClass - public static void beforeClassMethod() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java index a96c18f0a83..855d6656535 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java @@ -45,8 +45,6 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.ILaunchManager; -import org.junit.After; -import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -71,29 +69,27 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { protected boolean fRestart; @Override - @Before - public void baseBeforeMethod() throws Exception { - // 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 + 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. + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); - // 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 - // parameters. The individual tests will be responsible for starting the launch. } // This method cannot be tagged as @Before, because the launch is not // running yet. We have to call this manually after all the proper // parameters have been set for the launch - public void performLaunch() throws Exception { + @Override + protected void doLaunch() throws Exception { // perform the launch - super.baseBeforeMethod(); + super.doLaunch(); fSession = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -121,8 +117,10 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { } } - @After - public void shutdown() throws Exception { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + if (fServicesTracker != null) fServicesTracker.dispose(); } @@ -132,7 +130,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { private static String fFullProgramPath; @Test public void getFullPath() throws Throwable { - performLaunch(); + doLaunch(); MIStoppedEvent stopped = getInitialStoppedEvent(); fFullProgramPath = stopped.getFrame().getFullname(); } @@ -153,7 +151,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, dir); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, dir + PROGRAM_NAME); - performLaunch(); + doLaunch(); Query query = new Query() { @Override @@ -185,7 +183,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, "gdbinitThatDoesNotExist"); try { - performLaunch(); + doLaunch(); } catch (CoreException e) { // Success of the test return; @@ -203,7 +201,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit"); try { - performLaunch(); + doLaunch(); } catch (CoreException e) { 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 { setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, "data/launch/src/launchConfigTestGdbinit"); - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); @@ -286,7 +284,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { @Test public void testClearingEnvironment() throws Throwable { setLaunchAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, false); - performLaunch(); + doLaunch(); SyncUtil.runToLocation("envTest"); MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER); @@ -335,7 +333,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { Map map = new HashMap(1); map.put("LAUNCHTEST", "IS SET"); setLaunchAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map); - performLaunch(); + doLaunch(); SyncUtil.runToLocation("envTest"); MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER); @@ -409,7 +407,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { Map map = new HashMap(1); map.put("LAUNCHTEST", "IS SET"); setLaunchAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, map); - performLaunch(); + doLaunch(); SyncUtil.runToLocation("envTest"); MIStoppedEvent stoppedEvent = SyncUtil.step(2, StepType.STEP_OVER); @@ -477,7 +475,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { @Test public void testSettingArguments() throws Throwable { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "1 2 3\n4 5 6"); - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); @@ -544,7 +542,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { public void testStopAtMain() throws Throwable { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main"); - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); assertTrue("Expected to stop at main:27 but got " + @@ -571,7 +569,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { public void testStopAtOther() throws Throwable { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "stopAtOther"); - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); assertTrue("Expected to stop at stopAtOther but got " + @@ -608,7 +606,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase { IFile fakeFile = null; CDIDebugModel.createLineBreakpoint(PROGRAM, fakeFile, ICBreakpointType.REGULAR, LAST_LINE_IN_MAIN + 1, true, 0, "", true); //$NON-NLS-1$ - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); assertTrue("Expected to stop at envTest but got " + diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java index 73d8363f861..37dee117646 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java @@ -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.launching.TestsPlugin; 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.Test; import org.junit.runner.RunWith; @@ -167,18 +163,17 @@ public class MIBreakpointsTest extends BaseTestCase { // Housekeeping stuff // ======================================================================== - @BeforeClass - public static void testSuiteInitialization() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + // Select the binary to run the tests against setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL); } - @AfterClass - public static void testSuiteCleanup() { - } - - @Before - public void testCaseInitialization() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); // Get a reference to the breakpoint service fSession = getGDBLaunch().getSession(); @@ -210,9 +205,10 @@ public class MIBreakpointsTest extends BaseTestCase { assert(fBreakpointsDmc != null); } - @After - public void testCaseCleanup() throws Exception { - + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + // Clear the references (not strictly necessary) Runnable runnable = new Runnable() { @Override diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MICatchpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MICatchpointsTest.java index 6bde4a324f8..b205d223238 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MICatchpointsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MICatchpointsTest.java @@ -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.launching.TestsPlugin; 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.runner.RunWith; @@ -148,18 +144,9 @@ public class MICatchpointsTest extends BaseTestCase { // Housekeeping stuff // ======================================================================== - @BeforeClass - public static void testSuiteInitialization() { - // Select the binary to run the tests against - setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL); - } - - @AfterClass - public static void testSuiteCleanup() { - } - - @Before - public void testCaseInitialization() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); // Get a reference to the breakpoint service fSession = getGDBLaunch().getSession(); @@ -190,11 +177,20 @@ public class MICatchpointsTest extends BaseTestCase { IContainerDMContext containerDmc = SyncUtil.getContainerContext(); fBreakpointsDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class); assertNotNull(fBreakpointsDmc); - } - @After - public void testCaseCleanup() throws Exception { + @Override + 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() { @Override public void run() { diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java index 64066f25ba1..66c2e034927 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java @@ -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.launching.TestsPlugin; 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.runner.RunWith; @@ -78,18 +74,10 @@ public class MIDisassemblyTest extends BaseTestCase { // 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 - public void testCaseInitialization() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + fSession = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @Override @@ -113,8 +101,18 @@ public class MIDisassemblyTest extends BaseTestCase { } - @After - public void testCaseCleanup() { + @Override + 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; fDisassembly = null; fServicesTracker.dispose(); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java index 27990431e21..e3c852d90d1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java @@ -10,8 +10,8 @@ *******************************************************************************/ 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.assertTrue; import java.util.Arrays; import java.util.HashMap; @@ -52,9 +52,6 @@ import org.eclipse.cdt.utils.Addr32; import org.eclipse.cdt.utils.Addr64; import org.eclipse.core.runtime.IStatus; 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.Test; import org.junit.runner.RunWith; @@ -75,15 +72,18 @@ public class MIExpressionsTest extends BaseTestCase { private IExpressionDMContext globalExpressionCtx1 = null; private IExpressionDMContext globalExpressionCtx2 = null; - - @BeforeClass - public static void beforeClassMethod() { - setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/ExpressionTestApp.exe"); + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/ExpressionTestApp.exe"); } - @Before - public void init() throws Exception { - fSession = getGDBLaunch().getSession(); + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + + fSession = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @Override public void run() { @@ -97,8 +97,10 @@ public class MIExpressionsTest extends BaseTestCase { fSession.getExecutor().submit(runnable).get(); } - @After - public void shutdown() throws Exception { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + Runnable runnable = new Runnable() { @Override public void run() { diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java index b19499a435e..9ae8ae86279 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java @@ -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.utils.Addr64; 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.runner.RunWith; @@ -81,18 +77,12 @@ public class MIMemoryTest extends BaseTestCase { // 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 - public void testCaseInitialization() throws Throwable { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + fSession = getGDBLaunch().getSession(); fMemoryDmc = (IMemoryDMContext)SyncUtil.getContainerContext(); assert(fMemoryDmc != null); @@ -121,8 +111,18 @@ public class MIMemoryTest extends BaseTestCase { fSession.getExecutor().submit(runnable).get(); } - @After - public void testCaseCleanup() throws Exception { + @Override + 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) Runnable runnable = new Runnable() { @Override diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java index 5fbeaf37bbe..bffe6680735 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java @@ -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.launching.TestsPlugin; import org.eclipse.core.runtime.Platform; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) - public class MIRegistersTest extends BaseTestCase { protected List get_X86_REGS() { @@ -90,16 +86,16 @@ public class MIRegistersTest extends BaseTestCase { private static final String EXEC_NAME = "MultiThread.exe"; 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 DsfServicesTracker fServicesTracker; private IContainerDMContext fContainerDmc; private IRegisters fRegService; private IRunControl fRunControl; - - @Before - public void init() throws Exception { + + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + fSession = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -121,15 +117,19 @@ public class MIRegistersTest extends BaseTestCase { fSession.getExecutor().submit(runnable).get(); } - @BeforeClass - public static void beforeClassMethod() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); } - @After - public void tearDown() { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + fServicesTracker.dispose(); fRegService = null; } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java index 24d77348e29..6dc58f5dde9 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java @@ -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.SyncUtil; import org.eclipse.cdt.tests.dsf.gdb.launching.TestsPlugin; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -70,8 +67,10 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase { private static final String EXEC_NAME = "TargetAvail.exe"; private static final String SOURCE_NAME = "TargetAvail.cc"; - @Before - public void init() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + final DsfSession session = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -91,13 +90,17 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase { } - @After - public void tearDown() { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + fServicesTracker.dispose(); } - @BeforeClass - public static void beforeClassMethod() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java index 1616e126efa..5325d8570bf 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java @@ -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.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; 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 SOURCE_NAME = "MultiThread.cc"; - @Before - public void init() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + final DsfSession session = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -123,13 +122,17 @@ public class MIRunControlTest extends BaseTestCase { } - @After - public void tearDown() { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + fServicesTracker.dispose(); } - @BeforeClass - public static void beforeClassMethod() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java index b2c1c25c802..034c690b15f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java @@ -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.launching.TestsPlugin; import org.eclipse.core.runtime.preferences.DefaultScope; -import org.junit.After; import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import org.osgi.service.prefs.Preferences; @@ -70,8 +67,10 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { */ private static final String EXEC_NAME = "TargetAvail.exe"; - @Before - public void init() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + final DsfSession session = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -92,13 +91,17 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { } - @After - public void tearDown() { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + fServicesTracker.dispose(); } - @BeforeClass - public static void beforeClassMethod() { + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); } @@ -110,7 +113,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { @Test public void restartWhileTargetRunningKillGDB() throws Throwable { // 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", SyncUtil.canRestart()); return; @@ -140,7 +143,7 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase { @Test public void restartWhileTargetRunningGDBAlive() throws Throwable { // 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", SyncUtil.canRestart()); return; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/PostMortemCoreTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/PostMortemCoreTest.java index 47b2dff57c0..987efba0659 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/PostMortemCoreTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/PostMortemCoreTest.java @@ -51,9 +51,6 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.debug.core.DebugException; 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.Test; import org.junit.runner.RunWith; @@ -70,22 +67,16 @@ public class PostMortemCoreTest extends BaseTestCase { private IMemoryDMContext fMemoryDmc; - - @BeforeClass - public static void beforeClassMethod() { - } - @Override - @Before - public void baseBeforeMethod() throws Exception { - // 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(); + 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. + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); // 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, @@ -103,18 +94,15 @@ public class PostMortemCoreTest extends BaseTestCase { IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_CORE_FILE); // Set default core file path 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 // running yet. We have to call this manually after all the proper // parameters have been set for the launch - public void performLaunch() throws Exception { + @Override + protected void doLaunch() throws Exception { // perform the launch - super.baseBeforeMethod(); + super.doLaunch(); fSession = getGDBLaunch().getSession(); @@ -132,8 +120,10 @@ public class PostMortemCoreTest extends BaseTestCase { fSession.getExecutor().submit(runnable).get(); } - @After - public void shutdown() throws Exception { + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + if (fSession != null) { Runnable runnable = new Runnable() { @Override @@ -161,7 +151,7 @@ public class PostMortemCoreTest extends BaseTestCase { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile); - performLaunch(); + doLaunch(); // 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); - performLaunch(); + doLaunch(); // 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); try { - performLaunch(); + doLaunch(); } catch (DebugException e) { // Success of the test return; @@ -218,7 +208,7 @@ public class PostMortemCoreTest extends BaseTestCase { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile); try { - performLaunch(); + doLaunch(); } catch (CoreException e) { // Success of the test return; @@ -240,7 +230,7 @@ public class PostMortemCoreTest extends BaseTestCase { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, absoluteCoreFile); try { - performLaunch(); + doLaunch(); } catch (CoreException e) { // Success of the test return; @@ -262,7 +252,7 @@ public class PostMortemCoreTest extends BaseTestCase { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, relativeCoreFile); try { - performLaunch(); + doLaunch(); } catch (CoreException e) { // Success of the test return; @@ -319,7 +309,7 @@ public class PostMortemCoreTest extends BaseTestCase { setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, coreFile); - performLaunch(); + doLaunch(); } /** @@ -327,7 +317,7 @@ public class PostMortemCoreTest extends BaseTestCase { */ @Test public void testLiteralIntegerExpressions() throws Throwable { - performLaunch(); + doLaunch(); // Create a map of expressions and their expected values. Map tests = new HashMap(); @@ -350,7 +340,7 @@ public class PostMortemCoreTest extends BaseTestCase { */ @Test public void testLiteralFloatingPointExpressions() throws Throwable { - performLaunch(); + doLaunch(); // Create a map of expressions and their expected values. Map tests = new HashMap(); @@ -374,7 +364,7 @@ public class PostMortemCoreTest extends BaseTestCase { */ @Test public void testLocalVariables() throws Throwable { - performLaunch(); + doLaunch(); // Create a map of expressions to expected values. Map tests1 = new HashMap(); @@ -406,7 +396,7 @@ public class PostMortemCoreTest extends BaseTestCase { @Test public void readMemoryArray() throws Throwable { - performLaunch(); + doLaunch(); IAddress address = evaluateExpression(SyncUtil.getStackFrame(SyncUtil.getExecutionContext(0), 0), "&lBoolPtr2"); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/CommandTimeoutTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/CommandTimeoutTest_6_6.java index 2f087862af3..dfbf724aa35 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/CommandTimeoutTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/CommandTimeoutTest_6_6.java @@ -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.tests.CommandTimeoutTest; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class CommandTimeoutTest_6_6 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/GDBProcessesTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/GDBProcessesTest_6_6.java index 37a913ef954..ce7a1c1b0c0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/GDBProcessesTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/GDBProcessesTest_6_6.java @@ -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.tests.GDBProcessesTest; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBProcessesTest_6_6 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/LaunchConfigurationAndRestartTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/LaunchConfigurationAndRestartTest_6_6.java index 39365b856e6..a7f6486f5c4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/LaunchConfigurationAndRestartTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/LaunchConfigurationAndRestartTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.LaunchConfigurationAndRestartTest; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_6_6 extends LaunchConfigurationAndRestartTest { - - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIBreakpointsTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIBreakpointsTest_6_6.java index 5398ff7ee4e..fb510d72781 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIBreakpointsTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIBreakpointsTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_6_6 extends MIBreakpointsTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MICatchpointsTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MICatchpointsTest_6_6.java index 65389fc3001..ad918a2ac3f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MICatchpointsTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MICatchpointsTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MICatchpointsTest_6_6 extends MICatchpointsTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIDisassemblyTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIDisassemblyTest_6_6.java index 87feb1b25a1..55c9733bddf 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIDisassemblyTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIDisassemblyTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIDisassemblyTest_6_6 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIExpressionsTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIExpressionsTest_6_6.java index 0f574abace8..7a21147c499 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIExpressionsTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIExpressionsTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; -import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIExpressionsTest_6_6 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { 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") @Test 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 @Ignore("Only works in versions later than GDB6.6") @Test 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 @Ignore("Only works in versions later than GDB6.6") @Test public void testDeleteChildren() throws Throwable { + // Must call the test in the super class to allow further derived + // classes to run this test. + super.testDeleteChildren(); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIMemoryTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIMemoryTest_6_6.java index 9acfdf1d0d0..7ec3dc55dfd 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIMemoryTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIMemoryTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIMemoryTest_6_6 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRegistersTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRegistersTest_6_6.java index 97442654bbc..dc55569fc83 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRegistersTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRegistersTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRegistersTest_6_6 extends MIRegistersTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTargetAvailableTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTargetAvailableTest_6_6.java index a0943f7cfb9..e68df046219 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTargetAvailableTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTargetAvailableTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTargetAvailableTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_6_6 extends MIRunControlTargetAvailableTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTest_6_6.java index 604fb899790..17697757263 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTest_6_6 extends MIRunControlTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java index 6ac401efee9..10efae6e46d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/OperationsWhileTargetIsRunningTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.OperationsWhileTargetIsRunningTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_6_6 extends OperationsWhileTargetIsRunningTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/PostMortemCoreTest_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/PostMortemCoreTest_6_6.java index 533159110b5..7569d953bbc 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/PostMortemCoreTest_6_6.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/PostMortemCoreTest_6_6.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class PostMortemCoreTest_6_6 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_6_6() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_6); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/CommandTimeoutTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/CommandTimeoutTest_6_7.java index 1ab85b63073..358ba3b81f1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/CommandTimeoutTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/CommandTimeoutTest_6_7.java @@ -12,15 +12,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.tests.CommandTimeoutTest; 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; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_6_7 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class CommandTimeoutTest_6_7 extends CommandTimeoutTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/GDBProcessesTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/GDBProcessesTest_6_7.java index 25b15d055d0..001b441e25e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/GDBProcessesTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/GDBProcessesTest_6_7.java @@ -11,15 +11,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.tests.GDBProcessesTest; 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; @RunWith(BackgroundRunner.class) -public class GDBProcessesTest_6_7 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class GDBProcessesTest_6_7 extends GDBProcessesTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/LaunchConfigurationAndRestartTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/LaunchConfigurationAndRestartTest_6_7.java index 986aa0d04b1..2425c96c75e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/LaunchConfigurationAndRestartTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/LaunchConfigurationAndRestartTest_6_7.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.LaunchConfigurationAndRestartTest_6_6; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_6_7 extends LaunchConfigurationAndRestartTest_6_6 { - - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_6_7() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIBreakpointsTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIBreakpointsTest_6_7.java index 9afd02d79d5..7bcc2b69135 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIBreakpointsTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIBreakpointsTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIBreakpointsTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIBreakpointsTest_6_7 extends MIBreakpointsTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MIBreakpointsTest_6_7 extends MIBreakpointsTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MICatchpointsTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MICatchpointsTest_6_7.java index 98003a0c163..6fe10a5c723 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MICatchpointsTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MICatchpointsTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MICatchpointsTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MICatchpointsTest_6_7 extends MICatchpointsTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MICatchpointsTest_6_7 extends MICatchpointsTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIDisassemblyTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIDisassemblyTest_6_7.java index 793722fe07a..8bd85b1506a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIDisassemblyTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIDisassemblyTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIDisassemblyTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIDisassemblyTest_6_7 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MIDisassemblyTest_6_7 extends MIDisassemblyTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIExpressionsTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIExpressionsTest_6_7.java index 489cb1ce184..9be74a6c0e1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIExpressionsTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIExpressionsTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; -import org.junit.BeforeClass; -import org.junit.Ignore; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIExpressionsTest_6_6; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIExpressionsTest_6_7 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MIExpressionsTest_6_7 extends MIExpressionsTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } + // Re-enable this test starting with GDB 6.7 @Override - @Ignore("Only works in versions later than GDB6.7") @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(); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIMemoryTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIMemoryTest_6_7.java index e9c894e09e7..116c3fe5902 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIMemoryTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIMemoryTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIMemoryTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIMemoryTest_6_7 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MIMemoryTest_6_7 extends MIMemoryTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRegistersTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRegistersTest_6_7.java index 4558897207e..e0fa8d07bb7 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRegistersTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRegistersTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRegistersTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRegistersTest_6_7 extends MIRegistersTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MIRegistersTest_6_7 extends MIRegistersTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTargetAvailableTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTargetAvailableTest_6_7.java index e38b0a8c3b7..e03b8c95c4c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTargetAvailableTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTargetAvailableTest_6_7.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTargetAvailableTest_6_6; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_6_7 extends MIRunControlTargetAvailableTest_6_6 { - @BeforeClass - public static void beforeClassMethod_6_7() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTest_6_7.java index 2ee1e693d19..400089611c3 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.MIRunControlTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRunControlTest_6_7 extends MIRunControlTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class MIRunControlTest_6_7 extends MIRunControlTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java index 47279cf429b..07321019a5e 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/OperationsWhileTargetIsRunningTest_6_7.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.OperationsWhileTargetIsRunningTest_6_6; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_6_7 extends OperationsWhileTargetIsRunningTest_6_6 { - @BeforeClass - public static void beforeClassMethod_6_7() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/PostMortemCoreTest_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/PostMortemCoreTest_6_7.java index 06fb552bd12..8900c7011bb 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/PostMortemCoreTest_6_7.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/PostMortemCoreTest_6_7.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.PostMortemCoreTest_6_6; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class PostMortemCoreTest_6_7 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_6_7() { +public class PostMortemCoreTest_6_7 extends PostMortemCoreTest_6_6 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_7); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/CommandTimeoutTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/CommandTimeoutTest_6_8.java index f8e57790df0..6e706e61cf8 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/CommandTimeoutTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/CommandTimeoutTest_6_8.java @@ -12,15 +12,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.tests.CommandTimeoutTest; 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; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_6_8 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class CommandTimeoutTest_6_8 extends CommandTimeoutTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/GDBProcessesTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/GDBProcessesTest_6_8.java index 7d3fc4be7c4..0542c64994a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/GDBProcessesTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/GDBProcessesTest_6_8.java @@ -11,15 +11,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.tests.GDBProcessesTest; 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; @RunWith(BackgroundRunner.class) -public class GDBProcessesTest_6_8 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class GDBProcessesTest_6_8 extends GDBProcessesTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/LaunchConfigurationAndRestartTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/LaunchConfigurationAndRestartTest_6_8.java index 6146d72ab29..0c476b679c6 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/LaunchConfigurationAndRestartTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/LaunchConfigurationAndRestartTest_6_8.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.LaunchConfigurationAndRestartTest_6_7; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_6_8 extends LaunchConfigurationAndRestartTest_6_7 { - - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_6_8() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIBreakpointsTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIBreakpointsTest_6_8.java index 3ecf5474c10..3136a221ed4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIBreakpointsTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIBreakpointsTest_6_8.java @@ -21,29 +21,29 @@ 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.SyncUtil; 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.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIBreakpointsTest_6_8 extends MIBreakpointsTest { - - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MIBreakpointsTest_6_8 extends MIBreakpointsTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } + // 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 @Override + @Ignore("This test does not work with GDB 6.8") @Test public void breakpointHit_watchpointUpdateCondition() throws Throwable { - // 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 - if (getClass().equals(MIBreakpointsTest_6_8.class) == false) { - super.breakpointHit_watchpointUpdateCondition(); - } + // Must call the test in the super class to allow further derived + // classes to run this test. + super.breakpointHit_watchpointUpdateCondition(); } /** diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MICatchpointsTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MICatchpointsTest_6_8.java index 01434c17c5e..6a620f75a0b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MICatchpointsTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MICatchpointsTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MICatchpointsTest_6_7; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MICatchpointsTest_6_8 extends MICatchpointsTest { - - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MICatchpointsTest_6_8 extends MICatchpointsTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIDisassemblyTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIDisassemblyTest_6_8.java index e6378a00635..9febfea7b09 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIDisassemblyTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIDisassemblyTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIDisassemblyTest_6_7; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIDisassemblyTest_6_8 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MIDisassemblyTest_6_8 extends MIDisassemblyTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIExpressionsTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIExpressionsTest_6_8.java index 9777a023f5a..df2f5498bb8 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIExpressionsTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIExpressionsTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIExpressionsTest_6_7; +import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIExpressionsTest_6_8 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MIExpressionsTest_6_8 extends MIExpressionsTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } + + // Re-enable this test starting with GDB 6.8 + @Override + @Test + public void testCanWriteLValue() throws Throwable { + super.testCanWriteLValue(); + } + } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIMemoryTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIMemoryTest_6_8.java index 194f1173a56..391fa0af8a7 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIMemoryTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIMemoryTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIMemoryTest_6_7; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIMemoryTest_6_8 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MIMemoryTest_6_8 extends MIMemoryTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRegistersTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRegistersTest_6_8.java index 419a19efe2a..56fd7770ef4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRegistersTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRegistersTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRegistersTest_6_7; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRegistersTest_6_8 extends MIRegistersTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MIRegistersTest_6_8 extends MIRegistersTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTargetAvailableTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTargetAvailableTest_6_8.java index 7346424abe3..74520f57a44 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTargetAvailableTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTargetAvailableTest_6_8.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTargetAvailableTest_6_7; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_6_8 extends MIRunControlTargetAvailableTest_6_7 { - @BeforeClass - public static void beforeClassMethod_6_8() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTest_6_8.java index f584f7a6304..ecdd58f91a1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.MIRunControlTest_6_7; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRunControlTest_6_8 extends MIRunControlTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class MIRunControlTest_6_8 extends MIRunControlTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java index c59f4db02f8..e98786053a3 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/OperationsWhileTargetIsRunningTest_6_8.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.OperationsWhileTargetIsRunningTest_6_7; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_6_8 extends OperationsWhileTargetIsRunningTest_6_7 { - @BeforeClass - public static void beforeClassMethod_6_8() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/PostMortemCoreTest_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/PostMortemCoreTest_6_8.java index 2d6cac74dd2..f71756e0b04 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/PostMortemCoreTest_6_8.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/PostMortemCoreTest_6_8.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.PostMortemCoreTest_6_7; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class PostMortemCoreTest_6_8 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_6_8() { +public class PostMortemCoreTest_6_8 extends PostMortemCoreTest_6_7 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_6_8); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/CommandTimeoutTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/CommandTimeoutTest_7_0.java index eb8c7759e0a..e52dd8f3e3a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/CommandTimeoutTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/CommandTimeoutTest_7_0.java @@ -12,15 +12,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.tests.CommandTimeoutTest; 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; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_7_0 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class CommandTimeoutTest_7_0 extends CommandTimeoutTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBMultiNonStopRunControlTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBMultiNonStopRunControlTest_7_0.java index 31d8ba38f37..223c3bc63aa 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBMultiNonStopRunControlTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBMultiNonStopRunControlTest_7_0.java @@ -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.launching.TestsPlugin; 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.runner.RunWith; @@ -50,6 +47,10 @@ import org.junit.runner.RunWith; */ @RunWith(BackgroundRunner.class) public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase { + @Override + protected void setGdbVersion() { + setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); + } private DsfServicesTracker fServicesTracker; @@ -64,8 +65,10 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase { */ private static final String EXEC_NAME = "MultiThreadRunControl.exe"; - @Before - public void init() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + final DsfSession session = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @@ -80,15 +83,9 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase { session.getExecutor().submit(runnable).get(); } - - @After - public void tearDown() { - fServicesTracker.dispose(); - } - - @BeforeClass - public static void beforeClassMethod_7_0() { - setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME); @@ -96,6 +93,13 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase { // Multi run control only makes sense for non-stop mode setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } + + @Override + public void doAfterTest() throws Exception { + super.doAfterTest(); + + fServicesTracker.dispose(); + } private abstract class AsyncRunnable { public abstract void run(DataRequestMonitor drm); diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBProcessesTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBProcessesTest_7_0.java index 543639a8b31..9143e8c0eac 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBProcessesTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBProcessesTest_7_0.java @@ -11,15 +11,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.tests.GDBProcessesTest; 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; @RunWith(BackgroundRunner.class) -public class GDBProcessesTest_7_0 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class GDBProcessesTest_7_0 extends GDBProcessesTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBRemoteTracepointsTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBRemoteTracepointsTest_7_0.java index 1068854289a..36b71e998c1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBRemoteTracepointsTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBRemoteTracepointsTest_7_0.java @@ -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.launching.TestsPlugin; 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.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase { - @BeforeClass - public static void beforeClassMethod_7_0() { + @Override + protected void setGdbVersion() { 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; @@ -161,8 +148,10 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase { } - @Before - public void initialTest() throws Exception { + @Override + public void doBeforeTest() throws Exception { + super.doBeforeTest(); + fSession = getGDBLaunch().getSession(); Runnable runnable = new Runnable() { @Override @@ -190,8 +179,25 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase { } - @After - public void shutdown() throws Exception { + @Override + 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() { @Override public void run() { diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/LaunchConfigurationAndRestartTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/LaunchConfigurationAndRestartTest_7_0.java index 77e3294d9ad..eb0f65564c0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/LaunchConfigurationAndRestartTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/LaunchConfigurationAndRestartTest_7_0.java @@ -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.tests.ITestConstants; 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.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAndRestartTest_6_8 { - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_7_0() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } @@ -66,7 +62,7 @@ public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAn */ @Test public void testPendingBreakpointSetting() throws Throwable { - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); 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_SYMBOL, "main"); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true); - performLaunch(); + doLaunch(); MIStoppedEvent stoppedEvent = getInitialStoppedEvent(); // 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_SYMBOL, "stopAtOther"); setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE, true); - performLaunch(); + doLaunch(); // 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 @@ -280,7 +276,7 @@ public class LaunchConfigurationAndRestartTest_7_0 extends LaunchConfigurationAn // MUST SET BREAKPOINT AT LAST LINE BUT BEFORE LAUNCH IS STARTED // see testNoStopAtMain() - performLaunch(); + doLaunch(); // 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 diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIBreakpointsTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIBreakpointsTest_7_0.java index 9229a89db5d..dc34c9b220a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIBreakpointsTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIBreakpointsTest_7_0.java @@ -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.tests.ITestConstants; 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; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_7_0 extends MIBreakpointsTest_6_8 { - @BeforeClass - public static void beforeClassMethod_7_0() { + @Override + protected void setGdbVersion() { 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(); + } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MICatchpointsTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MICatchpointsTest_7_0.java index 5a8a6a02085..beca04f2a2d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MICatchpointsTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MICatchpointsTest_7_0.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MICatchpointsTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MICatchpointsTest_7_0 extends MICatchpointsTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class MICatchpointsTest_7_0 extends MICatchpointsTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIDisassemblyTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIDisassemblyTest_7_0.java index 51056916e5a..8fadfaa8c24 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIDisassemblyTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIDisassemblyTest_7_0.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIDisassemblyTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIDisassemblyTest_7_0 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class MIDisassemblyTest_7_0 extends MIDisassemblyTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIExpressionsTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIExpressionsTest_7_0.java index 97b18e5bd7a..31859920684 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIExpressionsTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIExpressionsTest_7_0.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIExpressionsTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIExpressionsTest_7_0 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class MIExpressionsTest_7_0 extends MIExpressionsTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIMemoryTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIMemoryTest_7_0.java index 42d95bcc31e..3666020f618 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIMemoryTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIMemoryTest_7_0.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIMemoryTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIMemoryTest_7_0 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class MIMemoryTest_7_0 extends MIMemoryTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRegistersTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRegistersTest_7_0.java index ef12553435e..35b72831ed1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRegistersTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRegistersTest_7_0.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRegistersTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRegistersTest_7_0 extends MIRegistersTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class MIRegistersTest_7_0 extends MIRegistersTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlNonStopTargetAvailableTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlNonStopTargetAvailableTest_7_0.java index 04327ae357f..a16dbdb62ff 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlNonStopTargetAvailableTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlNonStopTargetAvailableTest_7_0.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlNonStopTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_0() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTargetAvailableTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTargetAvailableTest_7_0.java index 894eda4676c..fcd3913b22d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTargetAvailableTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTargetAvailableTest_7_0.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTargetAvailableTest_6_8; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_7_0 extends MIRunControlTargetAvailableTest_6_8 { - @BeforeClass - public static void beforeClassMethod_7_0() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTest_7_0.java index 493eaa63a76..13d042c06c0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTest_7_0.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.MIRunControlTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRunControlTest_7_0 extends MIRunControlTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class MIRunControlTest_7_0 extends MIRunControlTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java index d4634088a67..1cc1b34badc 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningNonStopTest_7_0.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningNonStopTest_7_0 extends OperationsWhileTargetIsRunningTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_0() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java index a79c85194f8..3f42110549a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/OperationsWhileTargetIsRunningTest_7_0.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.OperationsWhileTargetIsRunningTest_6_8; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_7_0 extends OperationsWhileTargetIsRunningTest_6_8 { - @BeforeClass - public static void beforeClassMethod_7_0() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/PostMortemCoreTest_7_0.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/PostMortemCoreTest_7_0.java index 55e16d65535..e547eb3c542 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/PostMortemCoreTest_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/PostMortemCoreTest_7_0.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.PostMortemCoreTest_6_8; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class PostMortemCoreTest_7_0 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_7_0() { +public class PostMortemCoreTest_7_0 extends PostMortemCoreTest_6_8 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_0); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/CommandTimeoutTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/CommandTimeoutTest_7_1.java index b3de8a12d57..13e05dba080 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/CommandTimeoutTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/CommandTimeoutTest_7_1.java @@ -12,15 +12,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.tests.CommandTimeoutTest; 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; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_7_1 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class CommandTimeoutTest_7_1 extends CommandTimeoutTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBMultiNonStopRunControlTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBMultiNonStopRunControlTest_7_1.java index d93090b1102..ff2cab0d1d5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBMultiNonStopRunControlTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBMultiNonStopRunControlTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBMultiNonStopRunControlTest_7_0; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @@ -23,8 +22,8 @@ import org.junit.runner.RunWith; */ @RunWith(BackgroundRunner.class) public class GDBMultiNonStopRunControlTest_7_1 extends GDBMultiNonStopRunControlTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBProcessesTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBProcessesTest_7_1.java index e4a390c2f48..72e60e6554b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBProcessesTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBProcessesTest_7_1.java @@ -11,15 +11,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.tests.GDBProcessesTest; 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; @RunWith(BackgroundRunner.class) -public class GDBProcessesTest_7_1 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class GDBProcessesTest_7_1 extends GDBProcessesTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBRemoteTracepointsTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBRemoteTracepointsTest_7_1.java index 56a54409f25..e6a7ee10b66 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBRemoteTracepointsTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/GDBRemoteTracepointsTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.GDBRemoteTracepointsTest_7_0; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBRemoteTracepointsTest_7_1 extends GDBRemoteTracepointsTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/LaunchConfigurationAndRestartTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/LaunchConfigurationAndRestartTest_7_1.java index 408c23cac39..2de683fa952 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/LaunchConfigurationAndRestartTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/LaunchConfigurationAndRestartTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.LaunchConfigurationAndRestartTest_7_0; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_7_1 extends LaunchConfigurationAndRestartTest_7_0 { - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIBreakpointsTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIBreakpointsTest_7_1.java index 76b3867992b..663696f960f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIBreakpointsTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIBreakpointsTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIBreakpointsTest_7_0; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_7_1 extends MIBreakpointsTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MICatchpointsTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MICatchpointsTest_7_1.java index 925e4008555..b2a22dc34e3 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MICatchpointsTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MICatchpointsTest_7_1.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MICatchpointsTest_7_0; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MICatchpointsTest_7_1 extends MICatchpointsTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class MICatchpointsTest_7_1 extends MICatchpointsTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIDisassemblyTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIDisassemblyTest_7_1.java index 3ea98e801fb..25e09ab1fe1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIDisassemblyTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIDisassemblyTest_7_1.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIDisassemblyTest_7_0; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIDisassemblyTest_7_1 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class MIDisassemblyTest_7_1 extends MIDisassemblyTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIExpressionsTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIExpressionsTest_7_1.java index 0b3c9d6b824..67bfb98f5a8 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIExpressionsTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIExpressionsTest_7_1.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIExpressionsTest_7_0; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIExpressionsTest_7_1 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class MIExpressionsTest_7_1 extends MIExpressionsTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIMemoryTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIMemoryTest_7_1.java index 07d5934e92d..ecb16b53f96 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIMemoryTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIMemoryTest_7_1.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIMemoryTest_7_0; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIMemoryTest_7_1 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class MIMemoryTest_7_1 extends MIMemoryTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRegistersTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRegistersTest_7_1.java index ffd192774fe..efceba3ab68 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRegistersTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRegistersTest_7_1.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRegistersTest_7_0; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRegistersTest_7_1 extends MIRegistersTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class MIRegistersTest_7_1 extends MIRegistersTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlNonStopTargetAvailableTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlNonStopTargetAvailableTest_7_1.java index 86ca10acf64..c83bcddc2a1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlNonStopTargetAvailableTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlNonStopTargetAvailableTest_7_1.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlNonStopTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTargetAvailableTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTargetAvailableTest_7_1.java index 0e88623fcbc..042132dd178 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTargetAvailableTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTargetAvailableTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRunControlTargetAvailableTest_7_0; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_7_1 extends MIRunControlTargetAvailableTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTest_7_1.java index 7ed16787d4c..fd4ca59f751 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/MIRunControlTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.MIRunControlTest_7_0; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTest_7_1 extends MIRunControlTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java index 8cce5f1d54c..c68ef9b0a3c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningNonStopTest_7_1.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningNonStopTest_7_1 extends OperationsWhileTargetIsRunningTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java index 03348f63442..4590ac17231 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/OperationsWhileTargetIsRunningTest_7_1.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.OperationsWhileTargetIsRunningTest_7_0; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_7_1 extends OperationsWhileTargetIsRunningTest_7_0 { - @BeforeClass - public static void beforeClassMethod_7_1() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/PostMortemCoreTest_7_1.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/PostMortemCoreTest_7_1.java index 2aa1821f281..5286e40f44f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/PostMortemCoreTest_7_1.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/PostMortemCoreTest_7_1.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.PostMortemCoreTest_7_0; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class PostMortemCoreTest_7_1 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_7_1() { +public class PostMortemCoreTest_7_1 extends PostMortemCoreTest_7_0 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_1); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/CommandTimeoutTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/CommandTimeoutTest_7_2.java index 6a88bcc8eea..a32ead80d0f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/CommandTimeoutTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/CommandTimeoutTest_7_2.java @@ -12,15 +12,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.tests.CommandTimeoutTest; 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; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_7_2 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class CommandTimeoutTest_7_2 extends CommandTimeoutTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBMultiNonStopRunControlTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBMultiNonStopRunControlTest_7_2.java index ce6fb15c1ef..696ab80268f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBMultiNonStopRunControlTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBMultiNonStopRunControlTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBMultiNonStopRunControlTest_7_1; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @@ -23,8 +22,8 @@ import org.junit.runner.RunWith; */ @RunWith(BackgroundRunner.class) public class GDBMultiNonStopRunControlTest_7_2 extends GDBMultiNonStopRunControlTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBProcessesTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBProcessesTest_7_2.java index 77e1e2ecbbf..042656d0e13 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBProcessesTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBProcessesTest_7_2.java @@ -11,15 +11,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.tests.GDBProcessesTest; 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; @RunWith(BackgroundRunner.class) -public class GDBProcessesTest_7_2 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class GDBProcessesTest_7_2 extends GDBProcessesTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBRemoteTracepointsTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBRemoteTracepointsTest_7_2.java index e50615fe68c..4d26287bca9 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBRemoteTracepointsTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/GDBRemoteTracepointsTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.GDBRemoteTracepointsTest_7_1; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBRemoteTracepointsTest_7_2 extends GDBRemoteTracepointsTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/LaunchConfigurationAndRestartTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/LaunchConfigurationAndRestartTest_7_2.java index eeae8c8256e..a443c014eb5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/LaunchConfigurationAndRestartTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/LaunchConfigurationAndRestartTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.LaunchConfigurationAndRestartTest_7_1; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_7_2 extends LaunchConfigurationAndRestartTest_7_1 { - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIBreakpointsTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIBreakpointsTest_7_2.java index f1abd0464dc..afed16bba9b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIBreakpointsTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIBreakpointsTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIBreakpointsTest_7_1; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_7_2 extends MIBreakpointsTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MICatchpointsTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MICatchpointsTest_7_2.java index 19f3a51deec..31c95cd2482 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MICatchpointsTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MICatchpointsTest_7_2.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MICatchpointsTest_7_1; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MICatchpointsTest_7_2 extends MICatchpointsTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class MICatchpointsTest_7_2 extends MICatchpointsTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIDisassemblyTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIDisassemblyTest_7_2.java index 229ca553daf..ae86f6ccfc5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIDisassemblyTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIDisassemblyTest_7_2.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIDisassemblyTest_7_1; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIDisassemblyTest_7_2 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class MIDisassemblyTest_7_2 extends MIDisassemblyTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIExpressionsTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIExpressionsTest_7_2.java index f72d3ea99ad..1c8ff00489d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIExpressionsTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIExpressionsTest_7_2.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIExpressionsTest_7_1; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIExpressionsTest_7_2 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class MIExpressionsTest_7_2 extends MIExpressionsTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIMemoryTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIMemoryTest_7_2.java index 43b2b3bc7ff..42a97bb3144 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIMemoryTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIMemoryTest_7_2.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIMemoryTest_7_1; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIMemoryTest_7_2 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class MIMemoryTest_7_2 extends MIMemoryTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRegistersTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRegistersTest_7_2.java index b47a54714a8..a7bcd4d7a8d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRegistersTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRegistersTest_7_2.java @@ -16,15 +16,14 @@ import java.util.List; 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.MIRegistersTest; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIRegistersTest_7_1; import org.eclipse.core.runtime.Platform; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIRegistersTest_7_2 extends MIRegistersTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class MIRegistersTest_7_2 extends MIRegistersTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlNonStopTargetAvailableTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlNonStopTargetAvailableTest_7_2.java index 8fbe4c133da..f9a4acfa15c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlNonStopTargetAvailableTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlNonStopTargetAvailableTest_7_2.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlNonStopTargetAvailableTest_7_2 extends MIRunControlTargetAvailableTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTargetAvailableTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTargetAvailableTest_7_2.java index f27e4331013..e9634f4d0d0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTargetAvailableTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTargetAvailableTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIRunControlTargetAvailableTest_7_1; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_7_2 extends MIRunControlTargetAvailableTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTest_7_2.java index 3aef92b6e16..4ee66ffaef6 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/MIRunControlTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.MIRunControlTest_7_1; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTest_7_2 extends MIRunControlTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java index 8727ff705b3..ced96683181 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningNonStopTest_7_2.java @@ -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.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningNonStopTest_7_2 extends OperationsWhileTargetIsRunningTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java index 47ff6656ed6..1b6c6196465 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/OperationsWhileTargetIsRunningTest_7_2.java @@ -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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.OperationsWhileTargetIsRunningTest_7_1; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_7_2 extends OperationsWhileTargetIsRunningTest_7_1 { - @BeforeClass - public static void beforeClassMethod_7_2() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/PostMortemCoreTest_7_2.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/PostMortemCoreTest_7_2.java index 46b5cdc838a..d62a25cc3e1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/PostMortemCoreTest_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/PostMortemCoreTest_7_2.java @@ -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.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_1.PostMortemCoreTest_7_1; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class PostMortemCoreTest_7_2 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_7_2() { +public class PostMortemCoreTest_7_2 extends PostMortemCoreTest_7_1 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_2); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/CommandTimeoutTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/CommandTimeoutTest_7_3.java index 624916380dc..601209e734a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/CommandTimeoutTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/CommandTimeoutTest_7_3.java @@ -12,15 +12,14 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; -import org.eclipse.cdt.tests.dsf.gdb.tests.CommandTimeoutTest; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.CommandTimeoutTest_7_2; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_7_3 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class CommandTimeoutTest_7_3 extends CommandTimeoutTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBMultiNonStopRunControlTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBMultiNonStopRunControlTest_7_3.java index aaeb4fe0f3a..6c5e2c53d1c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBMultiNonStopRunControlTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBMultiNonStopRunControlTest_7_3.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.GDBMultiNonStopRunControlTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @@ -23,8 +22,8 @@ import org.junit.runner.RunWith; */ @RunWith(BackgroundRunner.class) public class GDBMultiNonStopRunControlTest_7_3 extends GDBMultiNonStopRunControlTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBProcessesTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBProcessesTest_7_3.java index 818613c661c..e05cfe101da 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBProcessesTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBProcessesTest_7_3.java @@ -11,15 +11,14 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; -import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.GDBProcessesTest_7_2; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class GDBProcessesTest_7_3 extends GDBProcessesTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class GDBProcessesTest_7_3 extends GDBProcessesTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBRemoteTracepointsTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBRemoteTracepointsTest_7_3.java index 802a689c4f5..2a2112ebf87 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBRemoteTracepointsTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/GDBRemoteTracepointsTest_7_3.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.GDBRemoteTracepointsTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBRemoteTracepointsTest_7_3 extends GDBRemoteTracepointsTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/LaunchConfigurationAndRestartTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/LaunchConfigurationAndRestartTest_7_3.java index 5b5d1a5fecd..71f52bd40b9 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/LaunchConfigurationAndRestartTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/LaunchConfigurationAndRestartTest_7_3.java @@ -13,16 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.LaunchConfigurationAndRestartTest_7_2; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_7_3 extends LaunchConfigurationAndRestartTest_7_2 { - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIBreakpointsTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIBreakpointsTest_7_3.java index d8b2d4689de..25642d25a24 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIBreakpointsTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIBreakpointsTest_7_3.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MIBreakpointsTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_7_3 extends MIBreakpointsTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MICatchpointsTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MICatchpointsTest_7_3.java index 9b256261cad..333e28260d4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MICatchpointsTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MICatchpointsTest_7_3.java @@ -12,14 +12,13 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MICatchpointsTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MICatchpointsTest_7_2; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MICatchpointsTest_7_3 extends MICatchpointsTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class MICatchpointsTest_7_3 extends MICatchpointsTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIDisassemblyTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIDisassemblyTest_7_3.java index e519c22f447..c59820151fd 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIDisassemblyTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIDisassemblyTest_7_3.java @@ -13,15 +13,14 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MIDisassemblyTest_7_2; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIDisassemblyTest_7_3 extends MIDisassemblyTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class MIDisassemblyTest_7_3 extends MIDisassemblyTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIExpressionsTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIExpressionsTest_7_3.java index b568108ded2..60285519475 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIExpressionsTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIExpressionsTest_7_3.java @@ -25,17 +25,16 @@ 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.launching.TestsPlugin; 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_2.MIExpressionsTest_7_2; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIExpressionsTest_7_3 extends MIExpressionsTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class MIExpressionsTest_7_3 extends MIExpressionsTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIMemoryTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIMemoryTest_7_3.java index 84fe8b79a52..92ef9ce00db 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIMemoryTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIMemoryTest_7_3.java @@ -12,14 +12,13 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MIMemoryTest_7_2; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class MIMemoryTest_7_3 extends MIMemoryTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class MIMemoryTest_7_3 extends MIMemoryTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRegistersTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRegistersTest_7_3.java index f20e89ad8f7..7beb9dc9098 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRegistersTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRegistersTest_7_3.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MIRegistersTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRegistersTest_7_3 extends MIRegistersTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlNonStopTargetAvailableTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlNonStopTargetAvailableTest_7_3.java index f3c5bd963c4..212d1f975a9 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlNonStopTargetAvailableTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlNonStopTargetAvailableTest_7_3.java @@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlNonStopTargetAvailableTest_7_3 extends MIRunControlTargetAvailableTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTargetAvailableTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTargetAvailableTest_7_3.java index 7aeb0c5a428..fb76a9e0ac0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTargetAvailableTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTargetAvailableTest_7_3.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MIRunControlTargetAvailableTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_7_3 extends MIRunControlTargetAvailableTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTest_7_3.java index 1a19a6f4d7b..e7ab15f8f49 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/MIRunControlTest_7_3.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.MIRunControlTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTest_7_3 extends MIRunControlTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java index dedbf042fba..02e1827a06c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningNonStopTest_7_3.java @@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningNonStopTest_7_3 extends OperationsWhileTargetIsRunningTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java index d1d2b5b13a1..593c977ee73 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/OperationsWhileTargetIsRunningTest_7_3.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.OperationsWhileTargetIsRunningTest_7_2; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_7_3 extends OperationsWhileTargetIsRunningTest_7_2 { - @BeforeClass - public static void beforeClassMethod_7_3() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/PostMortemCoreTest_7_3.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/PostMortemCoreTest_7_3.java index 23b92bffd70..cca1bbcdb08 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/PostMortemCoreTest_7_3.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/PostMortemCoreTest_7_3.java @@ -12,14 +12,13 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.eclipse.cdt.tests.dsf.gdb.tests.PostMortemCoreTest; -import org.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_2.PostMortemCoreTest_7_2; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class PostMortemCoreTest_7_3 extends PostMortemCoreTest { - @BeforeClass - public static void beforeClassMethod_7_3() { +public class PostMortemCoreTest_7_3 extends PostMortemCoreTest_7_2 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_3); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/CommandTimeoutTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/CommandTimeoutTest_7_4.java index 3974aa66159..36ce2f25420 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/CommandTimeoutTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/CommandTimeoutTest_7_4.java @@ -12,15 +12,14 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; 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.junit.BeforeClass; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.CommandTimeoutTest_7_3; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) -public class CommandTimeoutTest_7_4 extends CommandTimeoutTest { - @BeforeClass - public static void beforeClassMethod_7_4() { +public class CommandTimeoutTest_7_4 extends CommandTimeoutTest_7_3 { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBMultiNonStopRunControlTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBMultiNonStopRunControlTest_7_4.java index 1e74a7546e5..7e05ca6794b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBMultiNonStopRunControlTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBMultiNonStopRunControlTest_7_4.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.GDBMultiNonStopRunControlTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @@ -23,8 +22,8 @@ import org.junit.runner.RunWith; */ @RunWith(BackgroundRunner.class) public class GDBMultiNonStopRunControlTest_7_4 extends GDBMultiNonStopRunControlTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBProcessesTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBProcessesTest_7_4.java index 44e68f58bb1..bb5e4c0212d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBProcessesTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBProcessesTest_7_4.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.GDBProcessesTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBProcessesTest_7_4 extends GDBProcessesTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBRemoteTracepointsTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBRemoteTracepointsTest_7_4.java index 23f22aee96b..83986848f46 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBRemoteTracepointsTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/GDBRemoteTracepointsTest_7_4.java @@ -21,14 +21,13 @@ import org.eclipse.cdt.dsf.mi.service.MIBreakpoints; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.GDBRemoteTracepointsTest_7_3; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBRemoteTracepointsTest_7_4 extends GDBRemoteTracepointsTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/LaunchConfigurationAndRestartTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/LaunchConfigurationAndRestartTest_7_4.java index cc8b077ccf7..55b9c0491fd 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/LaunchConfigurationAndRestartTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/LaunchConfigurationAndRestartTest_7_4.java @@ -13,16 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.LaunchConfigurationAndRestartTest_7_3; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_7_4 extends LaunchConfigurationAndRestartTest_7_3 { - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIBreakpointsTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIBreakpointsTest_7_4.java index 11a8a64f340..286b16ceaf5 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIBreakpointsTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIBreakpointsTest_7_4.java @@ -20,14 +20,13 @@ import org.eclipse.cdt.dsf.mi.service.MIBreakpointDMData; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIBreakpointsTest_7_3; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_7_4 extends MIBreakpointsTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MICatchpointsTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MICatchpointsTest_7_4.java index d2add7c5181..39b21b83750 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MICatchpointsTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MICatchpointsTest_7_4.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MICatchpointsTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MICatchpointsTest_7_4 extends MICatchpointsTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIDisassemblyTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIDisassemblyTest_7_4.java index 2ec30061829..495c1ec14d2 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIDisassemblyTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIDisassemblyTest_7_4.java @@ -14,14 +14,13 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIDisassemblyTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIDisassemblyTest_7_4 extends MIDisassemblyTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIExpressionsTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIExpressionsTest_7_4.java index cfd0d8364a1..e6d83a9b387 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIExpressionsTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIExpressionsTest_7_4.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIExpressionsTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIExpressionsTest_7_4 extends MIExpressionsTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIMemoryTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIMemoryTest_7_4.java index 905fb54d741..057a6a574df 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIMemoryTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIMemoryTest_7_4.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIMemoryTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIMemoryTest_7_4 extends MIMemoryTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRegistersTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRegistersTest_7_4.java index c1b70c304c2..ec41d09e4a4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRegistersTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRegistersTest_7_4.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIRegistersTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRegistersTest_7_4 extends MIRegistersTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlNonStopTargetAvailableTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlNonStopTargetAvailableTest_7_4.java index 77c7189be49..0484ff011e7 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlNonStopTargetAvailableTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlNonStopTargetAvailableTest_7_4.java @@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlNonStopTargetAvailableTest_7_4 extends MIRunControlTargetAvailableTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTargetAvailableTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTargetAvailableTest_7_4.java index d94fbfed507..c30b9e99f26 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTargetAvailableTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTargetAvailableTest_7_4.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIRunControlTargetAvailableTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_7_4 extends MIRunControlTargetAvailableTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTest_7_4.java index 9b0aab9a87b..15e6305fc6a 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/MIRunControlTest_7_4.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.MIRunControlTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTest_7_4 extends MIRunControlTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningNonStopTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningNonStopTest_7_4.java index b9ccc2fa7ac..3422ad4c388 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningNonStopTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningNonStopTest_7_4.java @@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningNonStopTest_7_4 extends OperationsWhileTargetIsRunningTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningTest_7_4.java index 0c9125389f7..c68e26b8b2b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/OperationsWhileTargetIsRunningTest_7_4.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.OperationsWhileTargetIsRunningTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_7_4 extends OperationsWhileTargetIsRunningTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/PostMortemCoreTest_7_4.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/PostMortemCoreTest_7_4.java index d84b22e8f2c..b9a3d934c68 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/PostMortemCoreTest_7_4.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_4/PostMortemCoreTest_7_4.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_3.PostMortemCoreTest_7_3; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class PostMortemCoreTest_7_4 extends PostMortemCoreTest_7_3 { - @BeforeClass - public static void beforeClassMethod_7_4() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_4); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/CommandTimeoutTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/CommandTimeoutTest_7_5.java index d2214722dee..8b5a839f352 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/CommandTimeoutTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/CommandTimeoutTest_7_5.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.CommandTimeoutTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class CommandTimeoutTest_7_5 extends CommandTimeoutTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBMultiNonStopRunControlTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBMultiNonStopRunControlTest_7_5.java index b3db18713e9..3cbda717092 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBMultiNonStopRunControlTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBMultiNonStopRunControlTest_7_5.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.GDBMultiNonStopRunControlTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @@ -23,8 +22,8 @@ import org.junit.runner.RunWith; */ @RunWith(BackgroundRunner.class) public class GDBMultiNonStopRunControlTest_7_5 extends GDBMultiNonStopRunControlTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBProcessesTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBProcessesTest_7_5.java index ead479566f2..014c4f1b2ca 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBProcessesTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBProcessesTest_7_5.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.GDBProcessesTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBProcessesTest_7_5 extends GDBProcessesTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBRemoteTracepointsTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBRemoteTracepointsTest_7_5.java index a01ca624915..a3c42fda4af 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBRemoteTracepointsTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/GDBRemoteTracepointsTest_7_5.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.GDBRemoteTracepointsTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class GDBRemoteTracepointsTest_7_5 extends GDBRemoteTracepointsTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/LaunchConfigurationAndRestartTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/LaunchConfigurationAndRestartTest_7_5.java index 9349e1bc226..00a65d573df 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/LaunchConfigurationAndRestartTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/LaunchConfigurationAndRestartTest_7_5.java @@ -13,16 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.LaunchConfigurationAndRestartTest_7_4; -import org.junit.Before; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class LaunchConfigurationAndRestartTest_7_5 extends LaunchConfigurationAndRestartTest_7_4 { - // For the launch config test, we must set the attributes in the @Before method - // instead of the @BeforeClass method. This is because the attributes are overwritten - // by the tests themselves - @Before - public void beforeMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIBreakpointsTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIBreakpointsTest_7_5.java index 13a900df2e0..169d9e5fcc9 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIBreakpointsTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIBreakpointsTest_7_5.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIBreakpointsTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIBreakpointsTest_7_5 extends MIBreakpointsTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MICatchpointsTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MICatchpointsTest_7_5.java index b2c2ed3bf1d..1d550ec4716 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MICatchpointsTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MICatchpointsTest_7_5.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MICatchpointsTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MICatchpointsTest_7_5 extends MICatchpointsTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIDisassemblyTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIDisassemblyTest_7_5.java index 8cc06670686..bca63c55f2f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIDisassemblyTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIDisassemblyTest_7_5.java @@ -14,14 +14,13 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIDisassemblyTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIDisassemblyTest_7_5 extends MIDisassemblyTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java index 2781accff66..414814e18c3 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIExpressionsTest_7_5.java @@ -18,14 +18,13 @@ 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.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIExpressionsTest_7_4; -import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIExpressionsTest_7_5 extends MIExpressionsTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIMemoryTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIMemoryTest_7_5.java index c37c135e408..14c3dd323fc 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIMemoryTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIMemoryTest_7_5.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIMemoryTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIMemoryTest_7_5 extends MIMemoryTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRegistersTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRegistersTest_7_5.java index cc94b7ce2f8..f173afe531f 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRegistersTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRegistersTest_7_5.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIRegistersTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRegistersTest_7_5 extends MIRegistersTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlNonStopTargetAvailableTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlNonStopTargetAvailableTest_7_5.java index cfb41f94319..9378e81b602 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlNonStopTargetAvailableTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlNonStopTargetAvailableTest_7_5.java @@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlNonStopTargetAvailableTest_7_5 extends MIRunControlTargetAvailableTest_7_5 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTargetAvailableTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTargetAvailableTest_7_5.java index 588e0721933..c6ca985e108 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTargetAvailableTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTargetAvailableTest_7_5.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIRunControlTargetAvailableTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTargetAvailableTest_7_5 extends MIRunControlTargetAvailableTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTest_7_5.java index 0201e59d597..2505577aae4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/MIRunControlTest_7_5.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.MIRunControlTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class MIRunControlTest_7_5 extends MIRunControlTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningNonStopTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningNonStopTest_7_5.java index 2bb850d24a1..1e76286312d 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningNonStopTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningNonStopTest_7_5.java @@ -14,14 +14,19 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningNonStopTest_7_5 extends OperationsWhileTargetIsRunningTest_7_5 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); + } + + @Override + protected void setLaunchAttributes() { + super.setLaunchAttributes(); + setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, true); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningTest_7_5.java index fb2b7a3336c..becdb24e0f0 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/OperationsWhileTargetIsRunningTest_7_5.java @@ -14,13 +14,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.OperationsWhileTargetIsRunningTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class OperationsWhileTargetIsRunningTest_7_5 extends OperationsWhileTargetIsRunningTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } } diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/PostMortemCoreTest_7_5.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/PostMortemCoreTest_7_5.java index 3a6f21c5ef3..bbf5fc9f8e4 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/PostMortemCoreTest_7_5.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_5/PostMortemCoreTest_7_5.java @@ -13,13 +13,12 @@ package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_5; import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.tests.ITestConstants; import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_4.PostMortemCoreTest_7_4; -import org.junit.BeforeClass; import org.junit.runner.RunWith; @RunWith(BackgroundRunner.class) public class PostMortemCoreTest_7_5 extends PostMortemCoreTest_7_4 { - @BeforeClass - public static void beforeClassMethod_7_5() { + @Override + protected void setGdbVersion() { setGdbProgramNamesLaunchAttributes(ITestConstants.SUFFIX_GDB_7_5); } }