ctf: Fix skipping ctf.core.tests when traces are unavailable
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Sat, 6 Sep 2014 01:06:43 +0000 (21:06 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Sat, 6 Sep 2014 05:26:54 +0000 (01:26 -0400)
Change-Id: I3fd1ddd2f08af03827f227533e86ce200884f286
Reviewed-on: https://git.eclipse.org/r/32963
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFStreamTest.java

index 62bcf11b47449b02e6eadc475b0182c2b660651a..b4012494f241162ea12c602d7ea39b9bfe9139e9 100644 (file)
@@ -32,6 +32,7 @@ import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
 import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
@@ -50,6 +51,11 @@ public class CTFStreamTest {
 
     private CTFStreamInput fInput;
 
+    @BeforeClass
+    public static void initialize() {
+        assumeTrue(testTrace.exists());
+    }
+
     /**
      * Perform pre-test initialization.
      *
@@ -57,7 +63,6 @@ public class CTFStreamTest {
      */
     @Before
     public void setUp() throws CTFReaderException {
-        assumeTrue(testTrace.exists());
         fixture = new CTFStream(testTrace.getTrace());
         fixture.setEventContext(new StructDeclaration(1L));
         fixture.setPacketContext(new StructDeclaration(1L));
This page took 0.025733 seconds and 5 git commands to generate.