Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2014-06-02 11:04:20 -0400
committerMarc-Andre Laperle2014-06-02 13:05:38 -0400
commitab400030e016864cb5fc807632fbec49aab4a6ca (patch)
tree5c4c64b8585dd535549a60797930bce3a3f4a8bc
parentcd28bf4c4b4a544a7d76cbcf6b2063257afe07bc (diff)
downloadorg.eclipse.linuxtools-ab400030e016864cb5fc807632fbec49aab4a6ca.tar.gz
org.eclipse.linuxtools-ab400030e016864cb5fc807632fbec49aab4a6ca.tar.xz
org.eclipse.linuxtools-ab400030e016864cb5fc807632fbec49aab4a6ca.zip
Fix errors when missing test traces
Fix some assumeTrue and temporarily ignore some tests that are buggy with assumeTrue Change-Id: I683f57d5c5039ec1641f8fa731260c25bbae80a5 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewed-on: https://git.eclipse.org/r/27733 Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/analysis/LttngKernelAnalysisTest.java10
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/ExperimentSyncTest.java13
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/PartialStateSystemTest.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemInMemoryTest.java2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderFastTest.java11
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderTest.java11
7 files changed, 47 insertions, 4 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/analysis/LttngKernelAnalysisTest.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/analysis/LttngKernelAnalysisTest.java
index d49c8e8da1..332596dd29 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/analysis/LttngKernelAnalysisTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/analysis/LttngKernelAnalysisTest.java
@@ -35,6 +35,7 @@ import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
import org.junit.After;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import com.google.common.collect.ImmutableSet;
@@ -50,12 +51,19 @@ public class LttngKernelAnalysisTest {
private LttngKernelAnalysisModule fKernelAnalysisModule;
/**
+ * Class setup
+ */
+ @BeforeClass
+ public static void initialize() {
+ assumeTrue(CtfTmfTestTrace.KERNEL.exists());
+ }
+
+ /**
* Set-up the test
*/
@Before
public void setUp() {
fKernelAnalysisModule = new LttngKernelAnalysisModule();
- assumeTrue(CtfTmfTestTrace.KERNEL.exists());
fTrace = CtfTmfTestTrace.KERNEL.getTrace();
}
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/ExperimentSyncTest.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/ExperimentSyncTest.java
index 11af64a399..d178c62c3b 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/ExperimentSyncTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/ExperimentSyncTest.java
@@ -29,6 +29,7 @@ import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
import org.junit.After;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -46,13 +47,19 @@ public class ExperimentSyncTest {
private static TmfExperiment fExperiment;
/**
- * Setup the traces and experiment
+ * Class setup
*/
- @Before
- public void setUp() {
+ @BeforeClass
+ public static void initialize() {
assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
+ }
+ /**
+ * Setup the traces and experiment
+ */
+ @Before
+ public void setUp() {
fTraces = new CtfTmfTrace[2];
fTraces[0] = CtfTmfTestTrace.SYNC_SRC.getTrace();
fTraces[1] = CtfTmfTestTrace.SYNC_DEST.getTrace();
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/PartialStateSystemTest.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/PartialStateSystemTest.java
index 50fcf6ca91..9e2da43553 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/PartialStateSystemTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/PartialStateSystemTest.java
@@ -32,6 +32,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -39,6 +40,7 @@ import org.junit.Test;
*
* @author Alexandre Montplaisir
*/
+@Ignore
public class PartialStateSystemTest extends StateSystemTest {
private static final @NonNull String TEST_FILE_NAME = "test-partial";
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
index b9801240b4..1c1ceb1256 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
@@ -34,6 +34,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -42,6 +43,7 @@ import org.junit.Test;
*
* @author Alexandre Montplaisir
*/
+@Ignore
public class StateSystemFullHistoryTest extends StateSystemTest {
private static final @NonNull String TEST_FILE_NAME = "test.ht";
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemInMemoryTest.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemInMemoryTest.java
index 8cb40fbaf7..087ec7f94b 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemInMemoryTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemInMemoryTest.java
@@ -26,12 +26,14 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.Ignore;
/**
* State system tests using the in-memory back-end.
*
* @author Alexandre Montplaisir
*/
+@Ignore
public class StateSystemInMemoryTest extends StateSystemTest {
private static TestLttngKernelAnalysisModule module;
diff --git a/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderFastTest.java b/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderFastTest.java
index 8f45e00f24..8b64be217e 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderFastTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderFastTest.java
@@ -12,7 +12,10 @@
package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
+import static org.junit.Assume.assumeTrue;
+
import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
/**
* Test suite for the UST callstack state provider, using the trace of a program
@@ -27,6 +30,14 @@ public class LttngUstCallStackProviderFastTest extends AbstractProviderTest {
1379361250498400000L,
1379361250499759000L };
+ /**
+ * Class setup
+ */
+ @BeforeClass
+ public static void initialize() {
+ assumeTrue(CtfTmfTestTrace.CYG_PROFILE_FAST.exists());
+ }
+
@Override
protected CtfTmfTestTrace getTestTrace() {
return CtfTmfTestTrace.CYG_PROFILE_FAST;
diff --git a/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderTest.java b/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderTest.java
index cbfa1198da..c8e3c9c293 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderTest.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/LttngUstCallStackProviderTest.java
@@ -12,7 +12,10 @@
package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
+import static org.junit.Assume.assumeTrue;
+
import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
/**
* Test suite for the UST callstack state provider, using the trace of a program
@@ -26,6 +29,14 @@ public class LttngUstCallStackProviderTest extends AbstractProviderTest {
1378850463770000000L,
1378850463868753000L };
+ /**
+ * Class setup
+ */
+ @BeforeClass
+ public static void initialize() {
+ assumeTrue(CtfTmfTestTrace.CYG_PROFILE.exists());
+ }
+
@Override
protected CtfTmfTestTrace getTestTrace() {
return CtfTmfTestTrace.CYG_PROFILE;

Back to the top