~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/TestParams.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
 
2
 
 
3
import java.io.File;
 
4
 
 
5
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
 
6
import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
 
7
import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 
8
 
 
9
 
 
10
public abstract class TestParams {
 
11
 
 
12
    /* Path to test traces */
 
13
    private static final String testTracePath1 = "testfiles/kernel"; //$NON-NLS-1$
 
14
    private static CtfTmfTrace testTrace1 = null;
 
15
 
 
16
    private static final File emptyFile = new File(""); //$NON-NLS-1$
 
17
    private static CtfTmfTrace emptyTrace = new CtfTmfTrace();
 
18
 
 
19
    public static File getEmptyFile() {
 
20
        return emptyFile;
 
21
    }
 
22
 
 
23
    public static CtfTmfTrace getEmptyTrace() {
 
24
        return emptyTrace;
 
25
    }
 
26
 
 
27
    public static String getPath(){
 
28
        return testTracePath1;
 
29
    }
 
30
 
 
31
    public synchronized static CtfTmfTrace createTrace() throws TmfTraceException {
 
32
        if (testTrace1 == null) {
 
33
            testTrace1 = new CtfTmfTrace();
 
34
            testTrace1.initTrace(null, testTracePath1, CtfTmfEvent.class);
 
35
        }
 
36
        return testTrace1;
 
37
    }
 
38
}