jdk/test/Makefile
changeset 10607 1ba66093449c
parent 10435 e9df9d264894
child 11281 58ecbc808474
equal deleted inserted replaced
10606:57a0c549d9a5 10607:1ba66093449c
   340 
   340 
   341 # jtreg tests
   341 # jtreg tests
   342 
   342 
   343 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
   343 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
   344 ifndef JT_HOME
   344 ifndef JT_HOME
   345   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
   345   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
   346   ifdef JPRT_JTREG_HOME
   346   ifdef JPRT_JTREG_HOME
   347     JT_HOME = $(JPRT_JTREG_HOME)
   347     JT_HOME = $(JPRT_JTREG_HOME)
   348   endif
   348   endif
   349 endif
   349 endif
   350 
   350 
   351 # Expect JPRT to set TESTDIRS to the jtreg test dirs
   351 # Expect JPRT to set TESTDIRS to the jtreg test dirs
   352 ifndef TESTDIRS
   352 ifndef TESTDIRS
   353   TESTDIRS = demo
   353   TESTDIRS = demo
   354 endif
   354 endif
   355 
   355 
   356 # Samevm settings (default is false)
   356 # Agentvm settings (default is false)
   357 ifndef USE_JTREG_SAMEVM
   357 ifndef USE_JTREG_AGENTVM
   358   USE_JTREG_SAMEVM=false
   358   USE_JTREG_AGENTVM=false
   359 endif
   359 endif
   360 # With samevm, you cannot use -javaoptions?
   360 # With agentvm, you cannot use -javaoptions?
   361 ifeq ($(USE_JTREG_SAMEVM),true)
   361 ifeq ($(USE_JTREG_AGENTVM),true)
   362   JTREG_SAMEVM_OPTION = -samevm
   362   JTREG_AGENTVM_OPTION = -agentvm
   363   EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
   363   EXTRA_JTREG_OPTIONS += $(JTREG_AGENTVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
   364   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
   364   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
   365 else
   365 else
   366   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
   366   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
       
   367 endif
       
   368 
       
   369 ifdef CONCURRENCY
       
   370   EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY)
   367 endif
   371 endif
   368 
   372 
   369 # Some tests annoy me and fail frequently
   373 # Some tests annoy me and fail frequently
   370 PROBLEM_LIST=ProblemList.txt
   374 PROBLEM_LIST=ProblemList.txt
   371 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
   375 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
   398 
   402 
   399 # Select list of directories that exist
   403 # Select list of directories that exist
   400 define TestDirs
   404 define TestDirs
   401 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
   405 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
   402 endef
   406 endef
   403 # Running batches of tests with or without samevm
   407 # Running batches of tests with or without agentvm
   404 define RunSamevmBatch
   408 define RunAgentvmBatch
   405 $(ECHO) "Running tests in samevm mode: $?"
   409 $(ECHO) "Running tests in agentvm mode: $?"
   406 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_SAMEVM=true  UNIQUE_DIR=$@ jtreg_tests
   410 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=true  UNIQUE_DIR=$@ jtreg_tests
   407 endef
   411 endef
   408 define RunOthervmBatch
   412 define RunOthervmBatch
   409 $(ECHO) "Running tests in othervm mode: $?"
   413 $(ECHO) "Running tests in othervm mode: $?"
   410 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
   414 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=false UNIQUE_DIR=$@ jtreg_tests
   411 endef
   415 endef
   412 define SummaryInfo
   416 define SummaryInfo
   413 $(ECHO) "########################################################"
   417 $(ECHO) "########################################################"
   414 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
   418 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
   415 $(ECHO) "########################################################"
   419 $(ECHO) "########################################################"
   419 
   423 
   420 # Batches of tests (somewhat arbitrary assigments to jdk_* targets)
   424 # Batches of tests (somewhat arbitrary assigments to jdk_* targets)
   421 JDK_ALL_TARGETS =
   425 JDK_ALL_TARGETS =
   422 
   426 
   423 # Stable othervm testruns (minus items from PROBLEM_LIST)
   427 # Stable othervm testruns (minus items from PROBLEM_LIST)
   424 #   Using samevm has problems, and doesn't help performance as much as others.
   428 #   Using agentvm has problems, and doesn't help performance as much as others.
   425 JDK_ALL_TARGETS += jdk_awt
   429 JDK_ALL_TARGETS += jdk_awt
   426 jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \
   430 jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \
   427          javax/imageio javax/print sun/pisces)
   431          javax/imageio javax/print sun/pisces)
   428 	$(call RunOthervmBatch)
   432 	$(call RunOthervmBatch)
   429 
   433 
   430 # Stable samevm testruns (minus items from PROBLEM_LIST)
   434 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   431 JDK_ALL_TARGETS += jdk_beans1
   435 JDK_ALL_TARGETS += jdk_beans1
   432 jdk_beans1: $(call TestDirs, \
   436 jdk_beans1: $(call TestDirs, \
   433             java/beans/beancontext java/beans/PropertyChangeSupport \
   437             java/beans/beancontext java/beans/PropertyChangeSupport \
   434             java/beans/Introspector java/beans/Performance \
   438             java/beans/Introspector java/beans/Performance \
   435             java/beans/VetoableChangeSupport java/beans/Statement)
   439             java/beans/VetoableChangeSupport java/beans/Statement)
   436 	$(call RunSamevmBatch)
   440 	$(call RunAgentvmBatch)
   437 
   441 
   438 # Stable othervm testruns (minus items from PROBLEM_LIST)
   442 # Stable othervm testruns (minus items from PROBLEM_LIST)
   439 #   Using samevm has serious problems with these tests
   443 #   Using agentvm has serious problems with these tests
   440 JDK_ALL_TARGETS += jdk_beans2
   444 JDK_ALL_TARGETS += jdk_beans2
   441 jdk_beans2: $(call TestDirs, \
   445 jdk_beans2: $(call TestDirs, \
   442             java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
   446             java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
   443             java/beans/PropertyEditor)
   447             java/beans/PropertyEditor)
   444 	$(call RunOthervmBatch)
   448 	$(call RunOthervmBatch)
   445 
   449 
   446 # Stable othervm testruns (minus items from PROBLEM_LIST)
   450 # Stable othervm testruns (minus items from PROBLEM_LIST)
   447 #   Using samevm has serious problems with these tests
   451 #   Using agentvm has serious problems with these tests
   448 JDK_ALL_TARGETS += jdk_beans3
   452 JDK_ALL_TARGETS += jdk_beans3
   449 jdk_beans3: $(call TestDirs, java/beans/XMLEncoder)
   453 jdk_beans3: $(call TestDirs, java/beans/XMLEncoder)
   450 	$(call RunOthervmBatch)
   454 	$(call RunOthervmBatch)
   451 
   455 
   452 # All beans tests
   456 # All beans tests
   453 jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
   457 jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
   454 	@$(SummaryInfo)
   458 	@$(SummaryInfo)
   455 
   459 
   456 # Stable samevm testruns (minus items from PROBLEM_LIST)
   460 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   457 JDK_ALL_TARGETS += jdk_io
   461 JDK_ALL_TARGETS += jdk_io
   458 jdk_io: $(call TestDirs, java/io)
   462 jdk_io: $(call TestDirs, java/io)
   459 	$(call RunSamevmBatch)
   463 	$(call RunAgentvmBatch)
   460 
   464 
   461 # Stable samevm testruns (minus items from PROBLEM_LIST)
   465 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   462 JDK_ALL_TARGETS += jdk_lang
   466 JDK_ALL_TARGETS += jdk_lang
   463 jdk_lang: $(call TestDirs, java/lang)
   467 jdk_lang: $(call TestDirs, java/lang)
   464 	$(call RunSamevmBatch)
   468 	$(call RunAgentvmBatch)
   465 
   469 
   466 # Stable othervm testruns (minus items from PROBLEM_LIST)
   470 # Stable othervm testruns (minus items from PROBLEM_LIST)
   467 #   Using samevm has serious problems with these tests
   471 #   Using agentvm has serious problems with these tests
   468 JDK_ALL_TARGETS += jdk_management1
   472 JDK_ALL_TARGETS += jdk_management1
   469 jdk_management1: $(call TestDirs, javax/management)
   473 jdk_management1: $(call TestDirs, javax/management)
   470 	$(call RunOthervmBatch)
   474 	$(call RunOthervmBatch)
   471 
   475 
   472 # Stable othervm testruns (minus items from PROBLEM_LIST)
   476 # Stable othervm testruns (minus items from PROBLEM_LIST)
   473 #   Using samevm has serious problems with these tests
   477 #   Using agentvm has serious problems with these tests
   474 JDK_ALL_TARGETS += jdk_management2
   478 JDK_ALL_TARGETS += jdk_management2
   475 jdk_management2: $(call TestDirs, com/sun/jmx com/sun/management sun/management)
   479 jdk_management2: $(call TestDirs, com/sun/jmx com/sun/management sun/management)
   476 	$(call RunOthervmBatch)
   480 	$(call RunOthervmBatch)
   477 
   481 
   478 # All management tests
   482 # All management tests
   479 jdk_management: jdk_management1 jdk_management2
   483 jdk_management: jdk_management1 jdk_management2
   480 	@$(SummaryInfo)
   484 	@$(SummaryInfo)
   481 
   485 
   482 # Stable samevm testruns (minus items from PROBLEM_LIST)
   486 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   483 JDK_ALL_TARGETS += jdk_math
   487 JDK_ALL_TARGETS += jdk_math
   484 jdk_math: $(call TestDirs, java/math)
   488 jdk_math: $(call TestDirs, java/math)
   485 	$(call RunSamevmBatch)
   489 	$(call RunAgentvmBatch)
   486 
   490 
   487 # Stable samevm testruns (minus items from PROBLEM_LIST)
   491 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   488 JDK_ALL_TARGETS += jdk_misc
   492 JDK_ALL_TARGETS += jdk_misc
   489 jdk_misc: $(call TestDirs, \
   493 jdk_misc: $(call TestDirs, \
   490           demo/jvmti demo/zipfs javax/naming javax/script \
   494           demo/jvmti demo/zipfs javax/naming javax/script \
   491           javax/smartcardio com/sun/jndi com/sun/xml sun/misc)
   495           javax/smartcardio com/sun/jndi com/sun/xml sun/misc)
   492 	$(call RunSamevmBatch)
   496 	$(call RunAgentvmBatch)
   493 
   497 
   494 # Stable samevm testruns (minus items from PROBLEM_LIST)
   498 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   495 JDK_ALL_TARGETS += jdk_net
   499 JDK_ALL_TARGETS += jdk_net
   496 jdk_net: $(call TestDirs, com/sun/net java/net sun/net)
   500 jdk_net: $(call TestDirs, com/sun/net java/net sun/net)
   497 	$(call RunSamevmBatch)
   501 	$(call RunAgentvmBatch)
   498 
   502 
   499 # Stable samevm testruns (minus items from PROBLEM_LIST)
   503 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   500 JDK_ALL_TARGETS += jdk_nio1
   504 JDK_ALL_TARGETS += jdk_nio1
   501 jdk_nio1: $(call TestDirs, java/nio/file)
   505 jdk_nio1: $(call TestDirs, java/nio/file)
   502 	$(call RunSamevmBatch)
   506 	$(call RunAgentvmBatch)
   503 
   507 
   504 # Stable samevm testruns (minus items from PROBLEM_LIST)
   508 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   505 JDK_ALL_TARGETS += jdk_nio2
   509 JDK_ALL_TARGETS += jdk_nio2
   506 jdk_nio2: $(call TestDirs, java/nio/Buffer java/nio/ByteOrder \
   510 jdk_nio2: $(call TestDirs, java/nio/Buffer java/nio/ByteOrder \
   507           java/nio/channels java/nio/MappedByteBuffer)
   511           java/nio/channels java/nio/MappedByteBuffer)
   508 	$(call SharedLibraryPermissions,java/nio/channels)
   512 	$(call SharedLibraryPermissions,java/nio/channels)
   509 	$(call RunSamevmBatch)
   513 	$(call RunAgentvmBatch)
   510 
   514 
   511 # Stable samevm testruns (minus items from PROBLEM_LIST)
   515 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   512 JDK_ALL_TARGETS += jdk_nio3
   516 JDK_ALL_TARGETS += jdk_nio3
   513 jdk_nio3: $(call TestDirs, sun/nio)
   517 jdk_nio3: $(call TestDirs, sun/nio)
   514 	$(call RunSamevmBatch)
   518 	$(call RunAgentvmBatch)
   515 
   519 
   516 # All nio tests
   520 # All nio tests
   517 jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
   521 jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
   518 	@$(SummaryInfo)
   522 	@$(SummaryInfo)
   519 
   523 
   520 # Stable samevm testruns (minus items from PROBLEM_LIST)
   524 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   521 jdk_sctp: $(call TestDirs, com/sun/nio/sctp)
   525 jdk_sctp: $(call TestDirs, com/sun/nio/sctp)
   522 	$(call RunSamevmBatch)
   526 	$(call RunAgentvmBatch)
   523 
   527 
   524 # Stable othervm testruns (minus items from PROBLEM_LIST)
   528 # Stable othervm testruns (minus items from PROBLEM_LIST)
   525 #   Using samevm has serious problems with these tests
   529 #   Using agentvm has serious problems with these tests
   526 JDK_ALL_TARGETS += jdk_rmi
   530 JDK_ALL_TARGETS += jdk_rmi
   527 jdk_rmi: $(call TestDirs, java/rmi javax/rmi sun/rmi)
   531 jdk_rmi: $(call TestDirs, java/rmi javax/rmi sun/rmi)
   528 	$(call RunOthervmBatch)
   532 	$(call RunOthervmBatch)
   529 
   533 
   530 # Stable samevm testruns (minus items from PROBLEM_LIST)
   534 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   531 JDK_ALL_TARGETS += jdk_security1
   535 JDK_ALL_TARGETS += jdk_security1
   532 jdk_security1: $(call TestDirs, java/security)
   536 jdk_security1: $(call TestDirs, java/security)
   533 	$(call RunSamevmBatch)
   537 	$(call RunAgentvmBatch)
   534 
   538 
   535 # Stable samevm testruns (minus items from PROBLEM_LIST)
   539 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   536 JDK_ALL_TARGETS += jdk_security2
   540 JDK_ALL_TARGETS += jdk_security2
   537 jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto)
   541 jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto)
   538 	$(call RunSamevmBatch)
   542 	$(call RunAgentvmBatch)
   539 
   543 
   540 # Stable samevm testruns (minus items from PROBLEM_LIST)
   544 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   541 JDK_ALL_TARGETS += jdk_security3
   545 JDK_ALL_TARGETS += jdk_security3
   542 jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \
   546 jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \
   543         sun/security com/sun/org/apache/xml/internal/security)
   547         sun/security com/sun/org/apache/xml/internal/security)
   544 	$(call SharedLibraryPermissions,sun/security)
   548 	$(call SharedLibraryPermissions,sun/security)
   545 	$(call RunSamevmBatch)
   549 	$(call RunAgentvmBatch)
   546 
   550 
   547 # All security tests
   551 # All security tests
   548 jdk_security: jdk_security1 jdk_security2 jdk_security3
   552 jdk_security: jdk_security1 jdk_security2 jdk_security3
   549 	@$(SummaryInfo)
   553 	@$(SummaryInfo)
   550 
   554 
   551 # Stable samevm testruns (minus items from PROBLEM_LIST)
   555 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   552 JDK_ALL_TARGETS += jdk_sound
   556 JDK_ALL_TARGETS += jdk_sound
   553 jdk_sound: $(call TestDirs, javax/sound)
   557 jdk_sound: $(call TestDirs, javax/sound)
   554 	$(call RunSamevmBatch)
   558 	$(call RunAgentvmBatch)
   555 
   559 
   556 # Stable othervm testruns (minus items from PROBLEM_LIST)
   560 # Stable othervm testruns (minus items from PROBLEM_LIST)
   557 #   Using samevm has problems, and doesn't help performance as much as others.
   561 #   Using agentvm has problems, and doesn't help performance as much as others.
   558 JDK_ALL_TARGETS += jdk_swing
   562 JDK_ALL_TARGETS += jdk_swing
   559 jdk_swing: $(call TestDirs, javax/swing sun/java2d \
   563 jdk_swing: $(call TestDirs, javax/swing sun/java2d \
   560            demo/jfc com/sun/java/swing)
   564            demo/jfc com/sun/java/swing)
   561 	$(call RunOthervmBatch)
   565 	$(call RunOthervmBatch)
   562 
   566 
   563 # Stable samevm testruns (minus items from PROBLEM_LIST)
   567 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   564 JDK_ALL_TARGETS += jdk_text
   568 JDK_ALL_TARGETS += jdk_text
   565 jdk_text: $(call TestDirs, java/text sun/text)
   569 jdk_text: $(call TestDirs, java/text sun/text)
   566 	$(call RunSamevmBatch)
   570 	$(call RunAgentvmBatch)
   567 
   571 
   568 # Stable samevm testruns (minus items from PROBLEM_LIST)
   572 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   569 JDK_ALL_TARGETS += jdk_tools1
   573 JDK_ALL_TARGETS += jdk_tools1
   570 jdk_tools1: $(call TestDirs, com/sun/jdi)
   574 jdk_tools1: $(call TestDirs, com/sun/jdi)
   571 	$(call RunSamevmBatch)
   575 	$(call RunAgentvmBatch)
   572 
   576 
   573 # Stable othervm testruns (minus items from PROBLEM_LIST)
   577 # Stable othervm testruns (minus items from PROBLEM_LIST)
   574 #   Using samevm has serious problems with these tests
   578 #   Using agentvm has serious problems with these tests
   575 JDK_ALL_TARGETS += jdk_tools2
   579 JDK_ALL_TARGETS += jdk_tools2
   576 jdk_tools2: $(call TestDirs, \
   580 jdk_tools2: $(call TestDirs, \
   577             com/sun/tools sun/jvmstat sun/tools tools vm \
   581             com/sun/tools sun/jvmstat sun/tools tools vm \
   578             com/sun/servicetag com/sun/tracing)
   582             com/sun/servicetag com/sun/tracing)
   579 	$(call SharedLibraryPermissions,tools/launcher)
   583 	$(call SharedLibraryPermissions,tools/launcher)
   580 	$(call RunSamevmBatch)
   584 	$(call RunAgentvmBatch)
   581 
   585 
   582 # All tools tests
   586 # All tools tests
   583 jdk_tools: jdk_tools1 jdk_tools2
   587 jdk_tools: jdk_tools1 jdk_tools2
   584 	@$(SummaryInfo)
   588 	@$(SummaryInfo)
   585 
   589 
   586 # Stable samevm testruns (minus items from PROBLEM_LIST)
   590 # Stable agentvm testruns (minus items from PROBLEM_LIST)
   587 JDK_ALL_TARGETS += jdk_util
   591 JDK_ALL_TARGETS += jdk_util
   588 jdk_util: $(call TestDirs, java/util sun/util)
   592 jdk_util: $(call TestDirs, java/util sun/util)
   589 	$(call RunSamevmBatch)
   593 	$(call RunAgentvmBatch)
   590 
   594 
   591 # ------------------------------------------------------------------
   595 # ------------------------------------------------------------------
   592 
   596 
   593 # Run all tests
   597 # Run all tests
   594 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
   598 FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing
   601 
   605 
   602 # ------------------------------------------------------------------
   606 # ------------------------------------------------------------------
   603 
   607 
   604 # Default JTREG to run (win32 script works for everybody)
   608 # Default JTREG to run (win32 script works for everybody)
   605 JTREG = $(JT_HOME)/win32/bin/jtreg
   609 JTREG = $(JT_HOME)/win32/bin/jtreg
   606 # Add any extra options (samevm etc.)
   610 # Add any extra options (agentvm etc.)
   607 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
   611 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
   608 # Only run automatic tests
   612 # Only run automatic tests
   609 JTREG_BASIC_OPTIONS += -a
   613 JTREG_BASIC_OPTIONS += -a
   610 # Always turn on assertions
   614 # Always turn on assertions
   611 JTREG_ASSERT_OPTION = -ea -esa
   615 JTREG_ASSERT_OPTION = -ea -esa