eclipse-equinox / equinox.bundles

Eclipse Public License 2.0
8 stars 16 forks source link

Build equinox.compendium.tests and equinox.region.tests #22

Closed HannesWell closed 2 years ago

HannesWell commented 2 years ago

The tests in o.e.equinox.compendium.tests and o.e.equinox.region.tests are not obsolete and therefore should be build.

The tests in o.e.equinox.region.tests were disabled as part of Bug 470000 that had the goal to reduce/remove the dependencies to aspectj.

@tjwatson explained in https://github.com/eclipse-equinox/equinox.bundles/pull/19#issuecomment-1104330534 that the tests could function even without aspectj in the platform by using corresponding mocks. For now I suggest to simply disable failing tests and to fix them later. The reason is I would like the build to function with all projects in the repository. This way we can later fully leverage Tycho-pomless and don't have to list each module to build.

HannesWell commented 2 years ago

The build currently fails with the following error:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:3.0.0-SNAPSHOT:compile (default-compile) on project org.eclipse.equinox.compendium.tests: Fatal error compiling: [/opt/tools/java/oracle/jdk-5/latest/bin/java, -classpath, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/.m2/repository/org/eclipse/tycho/tycho-lib-detector/3.0.0-SNAPSHOT/tycho-lib-detector-3.0.0-SNAPSHOT.jar, org.eclipse.tycho.libdetector.LibraryDetector] process exit code was -1. Output: There was an error trying to initialize the HPI library.
[ERROR] Please check your installation, HotSpot does not work correctly
[ERROR] when installed in the JDK 1.2 Linux Production Release, or
[ERROR] with any JDK 1.1.x release.
[ERROR] Could not create the Java virtual machine.
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-eclipserun-plugin:3.0.0-SNAPSHOT:eclipse-run (api-analysis) on project org.eclipse.equinox.region.tests: Error while executing platform: Error while executing platform: return code=4, see content of /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/apiAnalyzer-workspace/data/.metadata/.logfor more details. -> [Help 1]

Does anybody has an idea why?

akurtakov commented 2 years ago

Bump the bundle BREE to JavaSE-11. IIRC there is issue with using Java 5 inside docker container.

HannesWell commented 2 years ago

Bump the bundle BREE to JavaSE-11. IIRC there is issue with using Java 5 inside docker container.

Thanks that was helpful already.

I also added the missing extra-bundles to the Test-Runtime and autostarted Felix-SCR, but there are some more failures that the bundles created on the fly are not found. Maybe some paths have to be adjusted.

HannesWell commented 2 years ago

When I run (or debug) this build locally on my computer everything works fine and the test-bundles are found. I'm puzzled why this fails on Jenkins.

mickaelistria commented 2 years ago

@HannesWell are you running same command as in the CI build? Particularly the -Papi-check profile? The failure is

[INFO] --- tycho-eclipserun-plugin:3.0.0-SNAPSHOT:eclipse-run (api-analysis) @ org.eclipse.equinox.region.tests ---
[INFO] Toolchain in tycho-eclipserun-plugin: JDK[/opt/tools/java/openjdk/jdk-11/latest]
[INFO] Expected eclipse log file: /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/apiAnalyzer-workspace/data/.metadata/.log
[INFO] Command line:
    [/opt/tools/java/openjdk/jdk-11/latest/bin/java, -Xmx2048M, -Dp2.RepositoryPreferences.retryOnSocketTimeout=true, -Dp2.RepositoryPreferences.connectionRetryCount=3, -Dp2.RepositoryPreferences.connectionMsRetryDelay=500, -Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=10000, -jar, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.6.400.v20210924-0641/org.eclipse.equinox.launcher-1.6.400.v20210924-0641.jar, -install, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/apiAnalyzer-workspace, -configuration, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/apiAnalyzer-workspace/configuration, -data, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/apiAnalyzer-workspace/data, -application, org.eclipse.pde.api.tools.apiAnalyzer, -project, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/bundles/org.eclipse.equinox.region.tests, -baseline, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/bundles/org.eclipse.equinox.region.tests/target/org.eclipse.equinox.region.tests-apiBaseline.target, -dependencyList, /home/jenkins/agent/workspace/rt.equinox.bundles_PR-22/bundles/org.eclipse.equinox.region.tests/target/dependencies-list.txt, -failOnError]
Status ERROR: org.eclipse.pde.core code=0 Problems occurred while resolving the target contents children=[Status ERROR: org.eclipse.pde.core code=0 Problems loading repositories children=[Status ERROR: org.eclipse.pde.core code=0 Problems loading repositories children=[Status ERROR: org.eclipse.pde.core code=0 Unable to locate installable unit org.eclipse.equinox.region.tests 0.0.0]]]

and tells (more or less explicitly) that it's not possible to do API check because the bundle is not present in baseline. So some pom.xml configuration must be added to set <skipAPIAnalysis>true</skipAPIAnalysis>

HannesWell commented 2 years ago

@HannesWell are you running same command as in the CI build? Particularly the -Papi-check profile?

So some pom.xml configuration must be added to set <skipAPIAnalysis>true</skipAPIAnalysis>

Thanks Mickael for the hint. Indeed I didn't activate the api-check profile in my local test. But I was actually referring to the test-failures and did not even reached the api-check problem. Nevertheless I added the suggested property. The test-failure will then likely be the only failure.

HannesWell commented 2 years ago

We recently moved the repository content to https://github.com/eclipse-equinox/equinox would you be so kind to open your PR for the new repository?

Migrated to https://github.com/eclipse-equinox/equinox/pull/29