summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-03-01 09:53:33 (EST)
committer Steffen Pingel2012-03-01 09:53:33 (EST)
commita567dbe79d21b026b69ba8c5b4bfc1f1105075ff (patch)
tree55fd83b8fa2ee144ce5ebcbeb422bbecba031552
parent6e8d0239b455321e7f322d22bd76d620739ecd19 (diff)
downloadorg.eclipse.mylyn.tasks-a567dbe79d21b026b69ba8c5b4bfc1f1105075ff.zip
org.eclipse.mylyn.tasks-a567dbe79d21b026b69ba8c5b4bfc1f1105075ff.tar.gz
org.eclipse.mylyn.tasks-a567dbe79d21b026b69ba8c5b4bfc1f1105075ff.tar.bz2
NEW - bug 372971: setup integration tests on slave7
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372971 Change-Id: Iebe46f4d3cff3eff0ab3fb76faf7e7c0e802bf2c
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/pom.xml31
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java19
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java31
-rw-r--r--org.eclipse.mylyn.tasks.index.tests/pom.xml12
-rw-r--r--org.eclipse.mylyn.tasks.tests/pom.xml23
-rw-r--r--org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/pom.xml23
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java36
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java31
9 files changed, 119 insertions, 91 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/pom.xml b/org.eclipse.mylyn.bugzilla.tests/pom.xml
index 9dcf624..5a3ea97 100644
--- a/org.eclipse.mylyn.bugzilla.tests/pom.xml
+++ b/org.eclipse.mylyn.bugzilla.tests/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.mylyn.tasks-parent</artifactId>
@@ -12,28 +12,29 @@
<version>3.7.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
- <test.suite>${project.artifactId}.AllBugzillaTests</test.suite>
+ <test.suite>${project.artifactId}.AllBugzillaTests</test.suite>
</properties>
<build>
- <!-- resources for standalone tests -->
+ <!-- resources for standalone tests -->
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>testdata/**</include>
- </includes>
- </resource>
- </resources>
+ </includes>
+ </resource>
+ </resources>
<plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>${project.artifactId}</testSuite>
- <testClass>${test.suite}</testClass>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <skip>${test.component.skip}</skip>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>${test.suite}</testClass>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java
index 7d9882b..4442543 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaHeadlessStandaloneTests.java
@@ -24,6 +24,7 @@ import org.eclipse.mylyn.bugzilla.tests.core.BugzillaRepositoryConnectorStandalo
import org.eclipse.mylyn.bugzilla.tests.core.BugzillaTaskCompletionTest;
import org.eclipse.mylyn.bugzilla.tests.core.BugzillaVersionTest;
import org.eclipse.mylyn.bugzilla.tests.support.BugzillaFixture;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion;
/**
@@ -34,21 +35,23 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaVersion;
public class AllBugzillaHeadlessStandaloneTests {
public static Test suite() {
- return suite(false);
+ return suite(false, CommonTestUtil.runHeartbeatTestsOnly());
}
- public static Test suite(boolean defaultOnly) {
+ public static Test suite(boolean localOnly, boolean defaultOnly) {
TestSuite suite = new TestSuite(AllBugzillaHeadlessStandaloneTests.class.getName());
// tests that only need to run once (i.e. no network i/o so doesn't matter which repository)
suite.addTestSuite(BugzillaConfigurationTest.class);
suite.addTestSuite(BugzillaVersionTest.class);
suite.addTestSuite(BugzillaTaskCompletionTest.class);
- // tests that run against all repository versions
- if (defaultOnly) {
- addTests(suite, BugzillaFixture.DEFAULT);
- } else {
- for (BugzillaFixture fixture : BugzillaFixture.ALL) {
- addTests(suite, fixture);
+ if (!localOnly) {
+ // tests that run against all repository versions
+ if (defaultOnly) {
+ addTests(suite, BugzillaFixture.DEFAULT);
+ } else {
+ for (BugzillaFixture fixture : BugzillaFixture.ALL) {
+ addTests(suite, fixture);
+ }
}
}
return suite;
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
index a5583f6..c195f25 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
@@ -22,8 +22,8 @@ import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaRepositorySettingsPageTest;
import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaSearchPageTest;
import org.eclipse.mylyn.bugzilla.tests.ui.BugzillaTaskHyperlinkDetectorTest;
import org.eclipse.mylyn.bugzilla.tests.ui.TaskEditorTest;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.commons.sdk.util.ManagedTestSuite;
-import org.eclipse.mylyn.tests.util.TestUtil;
/**
* @author Mik Kersten
@@ -34,19 +34,25 @@ public class AllBugzillaTests {
public static Test suite() {
TestSuite suite = new ManagedTestSuite(AllBugzillaTests.class.getName());
- addTests(TestUtil.runHeartbeatTestsOnly(), suite);
+ addTests(false, CommonTestUtil.runHeartbeatTestsOnly(), suite);
return suite;
}
public static Test suite(boolean defaultOnly) {
TestSuite suite = new TestSuite(AllBugzillaTests.class.getName());
- addTests(defaultOnly, suite);
+ addTests(false, defaultOnly, suite);
return suite;
}
- private static void addTests(boolean defaultOnly, TestSuite suite) {
+ public static Test localSuite() {
+ TestSuite suite = new TestSuite(AllBugzillaTests.class.getName());
+ addTests(true, CommonTestUtil.runHeartbeatTestsOnly(), suite);
+ return suite;
+ }
+
+ private static void addTests(boolean localOnly, boolean defaultOnly, TestSuite suite) {
// Standalone tests (Don't require an instance of Eclipse)
- suite.addTest(AllBugzillaHeadlessStandaloneTests.suite(defaultOnly));
+ suite.addTest(AllBugzillaHeadlessStandaloneTests.suite(localOnly, defaultOnly));
// Tests that only need to run once (i.e. no network io so doesn't matter which repository)
suite.addTestSuite(TaskEditorTest.class);
@@ -56,13 +62,14 @@ public class AllBugzillaTests {
suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
suite.addTestSuite(BugzillaHyperlinkDetectorTest.class);
- // Each of these tests gets executed against every repo in BugzillaFixture.ALL
- // unless otherwise excluded
- if (defaultOnly) {
- addTests(suite, BugzillaFixture.DEFAULT);
- } else {
- for (BugzillaFixture fixture : BugzillaFixture.ALL) {
- addTests(suite, fixture);
+ // network tests
+ if (!localOnly) {
+ if (defaultOnly) {
+ addTests(suite, BugzillaFixture.DEFAULT);
+ } else {
+ for (BugzillaFixture fixture : BugzillaFixture.ALL) {
+ addTests(suite, fixture);
+ }
}
}
}
diff --git a/org.eclipse.mylyn.tasks.index.tests/pom.xml b/org.eclipse.mylyn.tasks.index.tests/pom.xml
index fe598dd..be1608b 100644
--- a/org.eclipse.mylyn.tasks.index.tests/pom.xml
+++ b/org.eclipse.mylyn.tasks.index.tests/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.mylyn.tasks-parent</artifactId>
@@ -13,11 +13,11 @@
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
diff --git a/org.eclipse.mylyn.tasks.tests/pom.xml b/org.eclipse.mylyn.tasks.tests/pom.xml
index 6202262..664dc35 100644
--- a/org.eclipse.mylyn.tasks.tests/pom.xml
+++ b/org.eclipse.mylyn.tasks.tests/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.mylyn.tasks-parent</artifactId>
@@ -12,19 +12,20 @@
<version>3.7.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
- <test.suite>${project.artifactId}.AllTasksTests</test.suite>
+ <test.suite>${project.artifactId}.AllTasksTests</test.suite>
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>${project.artifactId}</testSuite>
- <testClass>${test.suite}</testClass>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <skip>${test.component.skip}</skip>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>${test.suite}</testClass>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
diff --git a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java
index 54ae16b..9150159 100644
--- a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java
+++ b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java
@@ -134,6 +134,10 @@ public class TestUtil {
return CommonTestUtil.getFile(source, filename);
}
+ /**
+ * @deprecated use {org.eclipse.mylyn.commons.sdk.util.CommonTestUtil#runHeartbeatTestsOnly()} instead
+ */
+ @Deprecated
public static boolean runHeartbeatTestsOnly() {
return !Boolean.parseBoolean(System.getProperty("org.eclipse.mylyn.tests.all"));
}
diff --git a/org.eclipse.mylyn.trac.tests/pom.xml b/org.eclipse.mylyn.trac.tests/pom.xml
index a941824..1365706 100644
--- a/org.eclipse.mylyn.trac.tests/pom.xml
+++ b/org.eclipse.mylyn.trac.tests/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>org.eclipse.mylyn.tasks-parent</artifactId>
@@ -12,19 +12,20 @@
<version>3.7.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
- <test.suite>${project.artifactId}.AllTracTests</test.suite>
+ <test.suite>${project.artifactId}.AllTracTests</test.suite>
</properties>
<build>
<plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>${project.artifactId}</testSuite>
- <testClass>${test.suite}</testClass>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <skip>${test.component.skip}</skip>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>${test.suite}</testClass>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
index 646c2e0..90206e9 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
@@ -14,8 +14,8 @@ package org.eclipse.mylyn.trac.tests;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
-import org.eclipse.mylyn.tests.util.TestUtil;
import org.eclipse.mylyn.trac.tests.client.TracClientFactoryTest;
import org.eclipse.mylyn.trac.tests.client.TracClientProxyTest;
import org.eclipse.mylyn.trac.tests.client.TracClientTest;
@@ -32,11 +32,11 @@ import org.eclipse.mylyn.trac.tests.support.TracFixture;
public class AllTracHeadlessStandaloneTests {
public static Test suite() {
- return suite(TestUtil.runHeartbeatTestsOnly());
+ return suite(false, CommonTestUtil.runHeartbeatTestsOnly());
}
- public static Test suite(boolean defaultOnly) {
- TestSuite suite = new TestSuite("Headless Standalone Tests for org.eclipse.mylyn.trac.tests");
+ public static Test suite(boolean localOnly, boolean defaultOnly) {
+ TestSuite suite = new TestSuite(AllTracHeadlessStandaloneTests.class.getName());
// client tests
suite.addTestSuite(TracSearchTest.class);
suite.addTestSuite(TracTicketTest.class);
@@ -44,19 +44,21 @@ public class AllTracHeadlessStandaloneTests {
suite.addTestSuite(TracClientProxyTest.class);
// core tests
suite.addTestSuite(TracClientManagerTest.class);
- if (defaultOnly) {
- addTests(suite, TracFixture.DEFAULT);
- } else {
- // network tests
- for (TracFixture fixture : TracFixture.ALL) {
- addTests(suite, fixture);
- }
- // validation tests
- for (TracFixture fixture : TracFixture.MISC) {
- fixture.createSuite(suite);
- fixture.add(TracClientFactoryTest.class);
- fixture.add(TracClientTest.class);
- fixture.done();
+ // network tests
+ if (!localOnly) {
+ if (defaultOnly) {
+ addTests(suite, TracFixture.DEFAULT);
+ } else {
+ for (TracFixture fixture : TracFixture.ALL) {
+ addTests(suite, fixture);
+ }
+ // validation tests
+ for (TracFixture fixture : TracFixture.MISC) {
+ fixture.createSuite(suite);
+ fixture.add(TracClientFactoryTest.class);
+ fixture.add(TracClientTest.class);
+ fixture.done();
+ }
}
}
return suite;
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
index dcd063b..1cb2322 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
@@ -14,9 +14,9 @@ package org.eclipse.mylyn.trac.tests;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.commons.sdk.util.ManagedTestSuite;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
-import org.eclipse.mylyn.tests.util.TestUtil;
import org.eclipse.mylyn.trac.tests.core.TracAttachmentHandlerTest;
import org.eclipse.mylyn.trac.tests.core.TracRepositoryConnectorTest;
import org.eclipse.mylyn.trac.tests.core.TracRepositoryConnectorWebTest;
@@ -35,29 +35,38 @@ public class AllTracTests {
public static Test suite() {
TestSuite suite = new ManagedTestSuite(AllTracTests.class.getName());
- addTests(TestUtil.runHeartbeatTestsOnly(), suite);
+ addTests(false, CommonTestUtil.runHeartbeatTestsOnly(), suite);
return suite;
}
public static Test suite(boolean defaultOnly) {
TestSuite suite = new TestSuite(AllTracTests.class.getName());
- addTests(defaultOnly, suite);
+ addTests(false, defaultOnly, suite);
return suite;
}
- private static void addTests(boolean defaultOnly, TestSuite suite) {
- suite.addTest(AllTracHeadlessStandaloneTests.suite(defaultOnly));
+ public static Test localSuite() {
+ TestSuite suite = new TestSuite(AllTracTests.class.getName());
+ addTests(true, CommonTestUtil.runHeartbeatTestsOnly(), suite);
+ return suite;
+ }
+
+ private static void addTests(boolean localOnly, boolean defaultOnly, TestSuite suite) {
+ suite.addTest(AllTracHeadlessStandaloneTests.suite(localOnly, defaultOnly));
suite.addTestSuite(TracUtilTest.class);
suite.addTestSuite(TracRepositoryQueryTest.class);
// XXX fails when run from continuous build: suite.addTestSuite(TracTaskEditorTest.class);
suite.addTestSuite(TracRepositorySettingsPageTest.class);
suite.addTestSuite(TracHyperlinkUtilTest.class);
- // network tests
- if (defaultOnly) {
- addTests(suite, TracFixture.DEFAULT);
- } else {
- for (TracFixture fixture : TracFixture.ALL) {
- addTests(suite, fixture);
+
+ if (!localOnly) {
+ // network tests
+ if (defaultOnly) {
+ addTests(suite, TracFixture.DEFAULT);
+ } else {
+ for (TracFixture fixture : TracFixture.ALL) {
+ addTests(suite, fixture);
+ }
}
}
}