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 | ||
efc403bb AM |
15 | import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent; |
16 | import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace; | |
b4f71e4a | 17 | import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; |
efc403bb AM |
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: | |
cab5dfad | 31 | * http://www.dorsal.polymtl.ca/~alexmont/data/trace2.tar.bz2 |
efc403bb | 32 | * |
cab5dfad AM |
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. | |
efc403bb | 36 | */ |
8020be3c AM |
37 | public final static String traceFile = "traces/trace2"; //$NON-NLS-1$ |
38 | public final static long startTime = 18669367225825L; | |
39 | ||
ebd67b34 | 40 | private static CtfTmfTrace trace = null; |
8020be3c | 41 | |
ebd67b34 | 42 | public synchronized static CtfTmfTrace getTestTrace() throws TmfTraceException { |
8020be3c AM |
43 | if (trace == null) { |
44 | trace = new CtfTmfTrace(); | |
25e48683 | 45 | trace.initTrace(null, traceFile, CtfTmfEvent.class); |
efc403bb | 46 | } |
8020be3c | 47 | return trace; |
efc403bb AM |
48 | } |
49 | ||
50 | } |