Skip to content

Commit

Permalink
Enable the pde-build tests
Browse files Browse the repository at this point in the history
Currently pde test are not executed what leads to regressions detected
too late.

This enables the tests based on a profile only executed for verification
builds.
  • Loading branch information
laeubi committed Dec 16, 2023
1 parent 6f744c5 commit d078fb0
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 3 deletions.
4 changes: 1 addition & 3 deletions build/org.eclipse.pde.build.tests/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ bin.includes = META-INF/,\
about.html,\
test.xml
src.includes = about.html
jars.compile.order = .
pom.model.property.skipTests = true
pom.model.property.code.ignoredWarnings = ${tests.ignoredWarnings}
jars.compile.order = .
114 changes: 114 additions & 0 deletions build/org.eclipse.pde.build.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?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>org.eclipse.pde</groupId>
<artifactId>eclipse.pde.build</artifactId>
<version>4.31.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.pde.build.tests</artifactId>
<version>1.4.300-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<properties>
<!-- This is used in the ibuilds where the tycho test execution is
DISABLED and instead we rely on the test.xml! -->
<skipTests>true</skipTests>
<ignoredWarnings>${tests.ignoredWarnings}</ignoredWarnings>
</properties>

<profiles>
<profile>
<!-- Only enable this for individual bundles builds as otherhwise the ibuild repository is not aviable and we might run into problems -->
<id>build-individual-bundles</id>
<properties>
<sdkWorkDir>${project.build.directory}/sdk-product</sdkWorkDir>
<sdkProfile>DefaultProfile</sdkProfile>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
</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>
<!-- first provision an install of the current eclipse IDE -->
<execution>
<id>install-sdk</id>
<goals>
<goal>director</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<repositories>${eclipse-p2-repo.url}</repositories>
<install>
<iu>
<id>org.eclipse.sdk.ide</id>
</iu>
<iu>
<id>org.eclipse.tips.feature</id>
<feature>true</feature>
</iu>
</install>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<product>org.eclipse.sdk.ide</product>
<testRuntime>p2Installed</testRuntime>
<work>${sdkWorkDir}</work>
<profileName>${sdkProfile}</profileName>
<skipTests>true</skipTests> <!-- this supress the default execution -->
</configuration>
<executions>
<execution>
<id>pde-build-tests</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skipTests>false</skipTests>
<testClass>org.eclipse.pde.build.tests.PDEBuildTestSuite</testClass>
<systemProperties>
<pde.build.includeP2>false</pde.build.includeP2>
</systemProperties>
<osgiDataDirectory>${project.build.directory}/ws-pde</osgiDataDirectory>
</configuration>
</execution>
<execution>
<id>p2-tests</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skipTests>false</skipTests>
<testClass>org.eclipse.pde.build.tests.P2TestSuite</testClass>
<systemProperties>
<pde.build.includeP2>true</pde.build.includeP2>
</systemProperties>
<osgiDataDirectory>${project.build.directory}/ws-p2</osgiDataDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit d078fb0

Please sign in to comment.