use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testBranchSim.
@Test
public void testBranchSim() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getBranchButton().setSelection(true);
tab.performApply(wc);
wc.doSave();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testBranchSim");
IProcess[] p = launch.getProcesses();
assertTrue("process array should not be empty", p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
assertEquals(0, p[0].getExitValue());
// $NON-NLS-1$
assertTrue(cmd.contains("--branch-sim=yes"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testD1Cache.
@Test
public void testD1Cache() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
assertFalse(dynamicTab.getD1SizeSpinner().isEnabled());
dynamicTab.getD1Button().setSelection(true);
dynamicTab.getD1Button().notifyListeners(SWT.Selection, null);
assertTrue(dynamicTab.getD1SizeSpinner().isEnabled());
dynamicTab.getD1SizeSpinner().setSelection(16384);
dynamicTab.getD1AssocSpinner().setSelection(1);
dynamicTab.getD1LineSizeSpinner().setSelection(16);
tab.performApply(wc);
wc.doSave();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testD1Cache");
IProcess[] p = launch.getProcesses();
assertTrue("process array should not be empty", p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
// $NON-NLS-1$
assertTrue(cmd.contains("--D1=16384,1,16"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class MultiProcessTest method testNumFunctions.
@Test
public void testNumFunctions() throws Exception {
ILaunchConfigurationWorkingCopy config = createConfiguration(proj.getProject()).getWorkingCopy();
config.setAttribute(LaunchConfigurationConstants.ATTR_GENERAL_TRACECHILD, true);
config.doSave();
// $NON-NLS-1$
doLaunch(config, "testExec");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
int pidIx = 0;
CachegrindOutput output = view.getOutputs()[pidIx];
// $NON-NLS-1$
CachegrindFile file = getFileByName(output, "cpptest.cpp");
if (file == null) {
pidIx = 1;
output = view.getOutputs()[pidIx];
// $NON-NLS-1$
file = getFileByName(output, "cpptest.cpp");
}
assertNotNull(file);
assertEquals(8, file.getFunctions().length);
// test other pid
pidIx = (pidIx + 1) % 2;
output = view.getOutputs()[pidIx];
// $NON-NLS-1$
file = getFileByName(output, "parent.cpp");
assertNotNull(file);
assertEquals(6, file.getFunctions().length);
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class MultiProcessTest method testFileNames.
@Test
public void testFileNames() throws Exception {
ILaunchConfigurationWorkingCopy config = createConfiguration(proj.getProject()).getWorkingCopy();
config.setAttribute(LaunchConfigurationConstants.ATTR_GENERAL_TRACECHILD, true);
config.doSave();
// $NON-NLS-1$
doLaunch(config, "testExec");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
int pidIx = 0;
CachegrindOutput output = view.getOutputs()[pidIx];
// $NON-NLS-1$
CachegrindFile file = getFileByName(output, "cpptest.cpp");
if (file == null) {
pidIx = 1;
output = view.getOutputs()[pidIx];
// $NON-NLS-1$
file = getFileByName(output, "cpptest.cpp");
}
assertNotNull(file);
// $NON-NLS-1$
file = getFileByName(output, "cpptest.h");
assertNotNull(file);
// test other pid
pidIx = (pidIx + 1) % 2;
output = view.getOutputs()[pidIx];
// $NON-NLS-1$
file = getFileByName(output, "parent.cpp");
assertNotNull(file);
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testRunFreeRes.
@Test
public void testRunFreeRes() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
tab.getRunFreeresButton().setSelection(false);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testRunFreeRes");
IProcess[] p = launch.getProcesses();
assertTrue(p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
assertEquals(0, p[0].getExitValue());
// $NON-NLS-1$
assertTrue(cmd.contains("--run-libc-freeres=no"));
}
Aggregations