use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testHistoryNone.
@Test
public void testHistoryNone() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getHistoryCombo().setText("none");
tab.performApply(wc);
wc.doSave();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric");
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("--history-level=none"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testConflictCacheSize.
@Test
public void testConflictCacheSize() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getCacheSizeSpinner().setSelection(123456);
tab.performApply(wc);
wc.doSave();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric");
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("--conflict-cache-size=123456"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method initConfig.
private ILaunchConfigurationWorkingCopy initConfig() throws CoreException {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
tab.setDefaults(wc);
tab.createControl(testShell);
tab.initializeFrom(config);
int ix = Arrays.asList(tab.getTools()).indexOf(HelgrindPlugin.TOOL_ID);
tab.getToolsCombo().select(ix);
ILaunchConfigurationTab dynamicTab = tab.getDynamicTab();
this.dynamicTab = (HelgrindToolPage) dynamicTab;
return wc;
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testDefaults.
@Test
public void testDefaults() throws CoreException, URISyntaxException, IOException {
ILaunchConfigurationWorkingCopy wc = initConfig();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testHelgrindGeneric");
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("--tool=helgrind"));
// $NON-NLS-1$
assertFalse(cmd.contains("--xml=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("-q"));
// $NON-NLS-1$
assertTrue(cmd.contains("--track-lockorders=yes"));
// $NON-NLS-1$
assertTrue(cmd.contains("--history-level=full"));
// $NON-NLS-1$
assertTrue(cmd.contains("--conflict-cache-size=1000000"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class ValgrindLaunchConfigurationDelegate method setOutputPath.
protected void setOutputPath(ILaunchConfiguration config, IPath outputPath) throws CoreException {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(LaunchConfigurationConstants.ATTR_INTERNAL_OUTPUT_DIR, outputPath.toPortableString());
wc.doSave();
}
Aggregations