RFR: JDK-8170629 Remove code duplication in test makefiles

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Fri Dec 2 09:24:28 UTC 2016


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