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
CommitLineData
efc403bb 1/*******************************************************************************
ed902a2b 2 * Copyright (c) 2012, 2015 Ericsson
efc403bb
AM
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
e743c3b8 5 *
efc403bb
AM
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
e743c3b8 10 *
efc403bb
AM
11 *******************************************************************************/
12
6d16f5a9 13package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
efc403bb 14
b4f71e4a 15import static org.junit.Assert.assertEquals;
92ba8466 16import static org.junit.Assume.assumeTrue;
8020be3c 17
6d16f5a9
AM
18import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
19import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
2bdf0193
AM
20import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
21import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
efc403bb
AM
22import org.junit.BeforeClass;
23import org.junit.Test;
efc403bb
AM
24
25/**
e363eae1 26 * Tests for the {@link KernelStateProvider}
e743c3b8 27 *
2ba3d0a1 28 * @author Alexandre Montplaisir
efc403bb 29 */
6d16f5a9 30public class KernelStateProviderTest {
efc403bb 31
9ac63b5b 32 private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
92ba8466 33
0fe46f2a 34 private static ITmfStateProvider input;
efc403bb 35
2ba3d0a1
AM
36 /**
37 * Set-up.
2ba3d0a1 38 */
efc403bb 39 @BeforeClass
92ba8466 40 public static void initialize() {
9ac63b5b 41 assumeTrue(testTrace.exists());
6d16f5a9 42 input = new KernelStateProvider(testTrace.getTrace(), IKernelAnalysisEventLayout.DEFAULT_LAYOUT);
efc403bb
AM
43 }
44
2ba3d0a1
AM
45 /**
46 * Test loading the state provider.
47 */
efc403bb
AM
48 @Test
49 public void testOpening() {
50 long testStartTime;
51 testStartTime = input.getStartTime();
6d16f5a9
AM
52 /* Expected start time of "trace2" */
53 assertEquals(testStartTime, 1331668247314038062L);
efc403bb
AM
54 }
55
efc403bb 56}
This page took 0.063906 seconds and 5 git commands to generate.