mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
debug tests: Cleanup filename references
This patch attempts to standardize the naming and factor out the variables that refer to source or executable files throughout the debug tests. It removes definitions of paths that are already defined in BaseTestCase. Also, it tries to name these consistently: - filename of executable: EXEC_NAME - filename of source: SOURCE_NAME Finally, it replaces hardcoded paths at various places by constants at the top of the test class. Change-Id: Ib2ea3e46b41185fb9614ae6ad9d41c3b70154884 Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/38068 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Hudson CI Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
786e2137eb
commit
3d264fbae0
19 changed files with 161 additions and 164 deletions
|
@ -87,7 +87,7 @@ public class BaseTestCase {
|
||||||
@Rule public TestRule timeout = new Timeout(TEST_TIMEOUT);
|
@Rule public TestRule timeout = new Timeout(TEST_TIMEOUT);
|
||||||
|
|
||||||
public static final String ATTR_DEBUG_SERVER_NAME = TestsPlugin.PLUGIN_ID + ".DEBUG_SERVER_NAME";
|
public static final String ATTR_DEBUG_SERVER_NAME = TestsPlugin.PLUGIN_ID + ".DEBUG_SERVER_NAME";
|
||||||
private static final String DEFAULT_TEST_APP = "data/launch/bin/GDBMIGenericTestApp.exe";
|
private static final String DEFAULT_EXEC_NAME = "GDBMIGenericTestApp.exe";
|
||||||
|
|
||||||
private static GdbLaunch fLaunch;
|
private static GdbLaunch fLaunch;
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ public class BaseTestCase {
|
||||||
// Clear all launch attributes before starting a new test
|
// Clear all launch attributes before starting a new test
|
||||||
launchAttributes = new HashMap<String, Object>();
|
launchAttributes = new HashMap<String, Object>();
|
||||||
|
|
||||||
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, DEFAULT_TEST_APP);
|
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + DEFAULT_EXEC_NAME);
|
||||||
|
|
||||||
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
|
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
|
||||||
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
|
launchAttributes.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
|
||||||
|
|
|
@ -67,12 +67,14 @@ import org.junit.runner.RunWith;
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class GDBConsoleBreakpointsTest extends BaseTestCase {
|
public class GDBConsoleBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
|
final static protected String SOURCE_NAME = "GDBMIGenericTestApp.cc";
|
||||||
|
|
||||||
final static private int DEFAULT_TIMEOUT = 20000;
|
final static private int DEFAULT_TIMEOUT = 20000;
|
||||||
final static private TimeUnit DEFAULT_TIME_UNIT = TimeUnit.MILLISECONDS;
|
final static private TimeUnit DEFAULT_TIME_UNIT = TimeUnit.MILLISECONDS;
|
||||||
|
|
||||||
final static private String FILE_NAME_VALID = new Path("data/launch/src/GDBMIGenericTestApp.cc").toFile().getAbsolutePath();
|
final static private String SOURCE_NAME_VALID = new Path(SOURCE_PATH + SOURCE_NAME).toFile().getAbsolutePath();
|
||||||
final static private int LINE_NUMBER_VALID = 8;
|
final static private int LINE_NUMBER_VALID = 8;
|
||||||
final static private String FILE_NAME_INVALID = new Path("x.c").toFile().getAbsolutePath();
|
final static private String SOURCE_NAME_INVALID = new Path("x.c").toFile().getAbsolutePath();
|
||||||
final static private int LINE_NUMBER_INVALID = 2;
|
final static private int LINE_NUMBER_INVALID = 2;
|
||||||
|
|
||||||
final static private String FUNCTION_VALID = "main()";
|
final static private String FUNCTION_VALID = "main()";
|
||||||
|
@ -542,7 +544,7 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase {
|
||||||
private Map<String, Object> getLocationBreakpointAttributes(Class<? extends ICBreakpoint> type, boolean valid) {
|
private Map<String, Object> getLocationBreakpointAttributes(Class<? extends ICBreakpoint> type, boolean valid) {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
if (ICFunctionBreakpoint.class.equals(type)) {
|
if (ICFunctionBreakpoint.class.equals(type)) {
|
||||||
map.put(ATTR_FILE_NAME, (valid) ? FILE_NAME_VALID : FILE_NAME_INVALID);
|
map.put(ATTR_FILE_NAME, (valid) ? SOURCE_NAME_VALID : SOURCE_NAME_INVALID);
|
||||||
map.put(ATTR_FUNCTION, (valid) ? FUNCTION_VALID : FUNCTION_INVALID);
|
map.put(ATTR_FUNCTION, (valid) ? FUNCTION_VALID : FUNCTION_INVALID);
|
||||||
}
|
}
|
||||||
else if (ICAddressBreakpoint.class.equals(type)) {
|
else if (ICAddressBreakpoint.class.equals(type)) {
|
||||||
|
@ -552,7 +554,7 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase {
|
||||||
new Addr64("0x0").toHexAddressString());
|
new Addr64("0x0").toHexAddressString());
|
||||||
}
|
}
|
||||||
else if (ICLineBreakpoint.class.equals(type)) {
|
else if (ICLineBreakpoint.class.equals(type)) {
|
||||||
map.put(ATTR_FILE_NAME, (valid) ? FILE_NAME_VALID : FILE_NAME_INVALID);
|
map.put(ATTR_FILE_NAME, (valid) ? SOURCE_NAME_VALID : SOURCE_NAME_INVALID);
|
||||||
map.put(ATTR_LINE_NUMBER, (valid) ? LINE_NUMBER_VALID : LINE_NUMBER_INVALID);
|
map.put(ATTR_LINE_NUMBER, (valid) ? LINE_NUMBER_VALID : LINE_NUMBER_INVALID);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -59,6 +59,7 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class GDBPatternMatchingExpressionsTest extends BaseTestCase {
|
public class GDBPatternMatchingExpressionsTest extends BaseTestCase {
|
||||||
|
private static final String EXEC_NAME = "PatternMatchingExpressionsTestApp.exe";
|
||||||
|
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ public class GDBPatternMatchingExpressionsTest extends BaseTestCase {
|
||||||
protected void setLaunchAttributes() {
|
protected void setLaunchAttributes() {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/PatternMatchingExpressionsTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -53,11 +53,8 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class LaunchConfigurationAndRestartTest extends BaseTestCase {
|
public class LaunchConfigurationAndRestartTest extends BaseTestCase {
|
||||||
|
protected static final String EXEC_NAME = "LaunchConfigurationAndRestartTestApp.exe";
|
||||||
|
|
||||||
protected static final String PROGRAM_DIR = "data/launch/bin/";
|
|
||||||
protected static final String PROGRAM_NAME = "LaunchConfigurationAndRestartTestApp.exe";
|
|
||||||
protected static final String PROGRAM = PROGRAM_DIR + PROGRAM_NAME;
|
|
||||||
|
|
||||||
protected static final int FIRST_LINE_IN_MAIN = 27;
|
protected static final int FIRST_LINE_IN_MAIN = 27;
|
||||||
protected static final int LAST_LINE_IN_MAIN = 30;
|
protected static final int LAST_LINE_IN_MAIN = 30;
|
||||||
|
|
||||||
|
@ -82,7 +79,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
// Set the binary
|
// Set the binary
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, PROGRAM);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method cannot be tagged as @Before, because the launch is not
|
// This method cannot be tagged as @Before, because the launch is not
|
||||||
|
@ -138,16 +135,16 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
|
||||||
// *********************************************************************
|
// *********************************************************************
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test will tell the launch to set the working directory to data/launch/src/
|
* This test will tell the launch to set the working directory to data/launch/bin/
|
||||||
* and will verify that we can find the file LaunchConfigurationAndRestartTestApp.cpp.
|
* and will verify that we can find the file LaunchConfigurationAndRestartTestApp.cpp.
|
||||||
* This will confirm that GDB has been properly configured with the working dir.
|
* This will confirm that GDB has been properly configured with the working dir.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testSettingWorkingDirectory() throws Throwable {
|
public void testSettingWorkingDirectory() throws Throwable {
|
||||||
IPath path = new Path(fFullProgramPath);
|
IPath path = new Path(fFullProgramPath);
|
||||||
String dir = path.removeLastSegments(4).toPortableString() + "/" + PROGRAM_DIR;
|
String dir = path.removeLastSegments(4).toPortableString() + "/" + EXEC_PATH;
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, dir);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, dir);
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, dir + PROGRAM_NAME);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, dir + EXEC_NAME);
|
||||||
|
|
||||||
doLaunch();
|
doLaunch();
|
||||||
|
|
||||||
|
@ -156,7 +153,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
|
||||||
protected void execute(DataRequestMonitor<MIInfo> rm) {
|
protected void execute(DataRequestMonitor<MIInfo> rm) {
|
||||||
fGdbControl.queueCommand(
|
fGdbControl.queueCommand(
|
||||||
fGdbControl.getCommandFactory().createMIFileExecFile(
|
fGdbControl.getCommandFactory().createMIFileExecFile(
|
||||||
fGdbControl.getContext(), PROGRAM_NAME),
|
fGdbControl.getContext(), EXEC_NAME),
|
||||||
rm);
|
rm);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -685,7 +682,7 @@ public class LaunchConfigurationAndRestartTest extends BaseTestCase {
|
||||||
// the JUnit tests.
|
// the JUnit tests.
|
||||||
|
|
||||||
IFile fakeFile = null;
|
IFile fakeFile = null;
|
||||||
CDIDebugModel.createLineBreakpoint(PROGRAM, fakeFile, ICBreakpointType.REGULAR, LAST_LINE_IN_MAIN + 1, true, 0, "", true); //$NON-NLS-1$
|
CDIDebugModel.createLineBreakpoint(EXEC_PATH + EXEC_NAME, fakeFile, ICBreakpointType.REGULAR, LAST_LINE_IN_MAIN + 1, true, 0, "", true); //$NON-NLS-1$
|
||||||
doLaunch();
|
doLaunch();
|
||||||
|
|
||||||
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
MIStoppedEvent stoppedEvent = getInitialStoppedEvent();
|
||||||
|
|
|
@ -78,11 +78,11 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Global constants
|
// Global constants
|
||||||
public static final String PLUGIN_ID = "org.eclipse.cdt.debug.core" ; //$NON-NLS-1$
|
public static final String PLUGIN_ID = "org.eclipse.cdt.debug.core" ; //$NON-NLS-1$
|
||||||
public static final String TEST_APPL = "data/launch/bin/BreakpointTestApp.exe"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
public static final String SOURCE_PROJECT = "MIBreakpointsTest";
|
public static final String SOURCE_PROJECT = "MIBreakpointsTest";
|
||||||
public static final String SOURCE_FOLDER = "src";
|
public static final String SOURCE_FOLDER = "src";
|
||||||
public static final String SOURCE_FILE = "BreakpointTestApp.cc"; //$NON-NLS-1$
|
public static final String SOURCE_NAME = "BreakpointTestApp.cc"; //$NON-NLS-1$
|
||||||
|
public static final String EXEC_NAME = "BreakpointTestApp.exe"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Asynchronous Completion
|
// Asynchronous Completion
|
||||||
protected final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
protected final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
||||||
|
@ -168,7 +168,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
// Select the binary to run the tests against
|
// Select the binary to run the tests against
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -511,7 +511,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, lineNumber);
|
breakpoint.put(LINE_NUMBER_TAG, lineNumber);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -690,7 +690,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -714,7 +714,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE + "_bad");
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME + "_bad");
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -738,7 +738,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, 0);
|
breakpoint.put(LINE_NUMBER_TAG, 0);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -762,7 +762,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a function breakpoint
|
// Create a function breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(FUNCTION_TAG, "invalid-function-name");
|
breakpoint.put(FUNCTION_TAG, "invalid-function-name");
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -859,7 +859,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -877,7 +877,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -909,7 +909,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(IS_ENABLED_TAG, false);
|
breakpoint.put(IS_ENABLED_TAG, false);
|
||||||
|
|
||||||
|
@ -928,7 +928,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -960,7 +960,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a function breakpoint
|
// Create a function breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -978,7 +978,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong function)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong function)",
|
||||||
breakpoint1.getFunctionName().equals(SIGNED_FUNCTION));
|
breakpoint1.getFunctionName().equals(SIGNED_FUNCTION));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1008,7 +1008,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a conditional line breakpoint
|
// Create a conditional line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
|
@ -1027,7 +1027,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1057,7 +1057,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
||||||
|
|
||||||
|
@ -1076,7 +1076,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1106,7 +1106,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -1124,7 +1124,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1137,7 +1137,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a function breakpoint
|
// Create a function breakpoint
|
||||||
breakpoint = new HashMap<String, Object>();
|
breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -1155,7 +1155,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint2.getFileName().equals(SOURCE_FILE));
|
breakpoint2.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong function)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong function)",
|
||||||
breakpoint2.getFunctionName().equals(SIGNED_FUNCTION));
|
breakpoint2.getFunctionName().equals(SIGNED_FUNCTION));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1196,7 +1196,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
@ -1214,7 +1214,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint1.getFileName().equals(SOURCE_FILE));
|
breakpoint1.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
breakpoint1.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1239,7 +1239,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Ensure that the breakpoint was correctly installed
|
// Ensure that the breakpoint was correctly installed
|
||||||
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(ref);
|
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(ref);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
|
||||||
breakpoint2.getFileName().equals(SOURCE_FILE));
|
breakpoint2.getFileName().equals(SOURCE_NAME));
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
|
||||||
breakpoint2.getLineNumber() == LINE_NUMBER_1);
|
breakpoint2.getLineNumber() == LINE_NUMBER_1);
|
||||||
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
|
||||||
|
@ -1289,7 +1289,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
|
|
||||||
// Run the program. It will make a two second sleep() call, during which time...
|
// Run the program. It will make a two second sleep() call, during which time...
|
||||||
|
@ -1356,7 +1356,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
// Now install a proper breakpoint an see that it hits without having to resume
|
// Now install a proper breakpoint an see that it hits without having to resume
|
||||||
// the target. This will show that the target was still properly running.
|
// the target. This will show that the target was still properly running.
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
|
|
||||||
// Wait for breakpoint to hit and for the expected number of breakpoint events to have occurred
|
// Wait for breakpoint to hit and for the expected number of breakpoint events to have occurred
|
||||||
|
@ -1616,7 +1616,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -1674,7 +1674,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -1771,7 +1771,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1 + i);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1 + i);
|
||||||
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
@ -1843,7 +1843,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -1901,7 +1901,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
String expected = UNKNOWN_BREAKPOINT;
|
String expected = UNKNOWN_BREAKPOINT;
|
||||||
Map<String, Object> properties = new HashMap<String, Object>();
|
Map<String, Object> properties = new HashMap<String, Object>();
|
||||||
properties.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
properties.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
properties.put(FILE_NAME_TAG, SOURCE_FILE);
|
properties.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
properties.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
properties.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
updateBreakpoint(invalid_ref, properties);
|
updateBreakpoint(invalid_ref, properties);
|
||||||
assertFalse(fWait.getMessage(), fWait.isOK());
|
assertFalse(fWait.getMessage(), fWait.isOK());
|
||||||
|
@ -1924,7 +1924,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -1970,7 +1970,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
|
@ -2017,7 +2017,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
|
@ -2073,7 +2073,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_4);
|
breakpoint.put(CONDITION_TAG, CONDITION_4);
|
||||||
|
|
||||||
|
@ -2280,7 +2280,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2326,7 +2326,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
||||||
|
|
||||||
|
@ -2373,7 +2373,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
||||||
|
|
||||||
|
@ -2429,7 +2429,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_1);
|
||||||
|
|
||||||
|
@ -2491,7 +2491,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a first line breakpoint
|
// Create a first line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2501,7 +2501,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a second line breakpoint
|
// Create a second line breakpoint
|
||||||
breakpoint = new HashMap<String, Object>();
|
breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2576,7 +2576,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2635,7 +2635,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a first line breakpoint
|
// Create a first line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2645,7 +2645,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a second line breakpoint
|
// Create a second line breakpoint
|
||||||
breakpoint = new HashMap<String, Object>();
|
breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_2);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2753,7 +2753,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5);
|
||||||
breakpoint.put(IS_ENABLED_TAG, false);
|
breakpoint.put(IS_ENABLED_TAG, false);
|
||||||
|
|
||||||
|
@ -2813,7 +2813,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2855,7 +2855,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a function breakpoint
|
// Create a function breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
breakpoint.put(FUNCTION_TAG, FUNCTION);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -2899,7 +2899,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a conditional line breakpoint
|
// Create a conditional line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
breakpoint.put(CONDITION_TAG, CONDITION_1);
|
||||||
|
|
||||||
|
@ -2949,7 +2949,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a conditional line breakpoint
|
// Create a conditional line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
@ -3012,7 +3012,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a conditional line breakpoint
|
// Create a conditional line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
breakpoint.put(IGNORE_COUNT_TAG, IGNORE_COUNT_2);
|
||||||
|
|
||||||
|
@ -3062,7 +3062,7 @@ public class MIBreakpointsTest extends BaseTestCase {
|
||||||
// Create a conditional line breakpoint
|
// Create a conditional line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Install the breakpoint
|
// Install the breakpoint
|
||||||
|
|
|
@ -82,9 +82,8 @@ import org.junit.runner.RunWith;
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class MICatchpointsTest extends BaseTestCase {
|
public class MICatchpointsTest extends BaseTestCase {
|
||||||
|
|
||||||
private static final String TEST_APPL = "data/launch/bin/CatchpointTestApp.exe"; //$NON-NLS-1$
|
private static final String EXEC_NAME = "CatchpointTestApp.exe"; //$NON-NLS-1$
|
||||||
|
private static final String SOURCE_NAME = "CatchpointTestApp.cc"; //$NON-NLS-1$
|
||||||
public static final String SOURCE_FILE = "CatchpointTestApp.cc"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
public static final int LINE_NUMBER_SLEEP_CALL = 17;
|
public static final int LINE_NUMBER_SLEEP_CALL = 17;
|
||||||
|
|
||||||
|
@ -185,7 +184,7 @@ public class MICatchpointsTest extends BaseTestCase {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
// Select the binary to run the tests against
|
// Select the binary to run the tests against
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, TEST_APPL);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1277,7 +1276,7 @@ public class MICatchpointsTest extends BaseTestCase {
|
||||||
// Set the breakpoint
|
// Set the breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT);
|
breakpoint.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT);
|
||||||
breakpoint.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
|
breakpoint.put(MIBreakpoints.FILE_NAME, SOURCE_NAME);
|
||||||
breakpoint.put(MIBreakpoints.LINE_NUMBER, lineNumber);
|
breakpoint.put(MIBreakpoints.LINE_NUMBER, lineNumber);
|
||||||
IBreakpointDMContext refLineBkpt = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
IBreakpointDMContext refLineBkpt = insertBreakpoint(fBreakpointsDmc, breakpoint);
|
||||||
assertTrue(fWait.getMessage(), fWait.isOK());
|
assertTrue(fWait.getMessage(), fWait.isOK());
|
||||||
|
|
|
@ -58,10 +58,10 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class MIDisassemblyTest extends BaseTestCase {
|
public class MIDisassemblyTest extends BaseTestCase {
|
||||||
|
private static final String EXEC_NAME = "MemoryTestApp.exe";
|
||||||
private static final String FILE_NAME = "MemoryTestApp.cc";
|
private static final String SOURCE_NAME = "MemoryTestApp.cc";
|
||||||
private static final int LINE_NUMBER = 35;
|
private static final int LINE_NUMBER = 35;
|
||||||
private static final String INVALID_FILE_NAME = "invalid_filename";
|
private static final String INVALID_SOURCE_NAME = "invalid_filename";
|
||||||
|
|
||||||
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
|
@ -106,7 +106,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
// Select the binary to run the tests against
|
// Select the binary to run the tests against
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/MemoryTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -465,7 +465,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
public void readWithValidFunction() throws Throwable {
|
public void readWithValidFunction() throws Throwable {
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
String filename = INVALID_FILE_NAME;
|
String filename = INVALID_SOURCE_NAME;
|
||||||
int linenum = 1;
|
int linenum = 1;
|
||||||
int count = -1;
|
int count = -1;
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
public void readWithInvalidLineNumber() throws Throwable {
|
public void readWithInvalidLineNumber() throws Throwable {
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
String filename = FILE_NAME;
|
String filename = SOURCE_NAME;
|
||||||
int linenum = -1;
|
int linenum = -1;
|
||||||
int count = -1;
|
int count = -1;
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
public void readWithValidFilename() throws Throwable {
|
public void readWithValidFilename() throws Throwable {
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
String filename = FILE_NAME;
|
String filename = SOURCE_NAME;
|
||||||
int linenum = LINE_NUMBER;
|
int linenum = LINE_NUMBER;
|
||||||
int count = -1;
|
int count = -1;
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
public void readWithLineCount() throws Throwable {
|
public void readWithLineCount() throws Throwable {
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
String filename = FILE_NAME;
|
String filename = SOURCE_NAME;
|
||||||
int linenum = LINE_NUMBER;
|
int linenum = LINE_NUMBER;
|
||||||
int count = 5;
|
int count = 5;
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ public class MIDisassemblyTest extends BaseTestCase {
|
||||||
public void readMixedWithLineCount() throws Throwable {
|
public void readMixedWithLineCount() throws Throwable {
|
||||||
|
|
||||||
// Setup call parameters
|
// Setup call parameters
|
||||||
String filename = FILE_NAME;
|
String filename = SOURCE_NAME;
|
||||||
int linenum = LINE_NUMBER;
|
int linenum = LINE_NUMBER;
|
||||||
int count = 5;
|
int count = 5;
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class MIExpressionsTest extends BaseTestCase {
|
public class MIExpressionsTest extends BaseTestCase {
|
||||||
|
private static final String EXEC_NAME = "ExpressionTestApp.exe";
|
||||||
|
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ public class MIExpressionsTest extends BaseTestCase {
|
||||||
protected void setLaunchAttributes() {
|
protected void setLaunchAttributes() {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/ExpressionTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,6 +57,7 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class MIMemoryTest extends BaseTestCase {
|
public class MIMemoryTest extends BaseTestCase {
|
||||||
|
private static final String EXEC_NAME = "MemoryTestApp.exe";
|
||||||
|
|
||||||
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
private final AsyncCompletionWaitor fWait = new AsyncCompletionWaitor();
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
|
@ -115,7 +116,7 @@ public class MIMemoryTest extends BaseTestCase {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
// Select the binary to run the tests against
|
// Select the binary to run the tests against
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/MemoryTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,16 +57,11 @@ public class MIRunControlTargetAvailableTest extends BaseTestCase {
|
||||||
|
|
||||||
private IContainerDMContext fContainerDmc;
|
private IContainerDMContext fContainerDmc;
|
||||||
|
|
||||||
/*
|
|
||||||
* Path to executable
|
|
||||||
*/
|
|
||||||
private static final String EXEC_PATH = "data/launch/bin/";
|
|
||||||
/*
|
/*
|
||||||
* Name of the executable
|
* Name of the executable
|
||||||
*/
|
*/
|
||||||
private static final String EXEC_NAME = "TargetAvail.exe";
|
private static final String EXEC_NAME = "TargetAvail.exe";
|
||||||
private static final String SOURCE_NAME = "TargetAvail.cc";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doBeforeTest() throws Exception {
|
public void doBeforeTest() throws Exception {
|
||||||
super.doBeforeTest();
|
super.doBeforeTest();
|
||||||
|
|
|
@ -61,7 +61,6 @@ public class OperationsWhileTargetIsRunningTest extends BaseTestCase {
|
||||||
private IMIContainerDMContext fContainerDmc;
|
private IMIContainerDMContext fContainerDmc;
|
||||||
private IGDBControl fControl;
|
private IGDBControl fControl;
|
||||||
|
|
||||||
private static final String EXEC_PATH = "data/launch/bin/";
|
|
||||||
private static final String EXEC_NAME = "TargetAvail.exe";
|
private static final String EXEC_NAME = "TargetAvail.exe";
|
||||||
|
|
||||||
private static boolean fgAutoTerminate;
|
private static boolean fgAutoTerminate;
|
||||||
|
|
|
@ -57,6 +57,9 @@ import org.junit.runner.RunWith;
|
||||||
|
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class PostMortemCoreTest extends BaseTestCase {
|
public class PostMortemCoreTest extends BaseTestCase {
|
||||||
|
private static final String EXEC_NAME = "ExpressionTestApp.exe";
|
||||||
|
private static final String INVALID_CORE_NAME = "MultiThread.exe";
|
||||||
|
private static final String CORE_NAME = "core";
|
||||||
|
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
|
|
||||||
|
@ -83,7 +86,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
// especially in the case of a relative path
|
// especially in the case of a relative path
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "${workspace_loc}");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "${workspace_loc}");
|
||||||
// Because we just set a different working directory, we must use an absolute path for the program
|
// Because we just set a different working directory, we must use an absolute path for the program
|
||||||
String absoluteProgram = new Path("data/launch/bin/ExpressionTestApp.exe").toFile().getAbsolutePath();
|
String absoluteProgram = new Path(EXEC_PATH + EXEC_NAME).toFile().getAbsolutePath();
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, absoluteProgram);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, absoluteProgram);
|
||||||
|
|
||||||
// Set post-mortem launch
|
// Set post-mortem launch
|
||||||
|
@ -93,7 +96,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_POST_MORTEM_TYPE,
|
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_POST_MORTEM_TYPE,
|
||||||
IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_CORE_FILE);
|
IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_CORE_FILE);
|
||||||
// Set default core file path
|
// Set default core file path
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, "data/launch/bin/core");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, EXEC_PATH + CORE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method cannot be tagged as @Before, because the launch is not
|
// This method cannot be tagged as @Before, because the launch is not
|
||||||
|
@ -144,7 +147,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testAbsoluteCoreFilePath() throws Throwable {
|
public void testAbsoluteCoreFilePath() throws Throwable {
|
||||||
File file = new File("data/launch/bin/core");
|
File file = new File(EXEC_PATH + CORE_NAME);
|
||||||
assertTrue("Cannot find test file; " + file.toString(), file.exists());
|
assertTrue("Cannot find test file; " + file.toString(), file.exists());
|
||||||
|
|
||||||
String absoluteCoreFile = file.getAbsolutePath();
|
String absoluteCoreFile = file.getAbsolutePath();
|
||||||
|
@ -161,7 +164,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRelativeCoreFilePath() throws Throwable {
|
public void testRelativeCoreFilePath() throws Throwable {
|
||||||
File file = new File("data/launch/bin/core");
|
File file = new File(EXEC_PATH + CORE_NAME);
|
||||||
assertTrue("Cannot find test file; " + file.toString(), file.exists());
|
assertTrue("Cannot find test file; " + file.toString(), file.exists());
|
||||||
|
|
||||||
String relativeCoreFile = file.toString();
|
String relativeCoreFile = file.toString();
|
||||||
|
@ -178,7 +181,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testAbsoluteCoreFilePathInvalid() throws Throwable {
|
public void testAbsoluteCoreFilePathInvalid() throws Throwable {
|
||||||
File file = new File("data/launch/bin/MultiThread.exe");
|
File file = new File(EXEC_PATH + INVALID_CORE_NAME);
|
||||||
assertTrue("Cannot find test file: " + file.toString(), file.exists());
|
assertTrue("Cannot find test file: " + file.toString(), file.exists());
|
||||||
|
|
||||||
String absoluteCoreFile = file.getAbsolutePath();
|
String absoluteCoreFile = file.getAbsolutePath();
|
||||||
|
@ -200,7 +203,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRelativeCoreFilePathInvalid() throws Throwable {
|
public void testRelativeCoreFilePathInvalid() throws Throwable {
|
||||||
File file = new File("data/launch/bin/MultiThread.exe");
|
File file = new File(EXEC_PATH + INVALID_CORE_NAME);
|
||||||
assertTrue("Cannot find test file: " + file.toString(), file.exists());
|
assertTrue("Cannot find test file: " + file.toString(), file.exists());
|
||||||
|
|
||||||
String relativeCoreFile = file.toString();
|
String relativeCoreFile = file.toString();
|
||||||
|
@ -222,7 +225,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testAbsoluteCoreFilePathMissing() throws Throwable {
|
public void testAbsoluteCoreFilePathMissing() throws Throwable {
|
||||||
File file = new File("data/launch/bin/MissingFile");
|
File file = new File(EXEC_PATH + "MissingFile");
|
||||||
assertTrue("Should not have found test file: " + file.toString(), !file.exists());
|
assertTrue("Should not have found test file: " + file.toString(), !file.exists());
|
||||||
|
|
||||||
String absoluteCoreFile = file.getAbsolutePath();
|
String absoluteCoreFile = file.getAbsolutePath();
|
||||||
|
@ -244,7 +247,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRelativeCoreFilePathMissing() throws Throwable {
|
public void testRelativeCoreFilePathMissing() throws Throwable {
|
||||||
File file = new File("data/launch/bin/MissingFile");
|
File file = new File(EXEC_PATH + "MissingFile");
|
||||||
assertTrue("Should not have found test file: " + file.toString(), !file.exists());
|
assertTrue("Should not have found test file: " + file.toString(), !file.exists());
|
||||||
|
|
||||||
String relativeCoreFile = file.toString();
|
String relativeCoreFile = file.toString();
|
||||||
|
@ -278,7 +281,7 @@ public class PostMortemCoreTest extends BaseTestCase {
|
||||||
// properly.
|
// properly.
|
||||||
|
|
||||||
// Absolute path of the core file
|
// Absolute path of the core file
|
||||||
File file = new File("data/launch/bin/core");
|
File file = new File(EXEC_PATH + CORE_NAME);
|
||||||
String absoluteCoreFile = file.getAbsolutePath();
|
String absoluteCoreFile = file.getAbsolutePath();
|
||||||
|
|
||||||
// Variable for workspace location
|
// Variable for workspace location
|
||||||
|
|
|
@ -54,8 +54,9 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
|
|
||||||
private IRunControl3 fRunCtrl;
|
private IRunControl3 fRunCtrl;
|
||||||
|
|
||||||
private static final String SRC_FILE = "StepIntoSelectionTestApp.cc";
|
private static final String EXEC_NAME = "StepIntoSelectionTestApp.exe";
|
||||||
private static final String HDR_FILE = "StepIntoSelection.h";
|
private static final String SOURCE_NAME = "StepIntoSelectionTestApp.cc";
|
||||||
|
private static final String HEADER_NAME = "StepIntoSelection.h";
|
||||||
private static final int FOO_LINE = 11;
|
private static final int FOO_LINE = 11;
|
||||||
private static final int BAR_LINE = 20;
|
private static final int BAR_LINE = 20;
|
||||||
private static final int VALUE_LINE = 5;
|
private static final int VALUE_LINE = 5;
|
||||||
|
@ -119,7 +120,7 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
@Override
|
@Override
|
||||||
protected void setLaunchAttributes() {
|
protected void setLaunchAttributes() {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/StepIntoSelectionTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateLocation(ISuspendedDMEvent suspendedEvent, String expectedFunction,
|
private void validateLocation(ISuspendedDMEvent suspendedEvent, String expectedFunction,
|
||||||
|
@ -224,10 +225,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcFoo;
|
FunctionDeclaration targetFunction = funcFoo;
|
||||||
|
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
stoppedEvent.getFrame().getLine(), targetFunction, false);
|
stoppedEvent.getFrame().getLine(), targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, FOO_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -241,10 +242,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcFoo;
|
FunctionDeclaration targetFunction = funcFoo;
|
||||||
int line = stoppedEvent.getFrame().getLine() + 3; // The method to stepInto is three lines below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 3; // The method to stepInto is three lines below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false);
|
line, targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, FOO_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -258,10 +259,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcValue;
|
FunctionDeclaration targetFunction = funcValue;
|
||||||
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false);
|
line, targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), HDR_FILE, VALUE_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), HEADER_NAME, VALUE_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,10 +277,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcFoo;
|
FunctionDeclaration targetFunction = funcFoo;
|
||||||
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false);
|
line, targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, FOO_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -294,10 +295,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcBar;
|
FunctionDeclaration targetFunction = funcBar;
|
||||||
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false);
|
line, targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, BAR_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, BAR_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -313,10 +314,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
|
|
||||||
int line = stoppedEvent.getFrame().getLine() + 2; // The method to stepInto is two lines below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 2; // The method to stepInto is two lines below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false);
|
line, targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, finalLine, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, finalLine, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -340,10 +341,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
|
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
|
||||||
|
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false);
|
line, targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, functionName, SRC_FILE, bpline, originalDepth);
|
validateLocation(suspendedEvent, functionName, SOURCE_NAME, bpline, originalDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -364,16 +365,16 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
SyncUtil.addBreakpoint(Integer.toString(bpline));
|
SyncUtil.addBreakpoint(Integer.toString(bpline));
|
||||||
|
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false); // Don't skip breakpoints
|
line, targetFunction, false); // Don't skip breakpoints
|
||||||
|
|
||||||
validateLocation(suspendedEvent, functionName, SRC_FILE, bpline, originalDepth);
|
validateLocation(suspendedEvent, functionName, SOURCE_NAME, bpline, originalDepth);
|
||||||
|
|
||||||
// Make sure the step to selection operation is no longer active by triggering a run to line before the step into selection line
|
// Make sure the step to selection operation is no longer active by triggering a run to line before the step into selection line
|
||||||
suspendedEvent = triggerRunToLine(stoppedEvent.getDMContext(), SRC_FILE,
|
suspendedEvent = triggerRunToLine(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
bpline + 1, false);
|
bpline + 1, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, functionName, SRC_FILE, bpline + 1, originalDepth);
|
validateLocation(suspendedEvent, functionName, SOURCE_NAME, bpline + 1, originalDepth);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,16 +394,16 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
|
|
||||||
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
|
int line = originalLine + 3; // The method to stepInto is three lines below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, funcFoo, false);
|
line, funcFoo, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, functionName, SRC_FILE, originalLine + 1, originalDepth);
|
validateLocation(suspendedEvent, functionName, SOURCE_NAME, originalLine + 1, originalDepth);
|
||||||
|
|
||||||
// Make sure the step to selection operation is no longer active by triggering a run to line before the step into selection line
|
// Make sure the step to selection operation is no longer active by triggering a run to line before the step into selection line
|
||||||
suspendedEvent = triggerRunToLine(stoppedEvent.getDMContext(), SRC_FILE,
|
suspendedEvent = triggerRunToLine(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
originalLine + 2, false);
|
originalLine + 2, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, functionName, SRC_FILE, originalLine + 2, originalDepth);
|
validateLocation(suspendedEvent, functionName, SOURCE_NAME, originalLine + 2, originalDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -424,10 +425,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcFoo;
|
FunctionDeclaration targetFunction = funcFoo;
|
||||||
|
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, true);
|
line, targetFunction, true);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, FOO_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, FOO_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void atDoubleMethodStopAtBreakpointCommon(int foo_line) throws Throwable {
|
private void atDoubleMethodStopAtBreakpointCommon(int foo_line) throws Throwable {
|
||||||
|
@ -441,10 +442,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcBar;
|
FunctionDeclaration targetFunction = funcBar;
|
||||||
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, false); // Set not to skip breakpoints, but it should have no effect
|
line, targetFunction, false); // Set not to skip breakpoints, but it should have no effect
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, BAR_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, BAR_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -481,10 +482,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
FunctionDeclaration targetFunction = funcBar;
|
FunctionDeclaration targetFunction = funcBar;
|
||||||
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
int line = stoppedEvent.getFrame().getLine() + 1; // The method to stepInto is one line below the start of the method
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
line, targetFunction, true); // Set skip breakpoints, which should have non impact
|
line, targetFunction, true); // Set skip breakpoints, which should have non impact
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, BAR_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, BAR_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -522,10 +523,10 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
|
|
||||||
FunctionDeclaration targetFunction = funcAddWithArg;
|
FunctionDeclaration targetFunction = funcAddWithArg;
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
stoppedEvent.getFrame().getLine(), targetFunction, false);
|
stoppedEvent.getFrame().getLine(), targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, ADD_WITH_ARG_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, ADD_WITH_ARG_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -535,9 +536,9 @@ public class StepIntoSelectionTest extends BaseTestCase {
|
||||||
|
|
||||||
FunctionDeclaration targetFunction = funcAddNoArg;
|
FunctionDeclaration targetFunction = funcAddNoArg;
|
||||||
// StepInto the method
|
// StepInto the method
|
||||||
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SRC_FILE,
|
ISuspendedDMEvent suspendedEvent = triggerStepIntoSelection(stoppedEvent.getDMContext(), SOURCE_NAME,
|
||||||
stoppedEvent.getFrame().getLine(), targetFunction, false);
|
stoppedEvent.getFrame().getLine(), targetFunction, false);
|
||||||
|
|
||||||
validateLocation(suspendedEvent, targetFunction.getElementName(), SRC_FILE, ADD_NO_ARG_LINE, originalDepth + 1);
|
validateLocation(suspendedEvent, targetFunction.getElementName(), SOURCE_NAME, ADD_NO_ARG_LINE, originalDepth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class MIBreakpointsTest_6_8 extends MIBreakpointsTest_6_7 {
|
||||||
// Create an invalid line breakpoint
|
// Create an invalid line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE + "_bad");
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME + "_bad");
|
||||||
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_1);
|
||||||
|
|
||||||
// Perform the test, which we still expect to succeed
|
// Perform the test, which we still expect to succeed
|
||||||
|
@ -108,7 +108,7 @@ public class MIBreakpointsTest_6_8 extends MIBreakpointsTest_6_7 {
|
||||||
// Create an invalid function breakpoint
|
// Create an invalid function breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(FUNCTION_TAG, "invalid-function-name");
|
breakpoint.put(FUNCTION_TAG, "invalid-function-name");
|
||||||
|
|
||||||
// Perform the test, which we still expect to succeed
|
// Perform the test, which we still expect to succeed
|
||||||
|
|
|
@ -55,11 +55,7 @@ public class GDBMultiNonStopRunControlTest_7_0 extends BaseTestCase {
|
||||||
private DsfServicesTracker fServicesTracker;
|
private DsfServicesTracker fServicesTracker;
|
||||||
|
|
||||||
private IMultiRunControl fMultiRun;
|
private IMultiRunControl fMultiRun;
|
||||||
|
|
||||||
/*
|
|
||||||
* Path to executable
|
|
||||||
*/
|
|
||||||
private static final String EXEC_PATH = "data/launch/bin/";
|
|
||||||
/*
|
/*
|
||||||
* Name of the executable
|
* Name of the executable
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -66,7 +66,8 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
|
||||||
|
|
||||||
// private int fTotalTracingBufferSize = 0;
|
// private int fTotalTracingBufferSize = 0;
|
||||||
|
|
||||||
protected static final String SOURCE_FILE = "TracepointTestApp.cc";
|
protected static final String EXEC_NAME = "TracepointTestApp.exe";
|
||||||
|
protected static final String SOURCE_NAME = "TracepointTestApp.cc";
|
||||||
protected static final int LINE_NUMBER_1_BYTE_INSTR = 28;
|
protected static final int LINE_NUMBER_1_BYTE_INSTR = 28;
|
||||||
protected static final int LINE_NUMBER_2_BYTE_INSTR = 15;
|
protected static final int LINE_NUMBER_2_BYTE_INSTR = 15;
|
||||||
protected static final int LINE_NUMBER_3_BYTE_INSTR = 17;
|
protected static final int LINE_NUMBER_3_BYTE_INSTR = 17;
|
||||||
|
@ -185,7 +186,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
|
||||||
protected void setLaunchAttributes() {
|
protected void setLaunchAttributes() {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/TracepointTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
|
|
||||||
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||||
|
@ -588,7 +589,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
|
||||||
boolean isFastTp;
|
boolean isFastTp;
|
||||||
|
|
||||||
public TracepointData(int line, String cond, int pass, boolean isEnabled, String cmds, boolean fast) {
|
public TracepointData(int line, String cond, int pass, boolean isEnabled, String cmds, boolean fast) {
|
||||||
this(SOURCE_FILE, line, cond, pass, isEnabled, cmds, fast);
|
this(SOURCE_NAME, line, cond, pass, isEnabled, cmds, fast);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TracepointData(String file, int line, String cond, int pass, boolean isEnabled, String cmds, boolean fast) {
|
public TracepointData(String file, int line, String cond, int pass, boolean isEnabled, String cmds, boolean fast) {
|
||||||
|
@ -669,7 +670,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
|
||||||
for (int i = 0; i < lineNumbers.length; i++) {
|
for (int i = 0; i < lineNumbers.length; i++) {
|
||||||
attributes = new HashMap<String, Object>();
|
attributes = new HashMap<String, Object>();
|
||||||
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
|
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
|
||||||
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
|
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_NAME);
|
||||||
attributes.put(MIBreakpoints.LINE_NUMBER, lineNumbers[i]);
|
attributes.put(MIBreakpoints.LINE_NUMBER, lineNumbers[i]);
|
||||||
if (!enabled) attributes.put(MIBreakpoints.IS_ENABLED, enabled);
|
if (!enabled) attributes.put(MIBreakpoints.IS_ENABLED, enabled);
|
||||||
if (useCount) attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[i]);
|
if (useCount) attributes.put(MIBreakpoints.PASS_COUNT, PASS_COUNTS[i]);
|
||||||
|
@ -897,7 +898,7 @@ public class GDBRemoteTracepointsTest_7_0 extends BaseTestCase {
|
||||||
for (int i = 0; i < lineNumbers.length; i++) {
|
for (int i = 0; i < lineNumbers.length; i++) {
|
||||||
attributes = new HashMap<String, Object>();
|
attributes = new HashMap<String, Object>();
|
||||||
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
|
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
|
||||||
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_FILE);
|
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_NAME);
|
||||||
attributes.put(MIBreakpoints.LINE_NUMBER, lineNumbers[i]);
|
attributes.put(MIBreakpoints.LINE_NUMBER, lineNumbers[i]);
|
||||||
attributes.put(MIBreakpoints.COMMANDS, cmdNames[i]);
|
attributes.put(MIBreakpoints.COMMANDS, cmdNames[i]);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class MIBreakpointsTest_7_4 extends MIBreakpointsTest_7_3 {
|
||||||
// Create a line breakpoint
|
// Create a line breakpoint
|
||||||
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
Map<String, Object> breakpoint = new HashMap<String, Object>();
|
||||||
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG);
|
||||||
breakpoint.put(FILE_NAME_TAG, SOURCE_FILE);
|
breakpoint.put(FILE_NAME_TAG, SOURCE_NAME);
|
||||||
breakpoint.put(LINE_NUMBER_TAG, 0);
|
breakpoint.put(LINE_NUMBER_TAG, 0);
|
||||||
|
|
||||||
// Perform the test
|
// Perform the test
|
||||||
|
|
|
@ -64,15 +64,15 @@ import org.junit.runners.MethodSorters;
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class TraceFileTest_7_4 extends BaseTestCase {
|
public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
|
|
||||||
private final static String FILE_NAME = "TracepointTestApp.cc";
|
private final static String SOURCE_NAME = "TracepointTestApp.cc";
|
||||||
private final static String EXECUTABLE_PATH = "data/launch/bin/TracepointTestApp.exe";
|
private final static String EXEC_NAME = "TracepointTestApp.exe";
|
||||||
|
private final static String TRACE_NAME = "trace";
|
||||||
private final static int LINE_NUMBER_1 = 17;
|
private final static int LINE_NUMBER_1 = 17;
|
||||||
private final static int LINE_NUMBER_2 = 24;
|
private final static int LINE_NUMBER_2 = 24;
|
||||||
private final static String END_FUNCTION = "lastCall";
|
private final static String END_FUNCTION = "lastCall";
|
||||||
private final static String TEVAL_STRING = "a";
|
private final static String TEVAL_STRING = "a";
|
||||||
private final static String COLLECT_STRING1 = "x";
|
private final static String COLLECT_STRING1 = "x";
|
||||||
private final static String COLLECT_STRING2 = "$regs";
|
private final static String COLLECT_STRING2 = "$regs";
|
||||||
private final static String TRACE_FILE = "data/launch/bin/trace";
|
|
||||||
|
|
||||||
private DsfSession fSession;
|
private DsfSession fSession;
|
||||||
private DsfServicesTracker fServicesTracker;
|
private DsfServicesTracker fServicesTracker;
|
||||||
|
@ -184,7 +184,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
// especially in the case of a relative path
|
// especially in the case of a relative path
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "${workspace_loc}");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "${workspace_loc}");
|
||||||
// Because we just set a different working directory, we must use an absolute path for the program
|
// Because we just set a different working directory, we must use an absolute path for the program
|
||||||
String absoluteProgram = new Path("data/launch/bin/TracepointTestApp.exe").toFile().getAbsolutePath();
|
String absoluteProgram = new Path(EXEC_PATH + EXEC_NAME).toFile().getAbsolutePath();
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, absoluteProgram);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, absoluteProgram);
|
||||||
|
|
||||||
// Set post-mortem launch
|
// Set post-mortem launch
|
||||||
|
@ -194,7 +194,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_POST_MORTEM_TYPE,
|
setLaunchAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_POST_MORTEM_TYPE,
|
||||||
IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_TRACE_FILE);
|
IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_TRACE_FILE);
|
||||||
// Set core file path
|
// Set core file path
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, TRACE_FILE);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, EXEC_PATH + TRACE_NAME);
|
||||||
|
|
||||||
doLaunch();
|
doLaunch();
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
|
|
||||||
private void checkTracepoint(ICTracepoint tracepoint) throws Throwable {
|
private void checkTracepoint(ICTracepoint tracepoint) throws Throwable {
|
||||||
TracepointActionManager tam = TracepointActionManager.getInstance();
|
TracepointActionManager tam = TracepointActionManager.getInstance();
|
||||||
assertTrue(FILE_NAME.equals(new Path(tracepoint.getFileName()).lastSegment()));
|
assertTrue(SOURCE_NAME.equals(new Path(tracepoint.getFileName()).lastSegment()));
|
||||||
assertTrue(LINE_NUMBER_1 == tracepoint.getLineNumber() || LINE_NUMBER_2 == tracepoint.getLineNumber());
|
assertTrue(LINE_NUMBER_1 == tracepoint.getLineNumber() || LINE_NUMBER_2 == tracepoint.getLineNumber());
|
||||||
String[] actionNames =
|
String[] actionNames =
|
||||||
((String)tracepoint.getMarker().getAttribute(BreakpointActionManager.BREAKPOINT_ACTION_ATTRIBUTE)).split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
|
((String)tracepoint.getMarker().getAttribute(BreakpointActionManager.BREAKPOINT_ACTION_ATTRIBUTE)).split(TracepointActionManager.TRACEPOINT_ACTION_DELIMITER);
|
||||||
|
@ -262,7 +262,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
private void startRemoteSession() throws Throwable {
|
private void startRemoteSession() throws Throwable {
|
||||||
// Set launch attributes
|
// Set launch attributes
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXECUTABLE_PATH);
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
// GDB tracepoints are only supported on a remote target (e.g., using gdbserver)
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
|
||||||
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
|
||||||
|
@ -347,7 +347,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
private MIBreakpointDMContext setBreakpointAtEndLine() throws Throwable {
|
private MIBreakpointDMContext setBreakpointAtEndLine() throws Throwable {
|
||||||
Map<String, Object> attributes = new HashMap<String, Object>();
|
Map<String, Object> attributes = new HashMap<String, Object>();
|
||||||
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT);
|
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT);
|
||||||
attributes.put(MIBreakpoints.FILE_NAME, FILE_NAME);
|
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_NAME);
|
||||||
attributes.put(MIBreakpoints.FUNCTION, END_FUNCTION);
|
attributes.put(MIBreakpoints.FUNCTION, END_FUNCTION);
|
||||||
IBreakpointDMContext bptDMC = insertBreakpoint(fBreakpointsDmc, attributes);
|
IBreakpointDMContext bptDMC = insertBreakpoint(fBreakpointsDmc, attributes);
|
||||||
assertTrue(bptDMC instanceof MIBreakpointDMContext);
|
assertTrue(bptDMC instanceof MIBreakpointDMContext);
|
||||||
|
@ -375,7 +375,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
|
|
||||||
Map<String, Object> attributes = new HashMap<String, Object>();
|
Map<String, Object> attributes = new HashMap<String, Object>();
|
||||||
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
|
attributes.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.TRACEPOINT);
|
||||||
attributes.put(MIBreakpoints.FILE_NAME, FILE_NAME);
|
attributes.put(MIBreakpoints.FILE_NAME, SOURCE_NAME);
|
||||||
attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
|
attributes.put(MIBreakpoints.LINE_NUMBER, LINE_NUMBER_1);
|
||||||
attributes.put(MIBreakpoints.COMMANDS, evalAction.getName());
|
attributes.put(MIBreakpoints.COMMANDS, evalAction.getName());
|
||||||
insertBreakpoint(fBreakpointsDmc, attributes);
|
insertBreakpoint(fBreakpointsDmc, attributes);
|
||||||
|
@ -414,7 +414,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveTraceData() throws Throwable {
|
private void saveTraceData() throws Throwable {
|
||||||
final File traceFile = new Path(TRACE_FILE).toFile();
|
final File traceFile = new Path(EXEC_PATH + TRACE_NAME).toFile();
|
||||||
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
|
||||||
|
|
||||||
fSession.getExecutor().submit(new Runnable() {
|
fSession.getExecutor().submit(new Runnable() {
|
||||||
|
@ -440,7 +440,7 @@ public class TraceFileTest_7_4 extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteOldTraceFile() throws Throwable {
|
private void deleteOldTraceFile() throws Throwable {
|
||||||
File traceFile = new Path(TRACE_FILE).toFile();
|
File traceFile = new Path(EXEC_PATH + TRACE_NAME).toFile();
|
||||||
traceFile.delete();
|
traceFile.delete();
|
||||||
assertFalse(traceFile.exists());
|
assertFalse(traceFile.exists());
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ import org.junit.runner.RunWith;
|
||||||
*/
|
*/
|
||||||
@RunWith(BackgroundRunner.class)
|
@RunWith(BackgroundRunner.class)
|
||||||
public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
|
public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
|
||||||
|
final static private String EXEC_NAME = "ConsoleSyncTestApp.exe";
|
||||||
|
|
||||||
final static private int DEFAULT_TIMEOUT = 1000;
|
final static private int DEFAULT_TIMEOUT = 1000;
|
||||||
final static private TimeUnit DEFAULT_TIME_UNIT = TimeUnit.MILLISECONDS;
|
final static private TimeUnit DEFAULT_TIME_UNIT = TimeUnit.MILLISECONDS;
|
||||||
|
@ -83,8 +84,8 @@ public class GDBConsoleSynchronizingTest_7_6 extends BaseTestCase {
|
||||||
@Override
|
@Override
|
||||||
protected void setLaunchAttributes() {
|
protected void setLaunchAttributes() {
|
||||||
super.setLaunchAttributes();
|
super.setLaunchAttributes();
|
||||||
|
|
||||||
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "data/launch/bin/ConsoleSyncTestApp.exe");
|
setLaunchAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EXEC_PATH + EXEC_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue