Implement TmfTrace changes - introduce TmfTraceException
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core.tests / src / org / eclipse / linuxtools / lttng2 / kernel / core / tests / stateprovider / CTFTestFiles.java
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
15 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
16 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
17 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
18
19 /**
20 * Definitions used by all tests using CTF trace files
21 *
22 * @author alexmont
23 *
24 */
25 public abstract class CTFTestFiles {
26
27 public final static long NANOSECS_PER_SEC = 1000000000L;
28
29 /*
30 * To run these tests, you will need to download the following trace, at:
31 * http://www.dorsal.polymtl.ca/~alexmont/data/trace2.tar.bz2
32 *
33 * and extract it in the
34 * .../org.eclipse.linuxtools.lttng2.kernel.core.tests/traces/ directory.
35 * You can also set up a custom path below.
36 */
37 public final static String traceFile = "traces/trace2"; //$NON-NLS-1$
38 public final static long startTime = 18669367225825L;
39
40 public static CtfTmfTrace trace = null;
41
42 public static CtfTmfTrace getTestTrace() throws TmfTraceException {
43 if (trace == null) {
44 trace = new CtfTmfTrace();
45 trace.initTrace(null, traceFile, CtfTmfEvent.class);
46 }
47 return trace;
48 }
49
50 }
This page took 0.031461 seconds and 5 git commands to generate.