Community
Participate
Working Groups
In order to help external contributions we should try to make p2 buildable with tycho
I'm not at all opposed to this but the description could be a little more informative. What about p2 is not buildable by Tycho? What needs to change? How? How would this ease contributions?
I have updated the POMs so that I could at least build the publisher bundles with Tycho. In this way, I can do changes in p2 and immediately try them out in Tycho (cf. bug 341572). This is obviously a very special use case. In general I think the idea is that people can easily run the central build and tests locally, so that as a contributor I can verify my proposed paches by just calling @mvn clean verify@ in the rt.equinox.p2 repository root. I haven't looked into building all of p2 with Tycho yet, but now that the p2 Sources are in Git, I probably will eventually - I want my local Hudson to run the p2 tests for me :-)
Created attachment 201366 [details] fix additionnal pom versions , fix paths in the aggregator, fix ui.sdk manifest Continuing the work of Tobias (http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=cdb395b87307f3df0b9a2415f2722801fc836a6f) , this patch provides : * fix pom versions so that they are all in sync with manifests versions * replaces in ui.sdk the require-bundle on org.eclipse.compare with 2 import packages (actually it is because mysteriously tycho will not find the bundle org.eclipse.compare in indigo releases composite repo -- I manually checked it was in content.xml; oh well; import packages are more modular anyway) * fix the paths in the aggregator; a bit like you already did Tobias (../../bundles for bundles and ../../features for features ) After this patch is committed, as a p2 user I may : git clone http://git.eclipse.org/gitroot/equinox/rt.equinox.p2.git cd org.eclipse.equinox.p2-parent && mvn clean install cd ../org.eclipse.equinox.p2-aggregator && mvn clean install (perfect for CI) and it's a success Next steps : changing the packaging of the test modules from eclipse-plugin to eclipse-test-plugin ; and configure the unit and integrations tests for tycho surefire -- Pascal, are the tests up to date, and do they run in the IDE (I could not launch org.eclipse.equinox.frameworkadmin.test test suite in my IDE - I got many errors :-/ )
I like to wake up and find contribs like that :) Thx Anthony
Comment on attachment 201366 [details] fix additionnal pom versions , fix paths in the aggregator, fix ui.sdk manifest Patch applied.
Anthony, please ignore the fwkadmin tests for now. I'll investigate what is going on. I suspect it is just a setup issue.
Created attachment 202422 [details] Updating org.eclipse.equinox.frameworkadmin.equinox version in the pom
Created attachment 202423 [details] Changing the packaging of ie.wombat.jbdiff.test from eclipse-plugin to eclipse-test-plugin Added 2 patches : * 202422 : syncing the version of fwkadmin * this patch : ie.wombat.jbdiff.test as eclipse-test-plugin; tycho surefire can run those tests just fine without any extra configuration I have 2 questions : * the Java binary diff tool (ie.wombat.jbdiff) could be, if its code does not change anymore (? I did not check the history...) stored in a p2 repo instead of being part of the p2 master git repo. * the bundle org.eclipse.core.tests.harness is required for many tests; in the IDE, it is imported from CVS, thanks to this PSF file : org.eclipse.equinox.p2.releng/projectSet.psf : <project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.core.tests.harness,org.eclipse.core.tests.harness"/> Does anyone of you know if this bundle (along with other core.tests bundles) is exported to a p2 repo ? because AFAIK, Tycho does not understand PSF files...
The org.eclipse.core.tests.harness bundle is included in our regular build repositories. http://wiki.eclipse.org/Eclipse_Project_Update_Sites
OK ! thanks Kim for the link ! http://download.eclipse.org/eclipse/updates/3.7 or http://download.eclipse.org/eclipse/updates/3.8milestones are what I was looking for !
Created attachment 203571 [details] added indigo repos in parent, configured tycho surefire plugin with this patch, I was able to run successfully all tests in org.eclipse.equinox.p2.tests (1765 tests) except : test233240_artifactsDeleted (expected 6 but was 3) from36To37 (NPE) install37From36 (Could not find the verifier bundle) thing is, I also had to download and copy to /home/anthony/Téléchargements/eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz an indigo release I am still wondering what would be the best way to get during the build this indigo release... I am thinking an ant script in Hudson (preliminary step), checking for this archive, if not there, it would download it; but maybe there is a maven tip to make this download step part of the maven build... anyway, it's moving forward ;-)
Comment on attachment 202423 [details] Changing the packaging of ie.wombat.jbdiff.test from eclipse-plugin to eclipse-test-plugin jbdiff changed applied. Thx
Comment on attachment 203571 [details] added indigo repos in parent, configured tycho surefire plugin Applied.
Created attachment 204623 [details] upgraded tycho from 0.12.0 to 0.13.0 for p2 build the (main) reason to upgrade now is to allow the use of the –Dmaven.test.failure.ignore argument to let tycho surefire plugin (the test launcher) not to fail when there is a test failure or error; that way we can envision an Hudson build, even if some errors or failures remain in the tests... you can follow this discussion about the resolution:=optional attribute that tycho 0.13.0 interprets as "do not include at compile time" since 0.13.0 ; I got over it using the jars.extra.classpath in build.properties, thanks to Brian http://dev.eclipse.org/mhonarc/lists/p2-dev/msg04475.html
(In reply to comment #14) > Created attachment 204623 [details] > upgraded tycho from 0.12.0 to 0.13.0 for p2 build > > the (main) reason to upgrade now is to allow the use of the > –Dmaven.test.failure.ignore argument to let tycho surefire plugin (the test > launcher) not to fail when there is a test failure or error; that way we can > envision an Hudson build, even if some errors or failures remain in the > tests... > FYI, you can use -fae or -fn mvn invocation option to get more or less the same result. This is standard maven functionality and works for any Tycho version.
Created attachment 204645 [details] make the tests bundle download an eclipse platform before executing the tests first, thanks Igor for reminding me those maven switches... well anyway, I guess it's good that p2 build uses the latest tycho ;-) this patch add a maven ant runner step, to download an eclipse platform that is needed by p2 migration tests. if you are using windows, append -Dplatform.archive.name=eclipse-indigo-platform.zip to your mvn command. As far as I know, it is the best way (to download the eclipse archive using ant) to make those p2 migration tests run... To demo the impact of those 2 last patches (tycho 0.13.0 and the ant task to download the eclipse platfrom), I cloned the p2 git repo to my github account and applied them; and I set up a CI build that : * git clone http://github.com/anthonydahanne/make-p2-buildable-with-tycho.git * mvn clean install -f org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml * mvn clean -f org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml -Dmaven.test.failure.ignore=true and the result is there : http://ci.dahanne.net/job/make-p2-buildable-with-tycho/lastCompletedBuild/testReport/ 3 tests are not passing, and some test bundles are still commented, but I think we could set up a CI build on hudson.eclipse.org for this, IMO that would help see the progress made. Should I create a BZ entry for that ? (once the patches are accepted ?)
Created attachment 206500 [details] Syncing of pom.xml version numbers with MANIFEST.MF/similar. Hi Anthony Dahanne & everybody else. I used Dahanne's git repo and the instructions posted worked /fairly/ well. This is to say that there seems to be a few silent failures, at least I did not spot them when doing: mvn clean install -f org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml -Dmaven.test.failure.ignore=true For example the p2.sdk would not build. The problem is that the versions of pom.xml and the corresponding META-INF/MANIFEST.MF is out of sync. The problematic poms can be detected with the following: mvn org.eclipse.tycho:tycho-packaging-plugin:0.13.0:validate-version -f ./features/org.eclipse.equinox.p2.sdk/pom.xml mvn org.eclipse.tycho:tycho-packaging-plugin:0.13.0:validate-version -f ./features/org.eclipse.equinox.p2.user.ui/pom.xml mvn org.eclipse.tycho:tycho-packaging-plugin:0.13.0:validate-version -f ./bundles/org.eclipse.equinox.p2.tests.ui/pom.xml Apply the patch and no errors for all three using Dahanne's repo. The last won't compile in rt.equinox.p2 for other reasons it seems. (PS: My first patch so... Hopefully works.)
Comment on attachment 204645 [details] make the tests bundle download an eclipse platform before executing the tests Patch applied
Comment on attachment 206500 [details] Syncing of pom.xml version numbers with MANIFEST.MF/similar. Patch applied. Thc
This will happen as part of the CBI during Kepler.
A big part of this work has been done in the past, though it has been irregularly working because it lacked attention and was never used as a primary way to build p2. Since then the CBI changes have occurred and have introduced other issues that are being described in bug #382006. Closing this bug and tracking additional work in bug #382006.