From 7ada0d7a855e7e2d21d1ffdcb8c00f01697ba25d Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Mon, 10 Dec 2012 11:36:03 -0500 Subject: [PATCH] Include CTF and Kernel state system JUnit tests to maven build Change-Id: I3429e28f98606031c9238adf699a3a839ef1c2be Reviewed-on: https://git.eclipse.org/r/9145 Reviewed-by: Alexandre Montplaisir IP-Clean: Alexandre Montplaisir Tested-by: Hudson CI Reviewed-by: Bernd Hufmann --- .../META-INF/MANIFEST.MF | 4 +- .../build.properties | 3 ++ org.eclipse.linuxtools.ctf.core.tests/pom.xml | 41 ++++++++++++++++++- .../traces/.gitignore | 1 + .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 5 ++- .../lttng2/kernel/core/tests/AllTests.java | 26 ++++-------- pom.xml | 4 +- 8 files changed, 60 insertions(+), 26 deletions(-) diff --git a/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF index 6c8b9b87c2..c80f37eba9 100644 --- a/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF @@ -6,5 +6,7 @@ Bundle-Version: 1.0.0.qualifier Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.linuxtools.ctf.core.tests Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Fragment-Host: org.eclipse.linuxtools.ctf.core Require-Bundle: org.junit4 +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Fragment-Host: org.eclipse.linuxtools.ctf.core diff --git a/org.eclipse.linuxtools.ctf.core.tests/build.properties b/org.eclipse.linuxtools.ctf.core.tests/build.properties index 493432fbf2..2f13e4bbaa 100644 --- a/org.eclipse.linuxtools.ctf.core.tests/build.properties +++ b/org.eclipse.linuxtools.ctf.core.tests/build.properties @@ -1,3 +1,6 @@ +source.. = src/ +output.. = bin/ bin.includes = META-INF/,\ + .,\ plugin.properties,\ traces/ diff --git a/org.eclipse.linuxtools.ctf.core.tests/pom.xml b/org.eclipse.linuxtools.ctf.core.tests/pom.xml index 29a681db9e..a67ccc5fd2 100644 --- a/org.eclipse.linuxtools.ctf.core.tests/pom.xml +++ b/org.eclipse.linuxtools.ctf.core.tests/pom.xml @@ -36,13 +36,50 @@ + + org.apache.maven.plugins + maven-antrun-plugin + 1.2 + + + prepare + validate + + + + + + + + + + + + + + + + + + + + + + + + run + + + + org.eclipse.tycho tycho-surefire-plugin ${tycho-version} - org.eclipse.linuxtools.ctf.core.tests - org.eclipse.linuxtools.ctf.core.tests.AllCtfCoreTests + + **/AllCtfCoreTests.* + false false org.eclipse.sdk.ide diff --git a/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore b/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore index d5f79d55d4..d26f46e481 100644 --- a/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore +++ b/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore @@ -1,4 +1,5 @@ *.bz2 +*.tar /kernel /trace2 *.ht diff --git a/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF index b28f75e3b4..05378e864d 100644 --- a/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF @@ -8,5 +8,5 @@ Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.core.tests Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Fragment-Host: org.eclipse.linuxtools.lttng2.kernel.core -Require-Bundle: org.junit, +Require-Bundle: org.junit4, org.eclipse.linuxtools.tmf.core;bundle-version="2.0.0" diff --git a/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml b/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml index ccdf36e1a3..dea88f1777 100644 --- a/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml +++ b/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml @@ -58,8 +58,9 @@ tycho-surefire-plugin ${tycho-version} - org.eclipse.linuxtools.lttng2.kernel.core.tests - org.eclipse.linuxtools.lttng2.kernel.core.tests.AllTests + + **/AllTests.* + false false org.eclipse.sdk.ide diff --git a/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java b/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java index e34a813f71..cf6c55cf03 100644 --- a/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java +++ b/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java @@ -12,26 +12,16 @@ package org.eclipse.linuxtools.lttng2.kernel.core.tests; -import junit.framework.Test; -import junit.framework.TestSuite; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; /** * AllTests *

*/ -public class AllTests { - - /** - * @return The test suite - */ - public static Test suite() { - TestSuite suite = new TestSuite(AllTests.class.getName()); - // $JUnit-BEGIN$ - - // Plug-in - suite.addTestSuite(ActivatorTest.class); - - // $JUnit-END$ - return suite; - } -} +@RunWith(Suite.class) +@Suite.SuiteClasses({ ActivatorTest.class, + org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider.CtfKernelStateInputTest.class, + org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider.StateSystemFullHistoryTest.class +}) +public class AllTests { } diff --git a/pom.xml b/pom.xml index c4f60b77d7..6094dc369b 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ org.eclipse.linuxtools.ctf org.eclipse.linuxtools.ctf.core - + org.eclipse.linuxtools.ctf.core.tests org.eclipse.linuxtools.ctf.parser org.eclipse.linuxtools.tmf @@ -94,7 +94,7 @@ org.eclipse.linuxtools.lttng2 org.eclipse.linuxtools.lttng2.core - + org.eclipse.linuxtools.lttng2.core.tests org.eclipse.linuxtools.lttng2.ui org.eclipse.linuxtools.lttng2.ui.tests -- 2.34.1