- input = new CtfKernelStateInput(CtfTestFiles.getTestTrace());
- ssq = StateSystemManager.newInMemHistory(input, true);
- } catch (TmfTraceException e) {
- e.printStackTrace();
+ module.setTrace(testTrace.getTrace());
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module.schedule();
+ assertTrue(module.waitForCompletion(new NullProgressMonitor()));
+ ssq = module.getStateSystem();
+ assertNotNull(ssq);
+ }
+
+ private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+ /**
+ * Constructor adding the views to the analysis
+ */
+ public TestLttngKernelAnalysisModule() {
+ super();
+ }
+
+ @Override
+ public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
+ if (!(trace instanceof CtfTmfTrace)) {
+ throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
+ }
+ super.setTrace(trace);
+ }
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelStateProvider((CtfTmfTrace) getTrace());
+ }
+
+ @Override
+ protected StateSystemBackendType getBackendType() {
+ return StateSystemBackendType.FULL;