Copyright header update, 2015 edition
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.kernel.core.tests / src / org / eclipse / tracecompass / lttng2 / kernel / core / tests / analysis / kernel / statesystem / LttngKernelStateProviderTest.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
42d5b5f2 13package org.eclipse.tracecompass.lttng2.kernel.core.tests.analysis.kernel.statesystem;
efc403bb 14
b4f71e4a 15import static org.junit.Assert.assertEquals;
92ba8466 16import static org.junit.Assume.assumeTrue;
8020be3c 17
e363eae1 18import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
7411cd67 19import org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout.LttngEventLayout;
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 */
d3ba47d4 30public class LttngKernelStateProviderTest {
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());
e363eae1 42 input = new KernelStateProvider(testTrace.getTrace(), LttngEventLayout.getInstance());
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();
92ba8466 52 assertEquals(testStartTime, StateSystemTest.startTime);
efc403bb
AM
53 }
54
efc403bb 55}
This page took 0.090976 seconds and 5 git commands to generate.