Building Penrose

Alan Bateman Alan.Bateman at oracle.com
Thu Mar 1 12:53:09 PST 2012


On 01/03/2012 19:30, David Bosschaert wrote:
> The honest truth is that I didn't know how long it would take when I
> wrote the blog and I was too impatient to wait for it to complete. It
> was running tests as far as I could see :)
> I let it run for a full night and when I returned to look at it in the
> morning it was stuck somewhere in the test runs. Probably similar to
> what you were seeing.
>
> At least the good news is that the partial test runs (the ones where
> you invoke jtreg with a file or a directory) do complete relatively
> quickly. I'm still trying to figure out how to do debugging with those
> in an IDE [1] - if someone has any tips for that this woud be
> appreciated :)
>
Most of the tests in the jdk repository are just standalone java classes 
with a public static void main method. This means you can compile/debug 
them outside of the test harness. Whether you can work in the IDE 
depends on whether the IDE can use the corresponding JDK. We've 
historically had issues working on the JDK in an IDE as it's not just 
Java code, requires using language features and class file versions that 
the IDE doesn't know about. It's got a bit better in recent years. Same 
thing with other off-the-shelf tools.

 From the mails I can't tell why your test runs are taking so long but 
the AWT tests do take a long time (hours). I will guess they aren't too 
interesting for this project and that you're probably mostly interested 
in the core area. In that case you can use other execution modes. In 
particular it means you can run the tests in a pool of agent VMs where 
each VM runs the tests sequentially. The great thing about this mode is 
that you elide the startup overhead for most tests. If a test crashes 
(meaning a hard crash, not an exception) then jtreg will spin up a 
replacement VM. jtreg has options to get it to retain the error log and 
core file. So the jtreg options to look at are -agentvm and 
-concurrency. Everything in the core libraries area, except the RMI 
tests, can run in agentvm mode so can run quickly. Personally I run with 
-agentvm -concurrency:auto (where "auto" = #cores).

As regards the Jigsaw tests then one thing you'll find is that they are 
shell scripts so you'll going to have to do a bit of work to debug them 
in the IDE. It's not impossible, just means running the tests to allow 
the debugger to attach and configuring the IDE to use the appropriate 
JDI connector. The NetBeans folks on the list may have better suggestions.

-Alan.


More information about the penrose-dev mailing list