From build-dev:
On 12/03/2015 09:13 AM, Carsten Varming wrote:
> Dear David,
>
> I think I finally understand what is going on now.
>
> The command "make build-test-hotspot-jtreg-native" populates
> $(OUTPUTDIR)/support/test/hotspot/jtreg/native/lib/ with ".so" files using
> sub-directories of $(OUTPUTDIR)/support/test/hotspot/jtreg/native/support/
> as scratch space for each test.
>
> The command "make test-image-hotspot-jtreg-native" (which I didn't run in
> my sequence of commands above) copies all files
> in $(OUTPUTDIR)/support/test/hotspot/jtreg/native/lib/
> to $(OUTPUTDIR)/images/test/hotspot/jtreg/native/ . Notice the lacking
> "/lib" in the target.
>
> Jtreg is passed the parameter
> "-nativepath:$(TESTNATIVE_DIR)/hotspot/jtreg/native". Jtreg then use the
> native path to set both system properties: test.nativepath and
> java.library.path.
>
> This leaves a lot to be desired. Jtreg expects all library files and
> executables to be in the same directory (there are no executables in the
> hotspot tests, but the jdk contains one). There is separation between
> libraries and executables everywhere except
> in $(OUTPUTDIR)/images/test/{hotspot,jdk}/jtreg/native/ because jtreg and
> jdk/test/native_sanity/simplenativelauncher/ProgramTest.java expect
> executables to be in the same directory as libraries. I have never seen
> that before. Notice that this makes the step copying the executables into
> the images sub-directory mandatory.
>
> The right thing seems to be to fix jtreg to maintain separation. Something
> as simple as setting java.library.path to test.nativepath + "/lib" and
> force a standard layout with bin and lib sub-directories would be an
> improvement. Perhaps even extend jtreg it to allow separation between
> libraries and executables from different tests (test A should not have
> access to libraries from test B).
>
> I will drop this issue now that I have a way to execute tests containing
> native code, but it would be nice if someone working on jtreg would make it
> possible keep executables separate from libraries.
>
> Carsten
On 12/03/2015 09:13 AM, Carsten Varming wrote:
> Dear David,
>
> I think I finally understand what is going on now.
>
> The command "make build-test-hotspot-jtreg-native" populates
> $(OUTPUTDIR)/support/test/hotspot/jtreg/native/lib/ with ".so" files using
> sub-directories of $(OUTPUTDIR)/support/test/hotspot/jtreg/native/support/
> as scratch space for each test.
>
> The command "make test-image-hotspot-jtreg-native" (which I didn't run in
> my sequence of commands above) copies all files
> in $(OUTPUTDIR)/support/test/hotspot/jtreg/native/lib/
> to $(OUTPUTDIR)/images/test/hotspot/jtreg/native/ . Notice the lacking
> "/lib" in the target.
>
> Jtreg is passed the parameter
> "-nativepath:$(TESTNATIVE_DIR)/hotspot/jtreg/native". Jtreg then use the
> native path to set both system properties: test.nativepath and
> java.library.path.
>
> This leaves a lot to be desired. Jtreg expects all library files and
> executables to be in the same directory (there are no executables in the
> hotspot tests, but the jdk contains one). There is separation between
> libraries and executables everywhere except
> in $(OUTPUTDIR)/images/test/{hotspot,jdk}/jtreg/native/ because jtreg and
> jdk/test/native_sanity/simplenativelauncher/ProgramTest.java expect
> executables to be in the same directory as libraries. I have never seen
> that before. Notice that this makes the step copying the executables into
> the images sub-directory mandatory.
>
> The right thing seems to be to fix jtreg to maintain separation. Something
> as simple as setting java.library.path to test.nativepath + "/lib" and
> force a standard layout with bin and lib sub-directories would be an
> improvement. Perhaps even extend jtreg it to allow separation between
> libraries and executables from different tests (test A should not have
> access to libraries from test B).
>
> I will drop this issue now that I have a way to execute tests containing
> native code, but it would be nice if someone working on jtreg would make it
> possible keep executables separate from libraries.
>
> Carsten
- links to