Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oberlies2015-04-07 09:28:28 -0400
committerTobias Oberlies2015-04-09 07:58:35 -0400
commitc932d4f710195aa7e6464e274e1ee8b5e4419e73 (patch)
treeda9a27181c22163f1e6372b833a9f925abc7c576
parent95b6325a23c37bdcf6905502f35aec67bbbcbd59 (diff)
downloadorg.eclipse.tycho-c932d4f710195aa7e6464e274e1ee8b5e4419e73.tar.gz
org.eclipse.tycho-c932d4f710195aa7e6464e274e1ee8b5e4419e73.tar.xz
org.eclipse.tycho-c932d4f710195aa7e6464e274e1ee8b5e4419e73.zip
367701 Fix optional dependencies in test runtime IT; clean up related IT
- The integration test for bug 367701 was questionable: It contained some configuration for which the parameter name/location was changed, but the test was still green. I made the test more strict so that it is more likely to catch regressions. In fact it turns out that the fix for bug 367701 actually broke the "ignore optional dependencies in test runtime" feature that we had a long time ago. The request to re-implement this feature is in bug 464061. - Also: Revised other tests handling optional dependencies and did some small improvements. Bug: 367701 Bug: 464061 Change-Id: I4b33ce81f21da37bffcdf8584d751af5873b7dfd
-rw-r--r--tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/META-INF/MANIFEST.MF7
-rw-r--r--tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/META-INF/MANIFEST.MF2
-rw-r--r--tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/pom.xml4
-rw-r--r--tycho-its/projects/compiler.optionalDependencies/require-bundle/pom.xml1
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.ignore/META-INF/MANIFEST.MF (renamed from tycho-its/projects/351842_testOptionalDependencies/META-INF/MANIFEST.MF)2
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.ignore/build.properties (renamed from tycho-its/projects/351842_testOptionalDependencies/build.properties)0
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml (renamed from tycho-its/projects/351842_testOptionalDependencies/pom.xml)5
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.ignore/src/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java (renamed from tycho-its/projects/351842_testOptionalDependencies/src/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java)0
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/pom.xml)28
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/META-INF/MANIFEST.MF (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/META-INF/MANIFEST.MF)4
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/build.properties (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/build.properties)0
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/pom.xml (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/pom.xml)6
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/META-INF/MANIFEST.MF8
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/build.properties (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/build.properties)0
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/pom.xml (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/pom.xml)6
-rw-r--r--tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/src/test/optionalDependencies/OptionalDependenciesInTestRuntimeTest.java (renamed from tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/src/test/optionalDependencies/OptionalDependenciesInTestRuntimeTest.java)13
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/compiler/OptionalDependenciesTest.java (renamed from tycho-its/src/test/java/org/eclipse/tycho/test/compiler/optionalDependencies/OptionalDependenciesTest.java)18
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java (renamed from tycho-its/src/test/java/org/eclipse/tycho/test/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java)23
18 files changed, 63 insertions, 64 deletions
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/META-INF/MANIFEST.MF b/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/META-INF/MANIFEST.MF
deleted file mode 100644
index 10279846a..000000000
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: tod.testbundle
-Bundle-Version: 1.0.0.qualifier
-Require-Bundle: org.junit,
- tod.reactorbundle,
- org.eclipse.core.runtime
diff --git a/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/META-INF/MANIFEST.MF b/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/META-INF/MANIFEST.MF
index 1f286c77e..2e8d5cd06 100644
--- a/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/META-INF/MANIFEST.MF
+++ b/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/META-INF/MANIFEST.MF
@@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: 351842_optionalDependencies.require-bundle
Bundle-SymbolicName: cod.require-bundle-ignore;singleton:=true
Bundle-Version: 1.0.0
-Require-Bundle: org.eclipse.osgi;resolution:=optional
+Require-Bundle: org.eclipse.osgi;resolution:=optional;x-installation:=greedy
Bundle-ActivationPolicy: lazy
diff --git a/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/pom.xml b/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/pom.xml
index dbe5f133d..6fceb8951 100644
--- a/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/pom.xml
+++ b/tycho-its/projects/compiler.optionalDependencies/require-bundle-ignore/pom.xml
@@ -7,10 +7,6 @@
<version>1.0.0</version>
<packaging>eclipse-plugin</packaging>
- <properties>
- <tycho-version>0.14.0</tycho-version>
- </properties>
-
<build>
<plugins>
<plugin>
diff --git a/tycho-its/projects/compiler.optionalDependencies/require-bundle/pom.xml b/tycho-its/projects/compiler.optionalDependencies/require-bundle/pom.xml
index 69fb56c56..d3dc2f76a 100644
--- a/tycho-its/projects/compiler.optionalDependencies/require-bundle/pom.xml
+++ b/tycho-its/projects/compiler.optionalDependencies/require-bundle/pom.xml
@@ -8,7 +8,6 @@
<packaging>eclipse-plugin</packaging>
<properties>
- <tycho-version>0.14.0</tycho-version>
<e342-repo>http://download.eclipse.org/releases/ganymede</e342-repo>
</properties>
diff --git a/tycho-its/projects/351842_testOptionalDependencies/META-INF/MANIFEST.MF b/tycho-its/projects/surefire.optionalDependencies.ignore/META-INF/MANIFEST.MF
index 6fdaacbf1..d0ab4969b 100644
--- a/tycho-its/projects/351842_testOptionalDependencies/META-INF/MANIFEST.MF
+++ b/tycho-its/projects/surefire.optionalDependencies.ignore/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: 351842_testOptionalDependencies
+Bundle-SymbolicName: odi.testbundle
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.junit,
org.eclipse.core.runtime,
diff --git a/tycho-its/projects/351842_testOptionalDependencies/build.properties b/tycho-its/projects/surefire.optionalDependencies.ignore/build.properties
index 34d2e4d2d..34d2e4d2d 100644
--- a/tycho-its/projects/351842_testOptionalDependencies/build.properties
+++ b/tycho-its/projects/surefire.optionalDependencies.ignore/build.properties
diff --git a/tycho-its/projects/351842_testOptionalDependencies/pom.xml b/tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml
index fae4aec21..20a19f2a6 100644
--- a/tycho-its/projects/351842_testOptionalDependencies/pom.xml
+++ b/tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>tycho-its-project</groupId>
- <artifactId>351842_testOptionalDependencies</artifactId>
+ <groupId>tycho-its-project.optionalDependencies.ignore</groupId>
+ <artifactId>odi.testbundle</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
@@ -42,6 +42,7 @@
<!--
this bundle has mutually exclusive optional dependencies
on two versions of org.eclipse.equinox.frameworkadmin
+ -> disable them for dependency resolution and the test runtime
-->
<optionalDependencies>ignore</optionalDependencies>
</dependency-resolution>
diff --git a/tycho-its/projects/351842_testOptionalDependencies/src/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java b/tycho-its/projects/surefire.optionalDependencies.ignore/src/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java
index bd062c72a..bd062c72a 100644
--- a/tycho-its/projects/351842_testOptionalDependencies/src/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java
+++ b/tycho-its/projects/surefire.optionalDependencies.ignore/src/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/pom.xml b/tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml
index 64d15c3ba..dc18f7b81 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/pom.xml
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - Copyright (c) 2011 SAP AG and others.
+ - Copyright (c) 2011, 2015 SAP AG and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
@@ -13,24 +13,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>tycho-its-project.test.optionalDependencies</groupId>
- <artifactId>tod.parent</artifactId>
+ <groupId>tycho-its-project.surefire.optionalDependencies.reactor</groupId>
+ <artifactId>sodr.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <description>
- Project dependency resolution must not be affected by optionalDependencies configuration of other reactor
- projects.
-
- 'reactorbundle' has optional dependency on 'org.eclipse.equinox.frameworkadmin' bundle. Dependency resolution
- of 'reactorbundle' bundles treats 'org.eclipse.equinox.frameworkadmin' dependency as required (see bug 351842 [1]).
-
- 'testbundle' test bundle, which depends on 'reactorbundle' is not expected to have
- 'org.eclipse.equinox.frameworkadmin' as a dependency.
-
- [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=351842
- </description>
-
<properties>
<e342-repo>http://download.eclipse.org/eclipse/updates/3.4</e342-repo>
</properties>
@@ -58,10 +45,15 @@
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
+ <artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
- <optionalDependencies>ignore</optionalDependencies>
+ <dependency-resolution>
+ <!-- when computing the test runtime, disable the test bundle's optional dependencies,
+ but this must not be done for unrelated upstream reactor projects - see bug 367701 -->
+ <optionalDependencies>ignore</optionalDependencies>
+ <!-- remark: the configuration above is needed because the test runtime currently doesn't ignore optional dependencies by default - see bug 464061 -->
+ </dependency-resolution>
</configuration>
</plugin>
</plugins>
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/META-INF/MANIFEST.MF b/tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/META-INF/MANIFEST.MF
index 501705750..606a33bd1 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/META-INF/MANIFEST.MF
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: tod.reactorbundle
+Bundle-SymbolicName: sodr.reactorbundle
Bundle-Version: 1.0.0.qualifier
-Require-Bundle: org.eclipse.equinox.frameworkadmin;resolution:=optional
+Require-Bundle: org.eclipse.equinox.frameworkadmin;resolution:=optional;x-installation:=greedy
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/build.properties b/tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/build.properties
index 6404c0ccf..6404c0ccf 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/build.properties
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/build.properties
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/pom.xml b/tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/pom.xml
index 5de48dea8..912aaac1b 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/reactorbundle/pom.xml
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/reactorbundle/pom.xml
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>tycho-its-project.test.optionalDependencies</groupId>
- <artifactId>tod.parent</artifactId>
+ <groupId>tycho-its-project.surefire.optionalDependencies.reactor</groupId>
+ <artifactId>sodr.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
- <artifactId>tod.reactorbundle</artifactId>
+ <artifactId>sodr.reactorbundle</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/META-INF/MANIFEST.MF b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..8ecc4b9a6
--- /dev/null
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: sodr.testbundle
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.junit,
+ org.eclipse.core.runtime,
+ sodr.reactorbundle,
+ org.apache.ant;resolution:=optional;x-installation:=greedy
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/build.properties b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/build.properties
index 34d2e4d2d..34d2e4d2d 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/build.properties
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/build.properties
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/pom.xml b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/pom.xml
index 1d31bb9b1..7c869539a 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/pom.xml
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/pom.xml
@@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>tycho-its-project.test.optionalDependencies</groupId>
- <artifactId>tod.parent</artifactId>
+ <groupId>tycho-its-project.surefire.optionalDependencies.reactor</groupId>
+ <artifactId>sodr.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
- <artifactId>tod.testbundle</artifactId>
+ <artifactId>sodr.testbundle</artifactId>
<packaging>eclipse-test-plugin</packaging>
</project>
diff --git a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/src/test/optionalDependencies/OptionalDependenciesInTestRuntimeTest.java b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/src/test/optionalDependencies/OptionalDependenciesInTestRuntimeTest.java
index 4c09936d6..b1532d259 100644
--- a/tycho-its/projects/367701_reactorIndirectOptionalDependencies/testbundle/src/test/optionalDependencies/OptionalDependenciesInTestRuntimeTest.java
+++ b/tycho-its/projects/surefire.optionalDependencies.reactor/testbundle/src/test/optionalDependencies/OptionalDependenciesInTestRuntimeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 SAP AG and others.
+ * Copyright (c) 2011, 2015 SAP AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,8 +16,13 @@ import org.eclipse.core.runtime.Platform;
import junit.framework.TestCase;
public class OptionalDependenciesInTestRuntimeTest extends TestCase {
- public void testOptionalDependenciesAreNotInTestRuntime() throws Exception {
- // this test should run without the optional dependencies of our bundle under test
- assertNull(Platform.getBundle("org.eclipse.equinox.frameworkadmin"));
+
+ public void testOptionalDependenciesOfDependenciesAreInTestRuntime() throws Exception {
+ // optional dependencies of this test bundle are ignored...
+ assertNull(Platform.getBundle("org.apache.ant"));
+
+ // ... but the optional dependencies of other bundles (including reactor bundles) are unchanged -> see bug 367701
+ assertNotNull(Platform.getBundle("org.eclipse.equinox.frameworkadmin"));
}
+
}
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/optionalDependencies/OptionalDependenciesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/OptionalDependenciesTest.java
index 0cfc44144..e7dd6def4 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/optionalDependencies/OptionalDependenciesTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/OptionalDependenciesTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Sonatype Inc. and others.
+ * Copyright (c) 2008, 2015 Sonatype Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,29 +8,31 @@
* Contributors:
* Sonatype Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.tycho.test.compiler.optionalDependencies;
-
-import java.util.Arrays;
+package org.eclipse.tycho.test.compiler;
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;
+// tests that optional dependencies are put on the compile class path (bug 351842)
+@SuppressWarnings("unchecked")
public class OptionalDependenciesTest extends AbstractTychoIntegrationTest {
@Test
- public void requireBundle() throws Exception {
+ public void testOptionallyRequiredBundleIsOnCompileClassPath() throws Exception {
Verifier verifier = getVerifier("/compiler.optionalDependencies/require-bundle", false);
verifier.getCliOptions().add("-De342-repo=" + P2Repositories.ECLIPSE_342.toString());
- verifier.executeGoals(Arrays.asList("clean", "verify"));
+ verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();
}
@Test
- public void requireBundleIgnore() throws Exception {
+ public void testOptionallyRequiredBundleCanBeIgnored() throws Exception {
Verifier verifier = getVerifier("/compiler.optionalDependencies/require-bundle-ignore", false);
- verifier.executeGoals(Arrays.asList("clean", "verify"));
+ // empty target platform -> dependency would not resolve if the project had not overridden the optionalDependencies=require default
+ verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();
}
+
}
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java
index be15640a6..826c96881 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/bug351842_testOptionalDependencies/TestOptionalDependenciesTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Sonatype Inc. and others.
+ * Copyright (c) 2011, 2015 Sonatype Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,30 +8,33 @@
* Contributors:
* Sonatype Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.tycho.test.bug351842_testOptionalDependencies;
-
-import java.util.Arrays;
+package org.eclipse.tycho.test.surefire;
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil;
import org.junit.Test;
+@SuppressWarnings("unchecked")
public class TestOptionalDependenciesTest extends AbstractTychoIntegrationTest {
+
+ // tests that optional dependencies can be disabled in the test runtime in case they are conflicting (cf. bug 351842)
@Test
- public void test() throws Exception {
- Verifier verifier = getVerifier("/351842_testOptionalDependencies", false);
+ public void testIgnoreMutuallyExclusiveOptionalDependenciesForTestRuntimeComputation() throws Exception {
+ Verifier verifier = getVerifier("/surefire.optionalDependencies.ignore", false);
verifier.getCliOptions().add("-De342-repo=" + ResourceUtil.P2Repositories.ECLIPSE_342.toString());
verifier.getCliOptions().add("-De352-repo=" + ResourceUtil.P2Repositories.ECLIPSE_352.toString());
- verifier.executeGoals(Arrays.asList("clean", "verify"));
+ verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();
- }
+ } // see also OptionalDependenciesTest.testOptionallyRequiredBundleCanBeIgnored()
+ // tests that optionalDependencies configuration only affects the current project (bug 367701)
@Test
public void reactorIndirectOptionalDependencies() throws Exception {
- Verifier verifier = getVerifier("/367701_reactorIndirectOptionalDependencies", false);
+ Verifier verifier = getVerifier("/surefire.optionalDependencies.reactor", false);
verifier.getCliOptions().add("-De342-repo=" + ResourceUtil.P2Repositories.ECLIPSE_342.toString());
- verifier.executeGoals(Arrays.asList("clean", "verify"));
+ verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();
}
+
}

Back to the top