Commit | Line | Data |
---|---|---|
efc403bb AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2012 Ericsson | |
3 | * Copyright (c) 2010, 2011 École Polytechnique de Montréal | |
4 | * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com> | |
5 | * | |
6 | * All rights reserved. This program and the accompanying materials are | |
7 | * made available under the terms of the Eclipse Public License v1.0 which | |
8 | * accompanies this distribution, and is available at | |
9 | * http://www.eclipse.org/legal/epl-v10.html | |
10 | * | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider; | |
14 | ||
b4f71e4a | 15 | import static org.junit.Assert.assertEquals; |
8020be3c | 16 | |
dc0f7bfe | 17 | import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.CtfKernelStateInput; |
b4f71e4a | 18 | import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; |
18ab1d18 | 19 | import org.eclipse.linuxtools.tmf.core.statesystem.IStateChangeInput; |
efc403bb AM |
20 | import org.junit.AfterClass; |
21 | import org.junit.BeforeClass; | |
22 | import org.junit.Test; | |
efc403bb AM |
23 | |
24 | /** | |
25 | * Tests for the LTTng 2.0 kernel state provider | |
26 | * | |
27 | * @author alexmont | |
28 | * | |
29 | */ | |
dc0f7bfe | 30 | public class CtfKernelStateInputTest { |
efc403bb | 31 | |
ebd67b34 | 32 | static IStateChangeInput input; |
efc403bb AM |
33 | |
34 | @BeforeClass | |
b4f71e4a | 35 | public static void initialize() throws TmfTraceException { |
dc0f7bfe | 36 | input = new CtfKernelStateInput(CtfTestFiles.getTestTrace()); |
efc403bb AM |
37 | |
38 | } | |
39 | ||
40 | @AfterClass | |
41 | public static void cleanup() { | |
42 | // | |
43 | } | |
44 | ||
45 | @Test | |
46 | public void testOpening() { | |
47 | long testStartTime; | |
48 | testStartTime = input.getStartTime(); | |
dc0f7bfe | 49 | assertEquals(testStartTime, CtfTestFiles.startTime); |
efc403bb AM |
50 | } |
51 | ||
d26f90fd AM |
52 | //FIXME re-enable once we offer history-less state systems again |
53 | // @Test | |
54 | // public void testRunning() { | |
55 | // StateSystem ss = new StateSystem(); | |
56 | // input.assignTargetStateSystem(ss); | |
57 | // input.run(); | |
58 | // } | |
efc403bb AM |
59 | |
60 | } |