197 198 # Each factor variable comes in 3 variants. The first one is reserved for users 199 # to use on command line. The other two are for predifined configurations in JDL 200 # and for machine specific configurations respectively. 201 TEST_JOBS_FACTOR ?= 1 202 TEST_JOBS_FACTOR_JDL ?= 1 203 TEST_JOBS_FACTOR_MACHINE ?= 1 204 205 ifeq ($(TEST_JOBS), 0) 206 CORES_DIVIDER := 2 207 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) 208 # For smaller SPARC machines we see reasonable scaling of throughput up to 209 # cpus/4 without affecting test reliability. On the bigger machines, cpus/4 210 # causes intermittent timeouts. 211 ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1) 212 CORES_DIVIDER := 5 213 else 214 CORES_DIVIDER := 4 215 endif 216 endif 217 TEST_JOBS := $(shell $(AWK) \ 218 'BEGIN { \ 219 c = $(NUM_CORES) / $(CORES_DIVIDER); \ 220 c = c * $(TEST_JOBS_FACTOR); \ 221 c = c * $(TEST_JOBS_FACTOR_JDL); \ 222 c = c * $(TEST_JOBS_FACTOR_MACHINE); \ 223 if (c < 1) c = 1; \ 224 printf "%.0f", c; \ 225 }') 226 endif 227 228 ################################################################################ 229 # Parse control variables 230 ################################################################################ 231 232 ifneq ($(TEST_OPTS), ) 233 # Inform the user 234 $(info Running tests using TEST_OPTS control variable '$(TEST_OPTS)') 235 endif 236 237 $(eval $(call SetTestOpt,VM_OPTIONS,JTREG)) 238 $(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG)) 239 $(eval $(call SetTestOpt,VM_OPTIONS,GTEST)) | 197 198 # Each factor variable comes in 3 variants. The first one is reserved for users 199 # to use on command line. The other two are for predifined configurations in JDL 200 # and for machine specific configurations respectively. 201 TEST_JOBS_FACTOR ?= 1 202 TEST_JOBS_FACTOR_JDL ?= 1 203 TEST_JOBS_FACTOR_MACHINE ?= 1 204 205 ifeq ($(TEST_JOBS), 0) 206 CORES_DIVIDER := 2 207 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) 208 # For smaller SPARC machines we see reasonable scaling of throughput up to 209 # cpus/4 without affecting test reliability. On the bigger machines, cpus/4 210 # causes intermittent timeouts. 211 ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1) 212 CORES_DIVIDER := 5 213 else 214 CORES_DIVIDER := 4 215 endif 216 endif 217 MEMORY_DIVIDER := 2048 218 TEST_JOBS := $(shell $(AWK) \ 219 'BEGIN { \ 220 c = $(NUM_CORES) / $(CORES_DIVIDER); \ 221 m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \ 222 if (c > m) c = m; \ 223 c = c * $(TEST_JOBS_FACTOR); \ 224 c = c * $(TEST_JOBS_FACTOR_JDL); \ 225 c = c * $(TEST_JOBS_FACTOR_MACHINE); \ 226 if (c < 1) c = 1; \ 227 printf "%.0f", c; \ 228 }') 229 endif 230 231 ################################################################################ 232 # Parse control variables 233 ################################################################################ 234 235 ifneq ($(TEST_OPTS), ) 236 # Inform the user 237 $(info Running tests using TEST_OPTS control variable '$(TEST_OPTS)') 238 endif 239 240 $(eval $(call SetTestOpt,VM_OPTIONS,JTREG)) 241 $(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG)) 242 $(eval $(call SetTestOpt,VM_OPTIONS,GTEST)) |