X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf.core.tests%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fcore%2Ftests%2Fctfadaptor%2FTestParams.java;h=c2bf932672d28a623f856fdd2a2d52bacf66e1f0;hb=9a43af17ab0a9c0583a39b2dc8944e9f57992116;hp=503ea40fe3d4bc3b877a90375212477233ed0fef;hpb=b4f71e4ab7e1347e6701424b17fec8619f32f58b;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/TestParams.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/TestParams.java index 503ea40fe3..c2bf932672 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/TestParams.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/TestParams.java @@ -1,3 +1,15 @@ +/******************************************************************************* + * Copyright (c) 2012 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Matthew Khouzam - Initial API and implementation + *******************************************************************************/ + package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor; import java.io.File; @@ -6,11 +18,13 @@ import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent; import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace; import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException; - -public abstract class TestParams { +/** + * This is the set up for the trace files to be used with the ctfAdaptor tests. + */ +abstract class TestParams { /* Path to test traces */ - private static final String testTracePath1 = "testfiles/trace20m"; //$NON-NLS-1$ + private static final String testTracePath1 = "../org.eclipse.linuxtools.ctf.core.tests/traces/kernel"; //$NON-NLS-1$ private static CtfTmfTrace testTrace1 = null; private static final File emptyFile = new File(""); //$NON-NLS-1$ @@ -24,8 +38,12 @@ public abstract class TestParams { return emptyTrace; } - public static CtfTmfTrace createTrace() throws TmfTraceException { - if ( testTrace1 == null ) { + public static String getPath(){ + return testTracePath1; + } + + public synchronized static CtfTmfTrace createTrace() throws TmfTraceException { + if (testTrace1 == null) { testTrace1 = new CtfTmfTrace(); testTrace1.initTrace(null, testTracePath1, CtfTmfEvent.class); }