Tests (Was Warnings Cleanup in java.util. (more from hack day)) (original) (raw)

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Dec 8 13:22:39 PST 2011


On 12/08/2011 12:41 PM, Martijn Verburg wrote:

Hi Alan/All,

On 3 December 2011 15:36, Alan Bateman<Alan.Bateman at oracle.com> wrote: On 03/12/2011 11:27, Martijn Verburg wrote:

Hi all,

So the recent warnings clean up exercise got me thinking about the approach we took and how we could make it safer by applying/running tests in some of these areas. I'm very new to the OpenJDK, but I figure there must be a suite of tests (for the TCK if nothing else). Is that the set of tests that are typically run? Or is there another test suite that can be run/added to? For example I feel that could/should have written a unit test for the write method in the Manifest class that I had my recent brain melt in :-) There are lots of tests in the jdk repository (lots in langtools and some tests in the hotspot repository too). In order to run them then you'll need the jtreg test harness [1]. We probably need better documentation on the OpenJDK site for how to run the tests but one useful thing to know is that the make file in jdk/test directory has make targets that run the tests for many areas of the libraries. In this case you are working on java.util classes and we have a jdkutil target in the make file that runs the tests in jdk/test/java/util/**. You can run them with: make JTHOME= jdkutil This locates your build in the default output directory so if it's somewhere else when you'll need to specify PRODUCTHOME= to point it to the JDK that you are testing. It's possible that your sponsor (maybe Sherman in this case) will run the tests before pushing the changes but we need to get more people used to running the tests too. -Alan. [1] http://openjdk.java.net/jtreg/ Thanks for the set-up instructions, between that and the jtreg site I was able to get them running. I'll probably have more specific questions later on, but in the mean time I'd like to be able to contribute some documentation steps so that especially when community enthusiasts help out with things like 'javac warning clean-up' they do so with an extra safety net. I pinged the guide-discuss list as I thought the developers guide should be where this goes. It could be Warlocks dilemma, but I got not reply there, is the developers guide still the right place? Or is there a wiki that now holds the equivalent developers guide? Apologies for asking on this list, but wasn't sure what another appropriate list would be, OpenJDK has a lot of lists ;-). Cheers, Martijn

Martijn,

I think the Developers Guide is the right place to put this sort of documentation, and ideally the guide-discuss list would be the place to discuss it. In the meantime, I suggest creating documentation so that we can post it "somewhere" where it can be referenced by others wanting to join in the fun.

-- Jon



More information about the jdk8-dev mailing list