Commit | Line | Data |
---|---|---|
e1c43333 AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2012 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Matthew Khouzam - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.core.tests.statistics; | |
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 | * This is the set up for the trace files to be used with the TmfStatistics | |
21 | * tests. | |
22 | */ | |
23 | abstract class TestParams { | |
24 | ||
25 | /* Path to test traces */ | |
26 | private static final String testTracePath1 = "../org.eclipse.linuxtools.ctf.core.tests/traces/kernel"; //$NON-NLS-1$ | |
27 | private static CtfTmfTrace testTrace1 = null; | |
28 | ||
29 | public synchronized static CtfTmfTrace createTrace() throws TmfTraceException { | |
30 | if (testTrace1 == null) { | |
31 | testTrace1 = new CtfTmfTrace(); | |
32 | testTrace1.initTrace(null, testTracePath1, CtfTmfEvent.class); | |
33 | } | |
34 | return testTrace1; | |
35 | } | |
36 | } |