summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorBernd Hufmann2012-12-10 11:36:03 (EST)
committer Bernd Hufmann2012-12-10 12:42:34 (EST)
commit263ddc2ca53417ef0bf529626b765177edd1eac9 (patch)
tree0e6fa6d79f3ca3419f7450f83a4ed342a26ed871
parent1ce86ae2988aaa36bf77613a72486b6184eaca56 (diff)
downloadorg.eclipse.linuxtools-263ddc2ca53417ef0bf529626b765177edd1eac9.zip
org.eclipse.linuxtools-263ddc2ca53417ef0bf529626b765177edd1eac9.tar.gz
org.eclipse.linuxtools-263ddc2ca53417ef0bf529626b765177edd1eac9.tar.bz2
Include CTF and Kernel state system JUnit tests to maven buildrefs/changes/45/9145/3
Change-Id: I3429e28f98606031c9238adf699a3a839ef1c2be Reviewed-on: https://git.eclipse.org/r/9145 Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Tested-by: Hudson CI Reviewed-by: Bernd Hufmann <bhufmann@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF4
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/build.properties3
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/pom.xml41
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore1
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF2
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml5
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java26
-rw-r--r--lttng/pom.xml4
8 files changed, 60 insertions, 26 deletions
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF
index 6c8b9b8..c80f37e 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF
+++ b/lttng/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/lttng/org.eclipse.linuxtools.ctf.core.tests/build.properties b/lttng/org.eclipse.linuxtools.ctf.core.tests/build.properties
index 493432f..2f13e4b 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/build.properties
+++ b/lttng/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/lttng/org.eclipse.linuxtools.ctf.core.tests/pom.xml b/lttng/org.eclipse.linuxtools.ctf.core.tests/pom.xml
index 29a681d..a67ccc5 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/pom.xml
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/pom.xml
@@ -37,12 +37,49 @@
</resources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>prepare</id>
+ <phase>validate</phase>
+ <configuration>
+ <tasks>
+ <echo message="prepare phase" />
+ <!-- Download traces -->
+ <get src="http://lttng.org/files/samples/sample-ctf-trace-20120412.tar.bz2" dest="traces/sample-ctf-trace-20120412.tar.bz2"/>
+ <get src="http://www.dorsal.polymtl.ca/~alexmont/data/trace2.tar.bz2" dest="traces/trace2.tar.bz2"/>
+
+ <!-- Unzip Traces -->
+ <bunzip2 src="traces/sample-ctf-trace-20120412.tar.bz2" dest="traces/" />
+ <bunzip2 src="traces/trace2.tar.bz2" dest="traces/" />
+
+ <!-- Extract traces -->
+ <untar src="traces/sample-ctf-trace-20120412.tar" dest="traces/" />
+ <untar src="traces/trace2.tar" dest="traces/" />
+
+ <!-- Delete unnecessary files -->
+ <delete>
+ <fileset dir="traces" includes="**/*.tar.bz2"/>
+ <fileset dir="traces" includes="**/*.tar"/>
+ </delete>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
- <testSuite>org.eclipse.linuxtools.ctf.core.tests</testSuite>
- <testClass>org.eclipse.linuxtools.ctf.core.tests.AllCtfCoreTests</testClass>
+ <includes>
+ <include>**/AllCtfCoreTests.*</include>
+ </includes>
<useUIHarness>false</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.sdk.ide</product>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore b/lttng/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore
index d5f79d5..d26f46e 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/traces/.gitignore
@@ -1,4 +1,5 @@
*.bz2
+*.tar
/kernel
/trace2
*.ht
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF
index b28f75e..05378e8 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF
+++ b/lttng/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/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml
index ccdf36e..dea88f1 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/pom.xml
@@ -58,8 +58,9 @@
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
- <testSuite>org.eclipse.linuxtools.lttng2.kernel.core.tests</testSuite>
- <testClass>org.eclipse.linuxtools.lttng2.kernel.core.tests.AllTests</testClass>
+ <includes>
+ <include>**/AllTests.*</include>
+ </includes>
<useUIHarness>false</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.sdk.ide</product>
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java
index e34a813..cf6c55c 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/AllTests.java
+++ b/lttng/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;
/**
* <b><u>AllTests</u></b>
* <p>
*/
-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/lttng/pom.xml b/lttng/pom.xml
index c4f60b7..6094dc3 100644
--- a/lttng/pom.xml
+++ b/lttng/pom.xml
@@ -81,7 +81,7 @@
<modules>
<module>org.eclipse.linuxtools.ctf</module>
<module>org.eclipse.linuxtools.ctf.core</module>
- <!-- <module>org.eclipse.linuxtools.ctf.core.tests</module> -->
+ <module>org.eclipse.linuxtools.ctf.core.tests</module>
<module>org.eclipse.linuxtools.ctf.parser</module>
<module>org.eclipse.linuxtools.tmf</module>
@@ -94,7 +94,7 @@
<module>org.eclipse.linuxtools.lttng2</module>
<module>org.eclipse.linuxtools.lttng2.core</module>
- <!-- module>org.eclipse.linuxtools.lttng2.core.tests</module> activated by the lttngTests package -->
+ <module>org.eclipse.linuxtools.lttng2.core.tests</module>
<module>org.eclipse.linuxtools.lttng2.ui</module>
<module>org.eclipse.linuxtools.lttng2.ui.tests</module>