Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-03-01 14:53:33 +0000
committerSteffen Pingel2012-03-01 14:53:33 +0000
commita567dbe79d21b026b69ba8c5b4bfc1f1105075ff (patch)
tree55fd83b8fa2ee144ce5ebcbeb422bbecba031552 /org.eclipse.mylyn.trac.tests/src/org
parent6e8d0239b455321e7f322d22bd76d620739ecd19 (diff)
downloadorg.eclipse.mylyn.tasks-a567dbe79d21b026b69ba8c5b4bfc1f1105075ff.tar.gz
org.eclipse.mylyn.tasks-a567dbe79d21b026b69ba8c5b4bfc1f1105075ff.tar.xz
org.eclipse.mylyn.tasks-a567dbe79d21b026b69ba8c5b4bfc1f1105075ff.zip
NEW - bug 372971: setup integration tests on slave7
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372971 Change-Id: Iebe46f4d3cff3eff0ab3fb76faf7e7c0e802bf2c
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org')
-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
2 files changed, 39 insertions, 28 deletions
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 646c2e038..90206e93f 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 dcd063b3e..1cb23227c 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);
+ }
}
}
}

Back to the top