use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart 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.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart 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.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class BasicCachegrindTest method testFileNames.
@Test
public void testFileNames() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testFileNames");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
CachegrindOutput output = view.getOutputs()[0];
// $NON-NLS-1$
CachegrindFile file = getFileByName(output, "cpptest.cpp");
assertNotNull(file);
// $NON-NLS-1$
file = getFileByName(output, "cpptest.h");
assertNotNull(file);
}
use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class BasicCachegrindTest method testNumPIDs.
@Test
public void testNumPIDs() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testNumPIDs");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
assertEquals(1, view.getOutputs().length);
}
use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class BasicCachegrindTest method testNumFunctions.
@Test
public void testNumFunctions() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testNumFunctions");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
CachegrindOutput output = view.getOutputs()[0];
// $NON-NLS-1$
CachegrindFile file = getFileByName(output, "cpptest.cpp");
assertNotNull(file);
assertEquals(8, file.getFunctions().length);
}
Aggregations