From 6f69a2220ce72366c5415994e1254453bdd25547 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 7 May 2009 20:14:21 +0000 Subject: [PATCH] [275193] Enhance the DSF-GDB JUnit tests to allow to test different GDB versions. --- .../tests/dsf/gdb/framework/BaseTestCase.java | 4 -- .../cdt/tests/dsf/gdb/tests/AllSuites.java | 38 ++++++++++++++++++ .../cdt/tests/dsf/gdb/tests/AllTests.java | 37 ++++++++++++++++++ .../dsf/gdb/{ => tests}/ExampleTest.java | 2 +- .../dsf/gdb/{ => tests}/GDBProcessesTest.java | 7 +++- .../gdb/{ => tests}/MIBreakpointsTest.java | 2 +- .../gdb/{ => tests}/MIDisassemblyTest.java | 2 +- .../gdb/{ => tests}/MIExpressionsTest.java | 2 +- .../dsf/gdb/{ => tests}/MIMemoryTest.java | 2 +- .../dsf/gdb/{ => tests}/MIRegistersTest.java | 2 +- .../dsf/gdb/{ => tests}/MIRunControlTest.java | 26 ++++++++----- .../tests/tests_6_6/GDBProcessesTest_6_6.java | 26 +++++++++++++ .../tests_6_6/MIBreakpointsTest_6_6.java | 26 +++++++++++++ .../tests_6_6/MIDisassemblyTest_6_6.java | 28 +++++++++++++ .../tests_6_6/MIExpressionsTest_6_6.java | 26 +++++++++++++ .../gdb/tests/tests_6_6/MIMemoryTest_6_6.java | 26 +++++++++++++ .../tests/tests_6_6/MIRegistersTest_6_6.java | 26 +++++++++++++ .../tests/tests_6_6/MIRunControlTest_6_6.java | 27 +++++++++++++ .../dsf/gdb/tests/tests_6_6/Suite_6_6.java | 39 +++++++++++++++++++ .../tests/tests_6_7/GDBProcessesTest_6_7.java | 26 +++++++++++++ .../tests_6_7/MIBreakpointsTest_6_7.java | 26 +++++++++++++ .../tests_6_7/MIDisassemblyTest_6_7.java | 28 +++++++++++++ .../tests_6_7/MIExpressionsTest_6_7.java | 26 +++++++++++++ .../gdb/tests/tests_6_7/MIMemoryTest_6_7.java | 26 +++++++++++++ .../tests/tests_6_7/MIRegistersTest_6_7.java | 26 +++++++++++++ .../tests/tests_6_7/MIRunControlTest_6_7.java | 27 +++++++++++++ .../dsf/gdb/tests/tests_6_7/Suite_6_7.java | 38 ++++++++++++++++++ .../tests/tests_6_8/GDBProcessesTest_6_8.java | 26 +++++++++++++ .../tests_6_8/MIBreakpointsTest_6_8.java | 26 +++++++++++++ .../tests_6_8/MIDisassemblyTest_6_8.java | 28 +++++++++++++ .../tests_6_8/MIExpressionsTest_6_8.java | 26 +++++++++++++ .../gdb/tests/tests_6_8/MIMemoryTest_6_8.java | 26 +++++++++++++ .../tests/tests_6_8/MIRegistersTest_6_8.java | 26 +++++++++++++ .../tests/tests_6_8/MIRunControlTest_6_8.java | 27 +++++++++++++ .../dsf/gdb/tests/tests_6_8/Suite_6_8.java | 38 ++++++++++++++++++ .../tests/tests_7_0/GDBProcessesTest_7_0.java | 26 +++++++++++++ .../tests_7_0/MIBreakpointsTest_7_0.java | 26 +++++++++++++ .../tests_7_0/MIDisassemblyTest_7_0.java | 28 +++++++++++++ .../tests_7_0/MIExpressionsTest_7_0.java | 26 +++++++++++++ .../gdb/tests/tests_7_0/MIMemoryTest_7_0.java | 26 +++++++++++++ .../tests/tests_7_0/MIRegistersTest_7_0.java | 26 +++++++++++++ .../tests/tests_7_0/MIRunControlTest_7_0.java | 27 +++++++++++++ .../tests_7_0/Suite_7_0.java} | 29 +++++++------- 43 files changed, 974 insertions(+), 34 deletions(-) create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuites.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/ExampleTest.java (98%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/GDBProcessesTest.java (96%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/MIBreakpointsTest.java (99%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/MIDisassemblyTest.java (99%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/MIExpressionsTest.java (99%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/MIMemoryTest.java (99%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/MIRegistersTest.java (99%) rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{ => tests}/MIRunControlTest.java (96%) create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/GDBProcessesTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIBreakpointsTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIDisassemblyTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIExpressionsTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIMemoryTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRegistersTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTest_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/GDBProcessesTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIBreakpointsTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIDisassemblyTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIExpressionsTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIMemoryTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRegistersTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTest_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/GDBProcessesTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIBreakpointsTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIDisassemblyTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIExpressionsTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIMemoryTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRegistersTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTest_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBProcessesTest_7_0.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIBreakpointsTest_7_0.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIDisassemblyTest_7_0.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIExpressionsTest_7_0.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIMemoryTest_7_0.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRegistersTest_7_0.java create mode 100644 dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTest_7_0.java rename dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/{AllTests.java => tests/tests_7_0/Suite_7_0.java} (60%) 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 b9a880bff8e..5f4d5576529 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 @@ -60,7 +60,6 @@ public class BaseTestCase { attrs.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true); attrs.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT); - attrs.put(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb"); attrs.put(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, ".gdbinit"); attrs.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN ); @@ -104,9 +103,6 @@ public class BaseTestCase { @After public void baseAfterMethod() throws Exception { - System.out.println("===================================================================="); - System.out.println("Tearing down test application: " + attrs.get(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME)); - System.out.println("===================================================================="); if (fLaunch != null) { fLaunch.terminate(); fLaunch = null; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuites.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuites.java new file mode 100644 index 00000000000..f5ad45dafa8 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllSuites.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 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 org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6.Suite_6_6; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7.Suite_6_7; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.Suite_6_8; +import org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0.Suite_7_0; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * This class is meant to be empty. It enables us to define + * the annotations which list all the different JUnit suites we + * want to run. When creating a new suite class, it should be + * added to the list below. + * + * This suite runs all the other suites. + */ + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + Suite_6_6.class, + Suite_6_7.class, + Suite_6_8.class, + Suite_7_0.class, + /* Add your suite class here */ +}) + +public class AllSuites {} \ 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/AllTests.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java new file mode 100644 index 00000000000..164813e364a --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/AllTests.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 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 org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * This class is meant to be empty. It enables us to define + * the annotations which list all the different JUnit suites we + * want to run. When creating a new suite class, it should be + * added to the list below. + * + * This suite runs the tests with the current version of GDB that is on the PATH + */ + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + MIRegistersTest.class, + MIRunControlTest.class, + MIExpressionsTest.class, + MIMemoryTest.class, + MIBreakpointsTest.class, + MIDisassemblyTest.class, + GDBProcessesTest.class + /* Add your suite class here */ +}) + +public class AllTests {} \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/ExampleTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ExampleTest.java similarity index 98% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/ExampleTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ExampleTest.java index 6b3c4875a78..b75926f191c 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/ExampleTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/ExampleTest.java @@ -8,7 +8,7 @@ * Contributors: * Ericsson - Initial Implementation *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import static org.junit.Assert.assertTrue; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/GDBProcessesTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java similarity index 96% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/GDBProcessesTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java index bd4cbb2980c..71068128477 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/GDBProcessesTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBProcessesTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Ericsson and others. + * Copyright (c) 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 @@ -8,7 +8,7 @@ * Contributors: * Ericsson AB - Initial implementation of Test cases *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; @@ -30,6 +30,7 @@ import org.eclipse.cdt.dsf.mi.service.MIProcesses; import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.dsf.service.DsfSession; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; +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.launching.TestsPlugin; import org.junit.After; @@ -37,7 +38,9 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; +@RunWith(BackgroundRunner.class) public class GDBProcessesTest extends BaseTestCase { /* * Path to executable diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIBreakpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java similarity index 99% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIBreakpointsTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java index 5e0307fabbd..a109b0310ba 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIBreakpointsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java @@ -8,7 +8,7 @@ * Contributors: * Ericsson - Initial Implementation *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIDisassemblyTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java similarity index 99% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIDisassemblyTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java index aad8719a4b4..f2a540d4589 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIDisassemblyTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIDisassemblyTest.java @@ -9,7 +9,7 @@ * Ericsson - Initial Implementation *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIExpressionsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java similarity index 99% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIExpressionsTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java index fe7d002b62f..6b6f497f6c1 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIExpressionsTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java @@ -8,7 +8,7 @@ * Contributors: * Ericsson - Initial Implementation *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import static org.junit.Assert.assertTrue; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIMemoryTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java similarity index 99% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIMemoryTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java index 1e0f5b40575..8b31f15bf56 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIMemoryTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java @@ -8,7 +8,7 @@ * Contributors: * Ericsson AB - Initial Implementation *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRegistersTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java similarity index 99% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRegistersTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java index b133715d1b7..6a31c3c0ed3 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRegistersTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import static org.junit.Assert.assertTrue; diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRunControlTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java similarity index 96% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRunControlTest.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java index 82548f06da8..2a3adb43bee 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/MIRunControlTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java @@ -8,7 +8,7 @@ * Contributors: * Ericsson AB - Initial implementation of Test cases *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; @@ -31,6 +31,7 @@ import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; import org.eclipse.cdt.dsf.service.DsfServicesTracker; import org.eclipse.cdt.tests.dsf.gdb.framework.AsyncCompletionWaitor; +import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase; import org.eclipse.cdt.tests.dsf.gdb.framework.ServiceEventWaitor; import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil; @@ -42,11 +43,13 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; +import org.junit.runner.RunWith; -/* +/** * Tests MIRunControl class for Multi-threaded application. */ +@RunWith(BackgroundRunner.class) public class MIRunControlTest extends BaseTestCase { private DsfServicesTracker fServicesTracker; @@ -273,7 +276,7 @@ public class MIRunControlTest extends BaseTestCase { /* * getModelData should return StateChangeReason. */ - Assert.assertTrue(" State change reason for a normal execution should be USER_REQUEST." , + Assert.assertTrue(" State change reason for a normal execution should be USER_REQUEST instead of " + data.getStateChangeReason(), StateChangeReason.USER_REQUEST == data.getStateChangeReason()); } } @@ -369,8 +372,16 @@ public class MIRunControlTest extends BaseTestCase { * getModelData() for Container DMC */ @Test - public void getModelDataForContainer() throws InterruptedException{ + public void getModelDataForContainer() throws Throwable { final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); + /* + * Add a breakpoint + */ + SyncUtil.SyncAddBreakpoint(SOURCE_NAME + ":21", false); + /* + * Resume till the breakpoint is hit + */ + SyncUtil.SyncResumeUntilStopped(); final DataRequestMonitor rm = new DataRequestMonitor(fRunCtrl.getExecutor(), null) { @@ -395,11 +406,8 @@ public class MIRunControlTest extends BaseTestCase { if(data == null) Assert.fail("No data returned."); else{ - /* - * StateChangeReason in getModelData for Container DMC is null. - */ - Assert.assertTrue(" State change reason for a normal execution should be USER_REQUEST." , - StateChangeReason.USER_REQUEST == data.getStateChangeReason()); + Assert.assertTrue(" State change reason for a normal execution should be BREAKPOINT instead of " + data.getStateChangeReason(), + StateChangeReason.BREAKPOINT == data.getStateChangeReason()); } } 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 new file mode 100644 index 00000000000..70c067a5308 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/GDBProcessesTest_6_6.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.GDBProcessesTest; +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() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..87c6a8fb7d6 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIBreakpointsTest_6_6.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_6; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.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() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..bdc57d1217d --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIDisassemblyTest_6_6.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_6; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.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() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..d33278e9f40 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIExpressionsTest_6_6.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_6; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIExpressionsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIExpressionsTest_6_6 extends MIExpressionsTest { + @BeforeClass + public static void beforeClassMethod_6_6() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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/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 new file mode 100644 index 00000000000..7dcaa8b5585 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIMemoryTest_6_6.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.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() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..1155a660ede --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRegistersTest_6_6.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.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() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..59be10973b9 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/MIRunControlTest_6_6.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_6; + + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.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() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb.6.6"); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java new file mode 100644 index 00000000000..ce127153ecc --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_6_6.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_6; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * This class is meant to be empty. It enables us to define + * the annotations which list all the different JUnit class we + * want to run. When creating a new test class, it should be + * added to the list below. + * + * This suite is for tests to be run with GDB 6.6 + */ + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + // We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256 + MIRegistersTest_6_6.class, + MIRunControlTest_6_6.class, + MIExpressionsTest_6_6.class, + MIMemoryTest_6_6.class, + MIBreakpointsTest_6_6.class, + MIDisassemblyTest_6_6.class, + GDBProcessesTest_6_6.class + /* Add your test class here */ +}) + +public class Suite_6_6 {} + 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 new file mode 100644 index 00000000000..6fcebc536ce --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/GDBProcessesTest_6_7.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.GDBProcessesTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class GDBProcessesTest_6_7 extends GDBProcessesTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..664246be67a --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIBreakpointsTest_6_7.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_7; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIBreakpointsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIBreakpointsTest_6_7 extends MIBreakpointsTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..77f1b5e4a3d --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIDisassemblyTest_6_7.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_7; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIDisassemblyTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + + +@RunWith(BackgroundRunner.class) +public class MIDisassemblyTest_6_7 extends MIDisassemblyTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..19530685dc2 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIExpressionsTest_6_7.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_7; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIExpressionsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIExpressionsTest_6_7 extends MIExpressionsTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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/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 new file mode 100644 index 00000000000..4d684e33e14 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIMemoryTest_6_7.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIMemoryTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIMemoryTest_6_7 extends MIMemoryTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..e7965f93aeb --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRegistersTest_6_7.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIRegistersTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIRegistersTest_6_7 extends MIRegistersTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..11d41e56d5a --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/MIRunControlTest_6_7.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_7; + + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIRunControlTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIRunControlTest_6_7 extends MIRunControlTest { + @BeforeClass + public static void beforeClassMethod_6_7() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb.6.7"); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java new file mode 100644 index 00000000000..dbb458ba921 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_6_7.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_7; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * This class is meant to be empty. It enables us to define + * the annotations which list all the different JUnit class we + * want to run. When creating a new test class, it should be + * added to the list below. + * + * This suite is for tests to be run with GDB 6.7 + */ + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + // We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256 + MIRegistersTest_6_7.class, + MIRunControlTest_6_7.class, + MIExpressionsTest_6_7.class, + MIMemoryTest_6_7.class, + MIBreakpointsTest_6_7.class, + MIDisassemblyTest_6_7.class, + GDBProcessesTest_6_7.class + /* Add your test class here */ +}) + +public class Suite_6_7 {} 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 new file mode 100644 index 00000000000..5736d880fbf --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/GDBProcessesTest_6_8.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.GDBProcessesTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class GDBProcessesTest_6_8 extends GDBProcessesTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..5e125239376 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIBreakpointsTest_6_8.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_8; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIBreakpointsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIBreakpointsTest_6_8 extends MIBreakpointsTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..7e5de4821c7 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIDisassemblyTest_6_8.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_8; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIDisassemblyTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + + +@RunWith(BackgroundRunner.class) +public class MIDisassemblyTest_6_8 extends MIDisassemblyTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..62e670cfd60 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIExpressionsTest_6_8.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_8; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIExpressionsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIExpressionsTest_6_8 extends MIExpressionsTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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/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 new file mode 100644 index 00000000000..f5d7ff6fba1 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIMemoryTest_6_8.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIMemoryTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIMemoryTest_6_8 extends MIMemoryTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..e0dd2262a15 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRegistersTest_6_8.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIRegistersTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIRegistersTest_6_8 extends MIRegistersTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..b06a2c55149 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/MIRunControlTest_6_8.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8; + + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +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.tests.MIRunControlTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIRunControlTest_6_8 extends MIRunControlTest { + @BeforeClass + public static void beforeClassMethod_6_8() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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/Suite_6_8.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java new file mode 100644 index 00000000000..5a8d065710c --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_6_8.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 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.tests_6_8; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * This class is meant to be empty. It enables us to define + * the annotations which list all the different JUnit class we + * want to run. When creating a new test class, it should be + * added to the list below. + * + * This suite is for tests to be run with GDB 6.8 + */ + +@RunWith(Suite.class) +@Suite.SuiteClasses({ + // We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256 + MIRegistersTest_6_8.class, + MIRunControlTest_6_8.class, + MIExpressionsTest_6_8.class, + MIMemoryTest_6_8.class, + MIBreakpointsTest_6_8.class, + MIDisassemblyTest_6_8.class, + GDBProcessesTest_6_8.class + /* Add your test class here */ +}) + +public class Suite_6_8 {} 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 new file mode 100644 index 00000000000..bc2ad59b6bf --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/GDBProcessesTest_7_0.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; +import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.GDBProcessesTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class GDBProcessesTest_7_0 extends GDBProcessesTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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/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 new file mode 100644 index 00000000000..2c1436e5465 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIBreakpointsTest_7_0.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.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.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.MIBreakpointsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIBreakpointsTest_7_0 extends MIBreakpointsTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..624cd667a5f --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIDisassemblyTest_7_0.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 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.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.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.MIDisassemblyTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + + +@RunWith(BackgroundRunner.class) +public class MIDisassemblyTest_7_0 extends MIDisassemblyTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..35f489d87b5 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIExpressionsTest_7_0.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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.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.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.MIExpressionsTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIExpressionsTest_7_0 extends MIExpressionsTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..dd6bab666ac --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIMemoryTest_7_0.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +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.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.MIMemoryTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIMemoryTest_7_0 extends MIMemoryTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..7792e0c1350 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRegistersTest_7_0.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial Implementation + *******************************************************************************/ +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.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.MIRegistersTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIRegistersTest_7_0 extends MIRegistersTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "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 new file mode 100644 index 00000000000..94897abc2c7 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/MIRunControlTest_7_0.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 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 AB - Initial implementation of Test cases + *******************************************************************************/ +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; + + +import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants; +import org.eclipse.cdt.tests.dsf.gdb.framework.BackgroundRunner; +import org.eclipse.cdt.tests.dsf.gdb.framework.BaseTestCase; +import org.eclipse.cdt.tests.dsf.gdb.tests.MIRunControlTest; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; + +@RunWith(BackgroundRunner.class) +public class MIRunControlTest_7_0 extends MIRunControlTest { + @BeforeClass + public static void beforeClassMethod_7_0() { + BaseTestCase.setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, "gdb.7.0"); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/AllTests.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java similarity index 60% rename from dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/AllTests.java rename to dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java index 74731d2c26c..4a62a693a88 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/AllTests.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_7_0.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Ericsson and others. + * Copyright (c) 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 @@ -8,28 +8,31 @@ * Contributors: * Ericsson - Initial Implementation *******************************************************************************/ -package org.eclipse.cdt.tests.dsf.gdb; +package org.eclipse.cdt.tests.dsf.gdb.tests.tests_7_0; import org.junit.runner.RunWith; import org.junit.runners.Suite; -/* +/** * This class is meant to be empty. It enables us to define * the annotations which list all the different JUnit class we * want to run. When creating a new test class, it should be * added to the list below. + * + * This suite is for tests to be run with GDB 7.0 */ @RunWith(Suite.class) @Suite.SuiteClasses({ - MIRegistersTest.class, - MIRunControlTest.class, - MIExpressionsTest.class, - MIMemoryTest.class, - MIBreakpointsTest.class, - MIDisassemblyTest.class, - GDBProcessesTest.class - /* Add your test class here */ - }) + // We need specific name for the tests of this suite, because of bug https://bugs.eclipse.org/172256 + MIRegistersTest_7_0.class, + MIRunControlTest_7_0.class, + MIExpressionsTest_7_0.class, + MIMemoryTest_7_0.class, + MIBreakpointsTest_7_0.class, + MIDisassemblyTest_7_0.class, + GDBProcessesTest_7_0.class + /* Add your test class here */ +}) -public class AllTests {} +public class Suite_7_0 {}