RFR: JDK-8170629 Remove code duplication in test makefiles

David Holmes david.holmes at oracle.com
Mon Dec 5 04:34:32 UTC 2016

<trimmed to build-dev and hotspot-dev>

Hi Magnus,

Some independent changes are going to collide here. :)


This change has already happened in hs repo - JDK-8169261.




Aside: - Jigsaw bumped this to 4.2 (and I think that was a while ago). I 
don't think anything we do with jtreg relies on the JT_HOME setting 
currently set in hotspot/test/Makefile. So we should bump this after 
your refactor.

41 # hotspot currently do not use ProblemList.txt
42 NO_EXCLUDES := true

Igor is adding this right now:


Otherwise looks good.


On 2/12/2016 7:24 PM, Magnus Ihse Bursie wrote:
> There is a lot of common code that has been duplicated in
> */test/Makefile. For jdk, hotspot, jaxp and nashorn, most of the code in
> the corresponding files are identical. (The odd-man-out is langtools
> which is quite different.)
> These files should be unified to share a single code base, to facilitate
> further improvements to the test makefiles.
> The intent of this bug is a pure refactoring. The duplication should go,
> but all functionality should remain exactly the same. This will leave
> room for some future improvements to the code, but sets a clear limit
> for this first step. The consolidated code base thus contains a fair
> amount of if-blocks, but I hope to be able to address most of these
> later on, by adjusting the individual component to adhere more to the
> standard behavior.
> To minimize the amount of ifdefs in the shared code, I allowed for a few
> changes in behavior. I do not believe these will cause any changes in
> the real world, and to the extent that they do, they could be considered
> bug fixes.
> Behavior that have changed due to unification:
> * jaxp now defaults ABS_JDK_IMAGE to images/jdk instead of j2sdk.
> * jaxp now sets TEST_SELECTION to $(TESTDIRS) if it exists.
> * jaxp and hotspot now get additional option e:JDK8_HOME=${JT_JAVA}
> * hotspot now sets JAVA_VM_ARGS to $(JPRT_PRODUCT_VM_ARGS) if it exists.
> * hotspot now sets JAVA_ARGS to $(JPRT_PRODUCT_ARGS) if it exists.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8170629
> WebRev:
> http://cr.openjdk.java.net/~ihse/JDK-8170629-remove-test-makefile-duplication/webrev.01
> /Magnus

More information about the hotspot-dev mailing list