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.bugzilla.tests
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.bugzilla.tests')
-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
3 files changed, 46 insertions, 35 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/pom.xml b/org.eclipse.mylyn.bugzilla.tests/pom.xml
index 9dcf62445..5a3ea9799 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 7d9882b59..4442543db 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 a5583f6dd..c195f2519 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);
+ }
}
}
}

Back to the top