Having push access to the NetBeans Mercurial repository is a privilege but also a responsibility: responsibility to the quality of the code and responsibility to other people working on NetBeans. In order to ensure that the quality of the code base is high and that you will not disturb anybody else's work, here are a few guidelines that will help you to validate your changesets before you push them into the NetBeans Mercurial repository.
ant clean
to clear the sources and
antto compile the NetBeans IDE. Currently we are building with JDK 1.5, so you can use all its methods, but be careful not to depend on anything newer. Execute commit validation test suite which is designed to test the basic functionality of NetBeans and shall affirm you that your integration is not completely broken. Execute
ant commit-validation
Of course no test shall fail otherwise there is something wrong - probably with your integration. You should evaluate why it fails. Execute unit tests that might be influenced by your changes. For example when committing into the form module its test shall be run by
ant -f form/build.xml test
and shall not fail.
If you use Linux, you can run a premade script that does the clean build and test suites for you. Try nbbuild/misc/full-build-linux.sh (see the shell script comments for usage instructions).
ant -f nbbuild/build.xml commit-validation
-D"xtest.userdata|com.sun.aas.installRoot"=<glassfish install dir>
-Dwtk.dir=<path to wtk22_win.zip or wtk22_linux.zip>
-Dxtest.config=commit-validation-all
For detailed description of these tests look at this document. If the IDE compiles, tests pass you are ready for integration. Check what you have changed by evaluating the output of hg out -p and if the output really contains what you have modified do hg push.org.openide.text.Line can affect the correctness of debugging of JSPs. It would be the best to write correct unit test of the Line but if that is not possible, than the JSP module developer is encouraged to add a test for the correct JSP debugging functionality into the commitValidation tests of the JSP module. That way he will help the core developer recognize that there is something wrong before the commit is done.
Another example might be related to correct garbage collection. The whole system is designed to free itself from memory when not used, but small mistake in any module can prevent this feature to function correctly. As this can be broken by any commit in any module, this is a reasonable test candidate for a commitValidation suite.
In no way the commitValidation is a replacement for unit tests. Each module is responsible for its own set of tests for basic functionality that shall be executed before any change of the module code. The commitValidation suite cannot contain such tests as it would not scale and we need it to execute quickly as it shall be run before every commit. Think about that before extending it - if it is not reasonable to provide validation of an important functionality on a level of unit tests, then commitValidation is the right place. But try to minimize such cases for the sake of scalability.
If you participate in a development, you should be subscribed to . Failures in a daily builds as well as continuous ones are notified there and if your integration breaks something, you can react quickly. If you are going to fix such problem please reply to the mail, so others know that it is being solved.
Test and test tools are also just a software this means if you find bug in them please fill it. If you don't now which Issuezilla module it is then go to http://testtools.netbeans.org/ where you can find more info,
If you don't know how to evaluate commit validation suite results, read above.The automatic tests opens the IDE and popup and close various windows which prevents me from work. How can I prevent it? Easy on Unix - start new X server (Xnest is useful) and execute the validation test there. Using the full-build-linux.sh driver script, just pass spawndisplay=yes.
Usually one is commiting change that has a record in Issuezilla (bug, some task, enhancement). In such case mention the issue number in the commit message.
hg ci -m '#31043: Fixing the screen resolution'and include the changeset hash of the commit into the description field when resolving the issue. Then one can it is possible to find out more about the commit in the Issuezilla and it is possible to find the sources that were modified to resolve the issue.
You are viewing a mobilized version of this site...
View original page here