tmf: Update the ctfadaptor tests for the new formatting
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / ctfadaptor / TestParams.java
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.ctfadaptor;
14
15 import java.io.File;
16
17 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
18 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
19 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
20
21 /**
22 * This is the set up for the trace files to be used with the ctfAdaptor tests.
23 */
24 abstract class TestParams {
25
26 /* Path to test traces */
27 private static final String testTracePath1 = "../org.eclipse.linuxtools.ctf.core.tests/traces/kernel"; //$NON-NLS-1$
28 private static CtfTmfTrace testTrace1 = null;
29
30 private static final File emptyFile = new File(""); //$NON-NLS-1$
31 private static CtfTmfTrace emptyTrace = new CtfTmfTrace();
32
33 public static File getEmptyFile() {
34 return emptyFile;
35 }
36
37 public static CtfTmfTrace getEmptyTrace() {
38 return emptyTrace;
39 }
40
41 public static String getPath(){
42 return testTracePath1;
43 }
44
45 public synchronized static CtfTmfTrace createTrace() throws TmfTraceException {
46 if (testTrace1 == null) {
47 testTrace1 = new CtfTmfTrace();
48 testTrace1.initTrace(null, testTracePath1, CtfTmfEvent.class);
49 }
50 return testTrace1;
51 }
52 }
This page took 0.031809 seconds and 5 git commands to generate.