8139272: Add configure variable to set concurrency for jtreg tests

Reviewed-by: erikj, ihse
This commit is contained in:
Erik Helin 2015-12-15 11:04:18 +01:00
parent 749e7d7bd2
commit 321b0aec83
8 changed files with 59 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -149,6 +149,19 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
AC_SUBST(JOBS)
])
AC_DEFUN_ONCE([BPERF_SETUP_TEST_JOBS],
[
# The number of test jobs will be chosen automatically if TEST_JOBS is 0
AC_ARG_WITH(test-jobs, [AS_HELP_STRING([--with-test-jobs],
[number of parallel tests jobs to run @<:@based on build jobs@:>@])])
if test "x$with_test_jobs" = x; then
TEST_JOBS=0
else
TEST_JOBS=$with_test_jobs
fi
AC_SUBST(TEST_JOBS)
])
AC_DEFUN([BPERF_SETUP_CCACHE],
[
AC_ARG_ENABLE([ccache],

View File

@ -233,6 +233,7 @@ JDKOPT_DETECT_INTREE_EC
BPERF_SETUP_BUILD_CORES
BPERF_SETUP_BUILD_MEMORY
BPERF_SETUP_BUILD_JOBS
BPERF_SETUP_TEST_JOBS
# Setup arguments for the boot jdk (after cores and memory have been setup)
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS

View File

@ -646,6 +646,7 @@ JAVA_FLAGS_SMALL
JAVA_FLAGS_JAVAC
JAVA_FLAGS_BIG
JAVA_FLAGS
TEST_JOBS
JOBS
MEMORY_SIZE
NUM_CORES
@ -1142,6 +1143,7 @@ with_dxsdk_include
with_num_cores
with_memory_size
with_jobs
with_test_jobs
with_boot_jdk_jvmargs
with_sjavac_server_java
enable_sjavac
@ -2061,6 +2063,8 @@ Optional Packages:
--with-memory-size=1024 [probed]
--with-jobs number of parallel jobs to let make run [calculated
based on cores and memory]
--with-test-jobs number of parallel tests jobs to run [based on build
jobs]
--with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
invocations of boot JDK, overriding the default
values, e.g --with-boot-jdk-jvmargs="-Xmx8G
@ -3747,7 +3751,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -3785,6 +3789,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
################################################################################
#
# Optionally enable distributed compilation of native code using icecc/icecream
@ -4728,7 +4734,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1449850507
DATE_WHEN_GENERATED=1450172823
###############################################################################
#
@ -57253,6 +57259,21 @@ $as_echo "$JOBS" >&6; }
# The number of test jobs will be chosen automatically if TEST_JOBS is 0
# Check whether --with-test-jobs was given.
if test "${with_test_jobs+set}" = set; then :
withval=$with_test_jobs;
fi
if test "x$with_test_jobs" = x; then
TEST_JOBS=0
else
TEST_JOBS=$with_test_jobs
fi
# Setup arguments for the boot jdk (after cores and memory have been setup)
##############################################################################

View File

@ -270,6 +270,7 @@ SJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
# Number of parallel jobs to use for compilation
JOBS?=@JOBS@
TEST_JOBS?=@TEST_JOBS@
# Default make target
DEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@

View File

@ -83,6 +83,7 @@ help:
$(info $(_) # To see executed command lines, use LOG=debug)
$(info $(_) JOBS=<n> # Run <n> parallel make jobs)
$(info $(_) # Note that -jN does not work as expected!)
$(info $(_) TEST_JOBS=<n> # Run <n> parallel test jobs)
$(info $(_) CONF_CHECK=<method> # What to do if spec file is out of date)
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) make test TEST=<test> # Only run the given test or tests, e.g.)

View File

@ -40,7 +40,8 @@ ifeq ($(HAS_SPEC),)
##############################################################################
# Make control variables, handled by Init.gmk
INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK COMPARE_BUILD
INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
COMPARE_BUILD
# All known make control variables
MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER

View File

@ -35,7 +35,8 @@ define RunTests
($(CD) $(SRC_ROOT)/test && $(MAKE) $(MAKE_ARGS) -j1 -k MAKEFLAGS= \
JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) \
TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) \
ALT_OUTPUTDIR=$(OUTPUT_ROOT) CONCURRENCY=$(JOBS) $1) || true
ALT_OUTPUTDIR=$(OUTPUT_ROOT) TEST_JOBS=$(TEST_JOBS) \
JOBS=$(JOBS) $1) || true
endef
# Cleans the dir given as $1

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -60,18 +60,28 @@ all: jdk_all langtools_all jaxp_all
# Bring in closed test targets if present
-include $(TOPDIR)/closed/test/Makefile
ifeq ($(TEST_JOBS), 0)
JDK_TEST_JOBS=$(JOBS)
else
JDK_TEST_JOBS=$(TEST_JOBS)
endif
# Test targets
langtools_% :
@$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@))
@$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), CONCURRENCY=$(JDK_TEST_JOBS) JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@))
jdk_% core_%s svc_%:
@$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), TEST="$@" $@)
@$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), CONCURRENCY=$(JDK_TEST_JOBS) TEST="$@" $@)
jaxp_%:
@$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), TEST="$@" $@)
@$(NO_STOPPING)$(call SUBDIR_TEST, $(JAXP_DIR), CONCURRENCY=$(JDK_TEST_JOBS) TEST="$@" $@)
ifeq ($(TEST_JOBS), 0)
HOTSPOT_TEST_JOBS=1
else
HOTSPOT_TEST_JOBS=$(TEST_JOBS)
endif
hotspot_%:
@$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), TEST="$@" $@)
@$(NO_STOPPING)$(call SUBDIR_TEST, $(HOTSPOT_DIR), CONCURRENCY=$(HOTSPOT_TEST_JOBS) TEST="$@" $@)
#
# jtreg_tests