Tests (Was Warnings Cleanup in java.util.<various> (more from hack day))

Martijn Verburg martijnverburg at gmail.com
Thu Dec 8 12:41:31 PST 2011


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 jdk_util target in the make file that runs the tests
> in jdk/test/java/util/**. You can run them with:
>
> make JT_HOME=<jtreg-location> jdk_util
>
> This locates your build in the default output directory so if it's somewhere
> else when you'll need to specify PRODUCT_HOME=<myjdk> 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


More information about the jdk8-dev mailing list