use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class ChartTests method byteScalingHelper.
private void byteScalingHelper(int ix, long times, long bytes, String testName) throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, // $NON-NLS-1$
String.valueOf(bytes) + " " + String.valueOf(times));
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_TIMEUNIT, MassifLaunchConstants.TIME_B);
config = wc.doSave();
doLaunch(config, testName);
IAction chartAction = getChartAction();
assertNotNull(chartAction);
chartAction.run();
IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertTrue(part.getEditorInput() instanceof ChartEditorInput);
ChartEditorInput input = (ChartEditorInput) part.getEditorInput();
HeapChart chart = input.getChart();
assertEquals(HeapChart.getByteUnits()[ix], chart.getXUnits());
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class DoubleClickTest method testDoubleClickFile.
@Test
public void testDoubleClickFile() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_DETAILEDFREQ, 2);
wc.doSave();
// $NON-NLS-1$
doLaunch(config, "testDoubleClickFile");
doDoubleClick();
checkFile(proj.getProject(), node);
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class DoubleClickTest method testDoubleClickLine.
@Test
public void testDoubleClickLine() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_DETAILEDFREQ, 2);
wc.doSave();
// $NON-NLS-1$
doLaunch(config, "testDoubleClickLine");
doDoubleClick();
checkLine(node);
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testHeap.
@Test
public void testHeap() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getHeapButton().setSelection(false);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testHeap");
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("--heap=no"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testTimeUnitBytes.
@Test
public void testTimeUnitBytes() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
String[] items = dynamicTab.getTimeUnitCombo().getItems();
int ix = -1;
for (int i = 0; i < items.length; i++) {
if (items[i].equals(MassifToolPage.TIME_B_STRING)) {
ix = i;
}
}
dynamicTab.getTimeUnitCombo().select(ix);
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testTimeUnitBytes");
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("--time-unit=B"));
}
Aggregations