lttng: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.analysis.os.linux.core.tests / src / org / eclipse / tracecompass / analysis / os / linux / core / tests / kernelanalysis / KernelStateProviderTest.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2015 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.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
14
15 import static org.junit.Assert.assertEquals;
16 import static org.junit.Assume.assumeTrue;
17
18 import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
19 import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
20 import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
21 import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
22 import org.junit.BeforeClass;
23 import org.junit.Test;
24
25 /**
26 * Tests for the {@link KernelStateProvider}
27 *
28 * @author Alexandre Montplaisir
29 */
30 public class KernelStateProviderTest {
31
32 private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
33
34 private static ITmfStateProvider input;
35
36 /**
37 * Set-up.
38 */
39 @BeforeClass
40 public static void initialize() {
41 assumeTrue(testTrace.exists());
42 input = new KernelStateProvider(testTrace.getTrace(), IKernelAnalysisEventLayout.DEFAULT_LAYOUT);
43 }
44
45 /**
46 * Test loading the state provider.
47 */
48 @Test
49 public void testOpening() {
50 long testStartTime;
51 testStartTime = input.getStartTime();
52 /* Expected start time of "trace2" */
53 assertEquals(testStartTime, 1331668247314038062L);
54 }
55
56 }
This page took 0.032264 seconds and 5 git commands to generate.