Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Building and testing EGit -- targeting #302549 resolution

Le 15/06/2011 15:52, Matthias Sohn a écrit :
2011/6/15 Benjamin Gandon <benje@xxxxxxxxxx>
Hello EGit developers,

I'm new to EGit development and to Eclipse plugin dev in general.
Sorry in advance if my questions are basic.

My goal here is to develop, test, and submit a patch that enables the --follow feature of git log that is not available in EGit.
(See also the bug #
302549 about this.)

that's great :-) 

You may consider to add this functionality first to jgit CLI (class org.eclipse.jgit.pgm.Log)
and maybe also jgit API (class org.eclipse.jgit.api.LogCommand)
to get the jgit part right and then do the integration with the history view.

Actually I already had 80% of the work done.
Porting the --follow feature of JGit into the GitHistoryPage class was just about setting a FollowFilter as tree filter of the current walk (well in the right circumstances).

My problem was just how to test that. I finally realized I could use a dedicated test instance of Eclipse. In which I would install EGit with this update-site archive generated by the build process. I added a section about that in the contributor guide.

Now I have tested. Well... it works great!!!
I tested it successfully on Galileo SR2 + JDK 1.5, and Helios SR2 + JDK 1.6.

For testing in Galileo,  the dedicated maven profile is useful:
$ mvn -P platform-galileo -P skip-ui-tests install
I also added some info about that in the contributor guide.


I submited the patch in the bug #302549.
Now I'll submit the patch into Gerrit!



My first question is about building EGit.
Following the contributor guide instructions, I managed to build JGit and EGit with maven 3.
JGit build succeds, but EGit build
fails. Unit tests pass, but several UI tests (swtbot) break.
(I'm first building the unmodified EGit code from master branch. I use maven 3.0.3 in a Cygwin bash console.)

Question #1: Should I care about those failures ? Or are they OK ?
 
in general all tests should pass, but UI tests sometimes are a bit brittle, so unfortunately
sometimes it's necessary to run the UI tests multiple times until they succeed. We constantly
try to improve this but this doesn't come for free ... 

My second question is about testing my modified version of EGit.
The Contributor Guide only tells about a
testing instance at eclipse.org.

Question #2: Is it possible for me to test locally ?
Do you have any document URL where I would understand how to proceed ?
Or is the use of a testing instance at eclipse.org mandatory ?
 
in order to run UI tests locally you need to have swtbot installed as described
in the contributor guide. Then simply select the test class or method and
click "Run As > SwtBot Test". This should start the test locally. Beware: don't
click around when a UI test is running as this may disturb the UI test by e.g.
moving the focus to another window. I updated the contributor guide
accordingly.

Thank you Matthias, I saw you added those precious advice about UI testing in the contributor guide.


The build and all tests are also automatically executed when you upload a new
change to our review server. Find a link to the corresponding build job in the
review comments posted by "Hudson CI"

--
Matthias

/Benjamin

Back to the top