-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testcase for director provisioned product and tycho-surefire
+ fix wrong folder is used on macosx
- Loading branch information
Showing
11 changed files
with
181 additions
and
28 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -67,3 +67,4 @@ jobs: | |
with: | ||
name: Event File | ||
path: ${{ github.event_path }} | ||
|
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
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
7 changes: 7 additions & 0 deletions
7
tycho-its/projects/surefire.p2InstalledRuntime/extProductTestDirector/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,7 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-SymbolicName: spir.extProductTest | ||
Bundle-Version: 1.0.0 | ||
Require-Bundle: org.junit, | ||
org.eclipse.core.runtime | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
4 changes: 4 additions & 0 deletions
4
tycho-its/projects/surefire.p2InstalledRuntime/extProductTestDirector/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,4 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
. |
87 changes: 87 additions & 0 deletions
87
tycho-its/projects/surefire.p2InstalledRuntime/extProductTestDirector/pom.xml
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,87 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
Copyright (c) 2013 Red Hat 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 | ||
https://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Mickael Istria (Red Hat JBoss) - sample product and surefire-config for 386988 | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>tycho-its-project.surefire.p2InstalledRuntime</groupId> | ||
<artifactId>provisionedApplicationParent</artifactId> | ||
<version>1.0.0</version> | ||
</parent> | ||
|
||
<artifactId>spir.extProductTest</artifactId> | ||
<packaging>eclipse-test-plugin</packaging> | ||
|
||
<properties> | ||
<!-- Default value, to override to test different OSGi versions --> | ||
<other.p2.repo.url>${target-platform}</other.p2.repo.url> | ||
<sdkWorkDir>${project.build.directory}/sdk-product</sdkWorkDir> | ||
<sdkProfile>SDKProfile</sdkProfile> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>test-repo</id> | ||
<url>${other.p2.repo.url}</url> | ||
<layout>p2</layout> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-surefire-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<testRuntime>p2Installed</testRuntime> | ||
<product>spir.example-product</product> | ||
<work>${sdkWorkDir}</work> | ||
<profileName>${sdkProfile}</profileName> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-p2-director-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<destination>${sdkWorkDir}</destination> | ||
<profile>${sdkProfile}</profile> | ||
<installFeatures>true</installFeatures> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>install-sdk</id> | ||
<goals> | ||
<goal>director</goal> | ||
</goals> | ||
<phase>pre-integration-test</phase> | ||
<configuration> | ||
<repositories>file:${project.basedir}/../example-product/target/repository</repositories> | ||
<install> | ||
<iu> | ||
<id>spir.example-product</id> | ||
</iu> | ||
</install> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
19 changes: 19 additions & 0 deletions
19
...surefire.p2InstalledRuntime/extProductTestDirector/src/testProvisioning/RootFileTest.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,19 @@ | ||
package testProvisioning; | ||
|
||
import java.io.File; | ||
|
||
import junit.framework.TestCase; | ||
|
||
import org.eclipse.core.runtime.FileLocator; | ||
import org.eclipse.core.runtime.Platform; | ||
|
||
public class RootFileTest extends TestCase { | ||
|
||
public void testIsProvisionedInstallation() throws Exception { | ||
File eclipseInstallationRoot = new File(FileLocator.toFileURL( | ||
Platform.getInstallLocation().getURL()).getPath()); | ||
File rootFile = new File(eclipseInstallationRoot, "README.txt"); | ||
assertTrue(rootFile + " does not exist - installation was not provisioned by p2", rootFile.isFile()); | ||
} | ||
|
||
} |
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
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
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
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