ctf: fix CTF-testsuite to only test traces and not scripts
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 27 Nov 2013 20:20:25 +0000 (15:20 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 27 Nov 2013 21:14:38 +0000 (16:14 -0500)
Change-Id: I7575b2cbe1eae5bc9019496515c081d51f5a6bdd
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19011
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/ctftestsuite/CtfTestSuiteTests.java

index c99aa335fcfca1482639fcbc6f0d5c0f3bce1502..abaecf48746be68743e242a94f8f8fd0e7414c38 100644 (file)
@@ -31,7 +31,8 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 /**
- * Parametrized test class running the CTF Test Suite
+ * Parameterized test class running the CTF Test Suite
+ *
  * (from https://github.com/efficios/ctf-testsuite).
  *
  * @author Alexandre Montplaisir
@@ -41,7 +42,7 @@ public class CtfTestSuiteTests {
 
     /** Time-out tests after 10 seconds. */
     @Rule
-    public TestRule globalTimeout= new Timeout(10000);
+    public TestRule globalTimeout = new Timeout(10000);
 
     private static final String basePath = "traces/ctf-testsuite/tests/1.8/";
 
@@ -85,8 +86,10 @@ public class CtfTestSuiteTests {
             return;
         }
         for (File traceDir : traceDirs) {
-            Object array[] = new Object[] { traceDir.getPath(), expectSuccess };
-            dirs.add(array);
+            if (traceDir.isDirectory()) {
+                Object array[] = new Object[] { traceDir.getPath(), expectSuccess };
+                dirs.add(array);
+            }
         }
     }
 
@@ -134,7 +137,8 @@ public class CtfTestSuiteTests {
             }
         } catch (CTFReaderException e) {
             if (fExpectSuccess) {
-                fail("Trace was expected to succeed, but failed parsing: " + fTracePath);
+                fail("Trace was expected to succeed, but failed parsing: " +
+                        fTracePath + " (" + e.getMessage() + ")");
             }
         } finally {
             if (reader != null) {
This page took 0.029039 seconds and 5 git commands to generate.