Request for guidance on fixing JDK-8075571: Support tier1 and tier2 make targets

Jonathan Gibbons jonathan.gibbons at
Tue Jun 2 21:21:30 UTC 2015


The magic you need to manipulate is lines 54-71 (approx) in test/Makefile.

# Default test target (core)
default: jdk_core langtools_jtreg jaxp_all

# All testing
all: jdk_all langtools_all jaxp_all

# Test targets
langtools_% :
langtools_,,$@)" $(subst langtools_,,$@))

jdk_% core_%s svc_%:
     @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), TEST="$@" $@)

     @$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), TEST="$@" $@)

     @$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@)

These lines set up how test targets are mapped into individual targets 
in the individual repos.   Note the pattern-matching rules for 
langtools_%, jdk_%, jaxp_%, hotspot%

To add a new top level :tier1 target, I would copy the "all" target and 
add something like

tier1: jdk_tier1 langtools_tier1 jaxp_tier1

(i.e. delegating to all repos that support a :tier1 test target).

You will want to add a tier1 target into langtools/test/Makefile for 
this to work, because the langtools_% target strips off the "langtools_" 
For other repos, make sure there is a jdk-tier1 target, jaxp-tier1 
target, etc, since no prefix stripping is done on those targets.

You might want to consider whether to (or not to) run the test targets 
in parallel. Depending how the individual repo test targets are set up, 
you could easily swamp your machine if you run too many invocations of 
jtreg in parallel.

-- Jon

On 06/02/2015 01:04 PM, joe darcy wrote:
> Hello makefile gurus,
> To provide the next level of support to the tiered testing policy [1], 
> I'd like to get some advice on how best to tackle
>     JDK-8075571: Support tier1 and tier2 make targets
> From the bug, currently one can invoke test groups like so:
>     make test-only TEST=jdk_lang
> That this, this above make command will run the tests in the 
> ":jdk_lang" test group. By applying the simple edit
> diff -r df4d75f58f15 test/Makefile
> --- a/test/Makefile    Thu May 28 11:31:40 2015 -0700
> +++ b/test/Makefile    Tue Jun 02 13:00:06 2015 -0700
> @@ -263,7 +263,7 @@
>  # ------------------------------------------------------------------
> -jdk_% core_% svc_%:
> +jdk_% core_% svc_% tier%:
>      $(ECHO) "Running tests: $@"
>      for each in $@; do \
>              $(MAKE) -j 1 TEST_SELECTION=":$$each" UNIQUE_DIR=$$each 
> jtreg_tests; \
> to the test/Makefile, I was hoping
>     make test-only TEST=tier1
> would in turn be able to run the ":tier1" test group. But alas, that 
> does not occur and I don't see what is (not) happening for that 
> omission to take place.
> Thanks,
> -Joe
> [1] 

More information about the build-dev mailing list