use of org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace in project tracecompass by tracecompass.
the class AbstractProviderTest method setUp.
// ------------------------------------------------------------------------
// Maintenance
// ------------------------------------------------------------------------
/**
* Perform pre-class initialization.
*/
@Before
public void setUp() {
CtfTestTrace testTrace = getTestTrace();
LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(testTrace);
fTrace = trace;
fModule = new TestLttngCallStackModule();
try {
assertTrue(fModule.setTrace(trace));
} catch (TmfAnalysisException e) {
fail();
}
fModule.schedule();
assertTrue(fModule.waitForCompletion());
fSS = fModule.getStateSystem();
assertNotNull(fSS);
}
use of org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace in project tracecompass by tracecompass.
the class MarkerSetSwtBotTest method setUp.
/**
* Set up the test context and environment
*/
@BeforeClass
public static void setUp() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 10000;
/* 10 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fBot = new SWTWorkbenchBot();
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
WaitUtils.waitForJobs();
final CtfTestTrace cygProfile = CtfTestTrace.CYG_PROFILE;
LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(cygProfile);
fStart = ((CtfTmfTrace) trace).getStartTime().toNanos();
fFullRange = new TmfTimeRange(TmfTimestamp.fromNanos(fStart), TmfTimestamp.fromNanos(fStart + 100l));
final File file = new File(trace.getPath());
LttngUstTestTraceUtils.dispose(cygProfile);
SWTBotUtils.openTrace(TRACE_PROJECT_NAME, file.getAbsolutePath(), UST_ID);
SWTBotUtils.openView(FlameChartView.ID);
fViewBot = fBot.viewByTitle("Flame Chart");
WaitUtils.waitForJobs();
}
use of org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace in project tracecompass by tracecompass.
the class CtfTmfLostEventsTest method testNbEventsBug475007.
/**
* Test that the number of events is reported correctly (a range of lost
* events is counted as one event). Events could be wrongly counted as lost
* events in certain situations.
*/
@Test
public void testNbEventsBug475007() {
final CtfTestTrace tmfTestTrace = CtfTestTrace.DYNSCOPE;
CtfTmfTrace trace = CtfTmfTestTraceUtils.getTrace(tmfTestTrace);
trace.indexTrace(true);
final long expectedReal = 100003;
final long expectedLost = 1;
EventCountRequest req = new EventCountRequest();
trace.sendRequest(req);
try {
req.waitForCompletion();
} catch (InterruptedException e) {
e.printStackTrace();
}
assertEquals(expectedReal, req.getReal());
assertEquals(expectedLost, req.getLost());
trace.dispose();
}
use of org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace in project tracecompass by tracecompass.
the class TraceReadAllTracesTest method getTracePaths.
/**
* Get the list of traces
*
* @return the list of traces
*/
@Parameters(name = "{index}: {0}")
public static Iterable<Object[]> getTracePaths() {
CtfTestTrace[] values = CtfTestTrace.values();
List<Object[]> list = new ArrayList<>();
for (CtfTestTrace value : values) {
list.add(new Object[] { value.name(), value });
}
return list;
}
use of org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace in project tracecompass by tracecompass.
the class FlameChartViewTest method beforeTest.
/**
* Open a trace in an editor
*/
@Before
public void beforeTest() {
SWTBotUtils.createProject(PROJECT_NAME);
SWTBotTreeItem treeItem = SWTBotUtils.selectTracesFolder(sfBot, PROJECT_NAME);
assertNotNull(treeItem);
final CtfTestTrace cygProfile = CtfTestTrace.CYG_PROFILE;
final File file = new File(CtfTmfTestTraceUtils.getTrace(cygProfile).getPath());
CtfTmfTestTraceUtils.dispose(cygProfile);
SWTBotUtils.openTrace(PROJECT_NAME, file.getAbsolutePath(), UST_ID);
SWTBotUtils.activateEditor(sfBot, file.getName());
SWTBotUtils.openView(FlameChartView.ID);
WaitUtils.waitForJobs();
final SWTBotView viewBot = sfBot.viewById(FlameChartView.ID);
IWorkbenchPart part = viewBot.getViewReference().getPart(false);
sfBot.waitUntil(ConditionHelpers.timeGraphIsReadyCondition((AbstractTimeGraphView) part, new TmfTimeRange(START_TIME, START_TIME), START_TIME));
}
Aggregations