jonathan.gibbons at oracle.com
Tue Aug 20 14:38:53 PDT 2013
On 08/20/2013 02:21 PM, Henry Jen wrote:
> On 08/20/2013 12:55 PM, Jonathan Gibbons wrote:
>> It sounds like you have insufficient @build directives and that some of
>> your library classes are being implicitly compiled (into the wrong place)
> Thanks Jon for the detailed instruction, you are right about this, it's
> because the bootlib is build into the folder where test resides.
> After add build tag to initiate build library first, they appear in the
> correct folder and the test pass. Luckily one class is enough to cover
> all other classes the test depends on in that bootlib(I removed extra
> after review the .jtr report, not sure if this is a good idea or I
> should leave whatever class I will import on the @build tag).
> @build java.util.stream.OpTestCase
> Is this by design? I thought path referenced in @library is to be built
> from that folder.
The problem comes with implicit compilation.
jtreg is clever enough to know what sources come from which
library directory, but it is /not/ clever enough (and is not supposed
to be) to look inside the library source code and see what code it
references _from other libraries_.
If you tell jtreg to build those other classes explicitly, you will end up
with class files "in the right place". But if end up with some files
being implicitly compiled, then you risk them ending up in the
same place that explicitly compiled files are going.
More information about the jtreg-use