284 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) 285 $(ECHO) "########################################################" 286 endef 287 288 # ------------------------------------------------------------------ 289 290 jdk_% core_% svc_%: 291 $(ECHO) "Running tests: $@" 292 for each in $@; do \ 293 $(MAKE) -j 1 TEST_SELECTION=":$$each" UNIQUE_DIR=$$each jtreg_tests; \ 294 done 295 296 # ------------------------------------------------------------------ 297 298 # When called from JPRT the TESTDIRS variable is set to the jtreg tests to run 299 ifdef TESTDIRS 300 TEST_SELECTION = $(TESTDIRS) 301 endif 302 303 ifdef CONCURRENCY 304 EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY) 305 endif 306 307 # Default JTREG to run 308 JTREG = $(JT_HOME)/bin/jtreg 309 # run in agentvm mode 310 JTREG_BASIC_OPTIONS += -agentvm 311 # Only run automatic tests 312 JTREG_BASIC_OPTIONS += -a 313 # Always turn on assertions 314 JTREG_ASSERT_OPTION = -ea -esa 315 JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION) 316 # Report details on all failed or error tests, times too 317 JTREG_BASIC_OPTIONS += -v:fail,error,time 318 # Retain all files for failing tests 319 JTREG_BASIC_OPTIONS += -retain:fail,error 320 # Ignore tests are not run and completely silent about it 321 JTREG_IGNORE_OPTION = -ignore:quiet 322 JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) 323 # Multiple by 4 the timeout numbers 324 JTREG_TIMEOUT_OPTION = -timeoutFactor:4 325 JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION) 326 # Set the max memory for jtreg control vm 327 JTREG_MEMORY_OPTION = -J-Xmx512m 328 JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION) 329 # Give tests access to JT_JAVA, see JDK-8141609 330 JTREG_BASIC_OPTIONS += -e:JDK8_HOME=${JT_JAVA} 331 # Add any extra options 332 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) 333 # Set other vm and test options 334 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) 335 # Set the GC options for test vms 336 #JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC 337 #JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION) 338 # Set the max memory for jtreg target test vms 339 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m 340 JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) 341 342 # Make sure jtreg exists 343 $(JTREG): $(JT_HOME) 344 345 # Run jtreg 346 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) 347 ( \ 348 ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ 349 export JT_HOME; \ 350 $(shell $(GETMIXEDPATH) "$(JTREG)") \ 351 $(JTREG_BASIC_OPTIONS) \ 352 -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport") \ | 284 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) 285 $(ECHO) "########################################################" 286 endef 287 288 # ------------------------------------------------------------------ 289 290 jdk_% core_% svc_%: 291 $(ECHO) "Running tests: $@" 292 for each in $@; do \ 293 $(MAKE) -j 1 TEST_SELECTION=":$$each" UNIQUE_DIR=$$each jtreg_tests; \ 294 done 295 296 # ------------------------------------------------------------------ 297 298 # When called from JPRT the TESTDIRS variable is set to the jtreg tests to run 299 ifdef TESTDIRS 300 TEST_SELECTION = $(TESTDIRS) 301 endif 302 303 ifdef CONCURRENCY 304 JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY) 305 endif 306 ifdef EXTRA_JTREG_OPTIONS 307 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) 308 endif 309 310 # Default JTREG to run 311 JTREG = $(JT_HOME)/bin/jtreg 312 # run in agentvm mode 313 JTREG_BASIC_OPTIONS += -agentvm 314 # Only run automatic tests 315 JTREG_BASIC_OPTIONS += -a 316 # Always turn on assertions 317 JTREG_ASSERT_OPTION = -ea -esa 318 JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION) 319 # Report details on all failed or error tests, times too 320 JTREG_BASIC_OPTIONS += -v:fail,error,time 321 # Retain all files for failing tests 322 JTREG_BASIC_OPTIONS += -retain:fail,error 323 # Ignore tests are not run and completely silent about it 324 JTREG_IGNORE_OPTION = -ignore:quiet 325 JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) 326 # Multiple by 4 the timeout numbers 327 JTREG_TIMEOUT_OPTION = -timeoutFactor:4 328 JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION) 329 # Set the max memory for jtreg control vm 330 JTREG_MEMORY_OPTION = -J-Xmx512m 331 JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION) 332 # Give tests access to JT_JAVA, see JDK-8141609 333 JTREG_BASIC_OPTIONS += -e:JDK8_HOME=${JT_JAVA} 334 # Set other vm and test options 335 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) 336 # Set the GC options for test vms 337 #JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC 338 #JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION) 339 # Set the max memory for jtreg target test vms 340 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m 341 JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) 342 343 # Make sure jtreg exists 344 $(JTREG): $(JT_HOME) 345 346 # Run jtreg 347 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) 348 ( \ 349 ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ 350 export JT_HOME; \ 351 $(shell $(GETMIXEDPATH) "$(JTREG)") \ 352 $(JTREG_BASIC_OPTIONS) \ 353 -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport") \ |