forked from eclipse-tycho/tycho
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integration test for eclipse-tycho#1660: same target resolved multipl…
…e times
- Loading branch information
1 parent
9362ef8
commit 2abbf27
Showing
9 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
tycho-its/projects/sameAbsoluteTarget/bundle1/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: bundle | ||
Bundle-SymbolicName: bundle | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 | ||
Automatic-Module-Name: bundle | ||
Require-Bundle: org.apache.commons.lang3 |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/sameAbsoluteTarget/bundle1/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source.. = src/ | ||
bin.includes = META-INF/,\ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>tycho-its-project</groupId> | ||
<artifactId>sameAbsoluteTarget</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>bundle</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>eclipse-plugin</packaging> | ||
</project> |
8 changes: 8 additions & 0 deletions
8
tycho-its/projects/sameAbsoluteTarget/bundle2/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: bundle2 | ||
Bundle-SymbolicName: bundle2 | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 | ||
Automatic-Module-Name: bundle2 | ||
Require-Bundle: org.apache.commons.lang3 |
3 changes: 3 additions & 0 deletions
3
tycho-its/projects/sameAbsoluteTarget/bundle2/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source.. = src/ | ||
bin.includes = META-INF/,\ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>tycho-its-project</groupId> | ||
<artifactId>sameAbsoluteTarget</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>bundle2</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>eclipse-plugin</packaging> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>tycho-its-project</groupId> | ||
<artifactId>sameAbsoluteTarget</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>bundle1</module> | ||
<module>bundle2</module> | ||
</modules> | ||
|
||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-maven-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>target-platform-configuration</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<target> | ||
<file>${basedir}/../target-platform/target-platform.target</file> | ||
</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
16 changes: 16 additions & 0 deletions
16
tycho-its/projects/sameAbsoluteTarget/target-platform/target-platform.target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?pde version="3.8"?> | ||
<target name="tp"> | ||
<locations> | ||
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven"> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.8.1</version> | ||
<type>jar</type> | ||
</dependency> | ||
</dependencies> | ||
</location> | ||
</locations> | ||
</target> |
27 changes: 27 additions & 0 deletions
27
...src/test/java/org/eclipse/tycho/test/target/DifferentTargetFilesSameAbsolutePathTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.eclipse.tycho.test.target; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.util.List; | ||
|
||
import org.apache.maven.it.Verifier; | ||
import org.eclipse.tycho.test.AbstractTychoIntegrationTest; | ||
import org.junit.Test; | ||
|
||
public class DifferentTargetFilesSameAbsolutePathTest extends AbstractTychoIntegrationTest { | ||
|
||
@Test | ||
public void test() throws Exception { | ||
Verifier verifier = getVerifier("sameAbsoluteTarget"); | ||
|
||
verifier.executeGoals(List.of("clean", "verify")); | ||
verifier.verifyErrorFreeLog(); | ||
|
||
// 2 modules with relative path to target, but identical absolute target file | ||
// path | ||
assertEquals(1, Files.lines(Path.of(verifier.getBasedir(), verifier.getLogFileName())) | ||
.filter(line -> line.contains("Resolving target definition file")).count()); | ||
} | ||
} |