jdk/test/Makefile
changeset 19063 0aa7087394a1
parent 17705 b50b9139c47e
child 20839 a3fd5c769680
equal deleted inserted replaced
19062:bec7e7bd2ad8 19063:0aa7087394a1
   360 # Expect JPRT to set TESTDIRS to the jtreg test dirs
   360 # Expect JPRT to set TESTDIRS to the jtreg test dirs
   361 ifndef TESTDIRS
   361 ifndef TESTDIRS
   362   TESTDIRS = demo
   362   TESTDIRS = demo
   363 endif
   363 endif
   364 
   364 
   365 # Agentvm settings (default is false)
       
   366 ifndef USE_JTREG_AGENTVM
       
   367   USE_JTREG_AGENTVM=false
       
   368 endif
       
   369 # With agentvm, you cannot use -javaoptions?
       
   370 ifeq ($(USE_JTREG_AGENTVM),true)
       
   371   JTREG_AGENTVM_OPTION = -agentvm
       
   372   EXTRA_JTREG_OPTIONS += $(JTREG_AGENTVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
       
   373   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
       
   374 else
       
   375   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
       
   376 endif
       
   377 
       
   378 ifdef CONCURRENCY
       
   379   EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY)
       
   380 endif
       
   381 
       
   382 # Some tests annoy me and fail frequently
   365 # Some tests annoy me and fail frequently
   383 PROBLEM_LIST=ProblemList.txt
   366 PROBLEM_LIST=ProblemList.txt
   384 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
   367 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
   385 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
   368 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
   386 
   369 
   412 # Select list of directories that exist
   395 # Select list of directories that exist
   413 define TestDirs
   396 define TestDirs
   414 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
   397 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
   415 endef
   398 endef
   416 # Running batches of tests with or without agentvm
   399 # Running batches of tests with or without agentvm
   417 define RunAgentvmBatch
   400 define RunBatch
   418 $(ECHO) "Running tests in agentvm mode: $?"
   401 $(ECHO) "Running tests: $?"
   419 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=true  UNIQUE_DIR=$@ jtreg_tests
   402 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" UNIQUE_DIR=$@ jtreg_tests
   420 endef
       
   421 define RunOthervmBatch
       
   422 $(ECHO) "Running tests in othervm mode: $?"
       
   423 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=false UNIQUE_DIR=$@ jtreg_tests
       
   424 endef
   403 endef
   425 define SummaryInfo
   404 define SummaryInfo
   426 $(ECHO) "########################################################"
   405 $(ECHO) "########################################################"
   427 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
   406 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
   428 $(ECHO) "########################################################"
   407 $(ECHO) "########################################################"
   433 # Batches of tests (somewhat arbitrary assigments to jdk_* targets)
   412 # Batches of tests (somewhat arbitrary assigments to jdk_* targets)
   434 # NOTE: These *do not* run the same tests as make/jprt.properties
   413 # NOTE: These *do not* run the same tests as make/jprt.properties
   435 JDK_DEFAULT_TARGETS =
   414 JDK_DEFAULT_TARGETS =
   436 JDK_ALL_TARGETS =
   415 JDK_ALL_TARGETS =
   437 
   416 
   438 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   439 #   Using agentvm has problems, and doesn't help performance as much as others.
       
   440 JDK_ALL_TARGETS += jdk_awt
   417 JDK_ALL_TARGETS += jdk_awt
   441 jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \
   418 jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \
   442          javax/imageio javax/print sun/pisces)
   419          javax/imageio javax/print sun/pisces)
   443 	$(call RunOthervmBatch)
   420 	$(call RunBatch)
   444 
   421 
   445 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   446 JDK_ALL_TARGETS += jdk_beans1
   422 JDK_ALL_TARGETS += jdk_beans1
   447 JDK_DEFAULT_TARGETS += jdk_beans1
   423 JDK_DEFAULT_TARGETS += jdk_beans1
   448 jdk_beans1: $(call TestDirs, \
   424 jdk_beans1: $(call TestDirs, \
   449             java/beans/beancontext java/beans/PropertyChangeSupport \
   425             java/beans/beancontext java/beans/PropertyChangeSupport \
   450             java/beans/Introspector java/beans/Performance \
   426             java/beans/Introspector java/beans/Performance \
   451             java/beans/VetoableChangeSupport java/beans/Statement)
   427             java/beans/VetoableChangeSupport java/beans/Statement)
   452 	$(call RunOthervmBatch)
   428 	$(call RunBatch)
   453 
   429 
   454 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   455 #   Using agentvm has serious problems with these tests
       
   456 JDK_ALL_TARGETS += jdk_beans2
   430 JDK_ALL_TARGETS += jdk_beans2
   457 jdk_beans2: $(call TestDirs, \
   431 jdk_beans2: $(call TestDirs, \
   458             java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
   432             java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
   459             java/beans/PropertyEditor)
   433             java/beans/PropertyEditor)
   460 	$(call RunOthervmBatch)
   434 	$(call RunBatch)
   461 
   435 
   462 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   463 #   Using agentvm has serious problems with these tests
       
   464 JDK_ALL_TARGETS += jdk_beans3
   436 JDK_ALL_TARGETS += jdk_beans3
   465 jdk_beans3: $(call TestDirs, java/beans/XMLEncoder)
   437 jdk_beans3: $(call TestDirs, java/beans/XMLEncoder)
   466 	$(call RunOthervmBatch)
   438 	$(call RunBatch)
   467 
   439 
   468 # All beans tests
   440 # All beans tests
   469 jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
   441 jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
   470 	@$(SummaryInfo)
   442 	@$(SummaryInfo)
   471 
   443 
   472 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   473 JDK_ALL_TARGETS += jdk_io
   444 JDK_ALL_TARGETS += jdk_io
   474 JDK_DEFAULT_TARGETS += jdk_io
   445 JDK_DEFAULT_TARGETS += jdk_io
   475 jdk_io: $(call TestDirs, java/io)
   446 jdk_io: $(call TestDirs, java/io)
   476 	$(call RunAgentvmBatch)
   447 	$(call RunBatch)
   477 
   448 
   478 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   479 JDK_ALL_TARGETS += jdk_lang
   449 JDK_ALL_TARGETS += jdk_lang
   480 JDK_DEFAULT_TARGETS += jdk_lang
   450 JDK_DEFAULT_TARGETS += jdk_lang
   481 jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc sun/reflect vm)
   451 jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc sun/reflect vm)
   482 	$(call RunAgentvmBatch)
   452 	$(call RunBatch)
   483 
   453 
   484 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   485 #   Using agentvm has serious problems with these tests
       
   486 JDK_ALL_TARGETS += jdk_jmx
   454 JDK_ALL_TARGETS += jdk_jmx
   487 jdk_jmx: $(call TestDirs, javax/management com/sun/jmx)
   455 jdk_jmx: $(call TestDirs, javax/management com/sun/jmx)
   488 	$(call RunOthervmBatch)
   456 	$(call RunBatch)
   489 
   457 
   490 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   491 #   Using agentvm has serious problems with these tests
       
   492 JDK_ALL_TARGETS += jdk_management
   458 JDK_ALL_TARGETS += jdk_management
   493 jdk_management: $(call TestDirs, com/sun/management sun/management)
   459 jdk_management: $(call TestDirs, com/sun/management sun/management)
   494 	$(call RunOthervmBatch)
   460 	$(call RunBatch)
   495 
   461 
   496 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   497 JDK_ALL_TARGETS += jdk_math
   462 JDK_ALL_TARGETS += jdk_math
   498 JDK_DEFAULT_TARGETS += jdk_math
   463 JDK_DEFAULT_TARGETS += jdk_math
   499 jdk_math: $(call TestDirs, java/math)
   464 jdk_math: $(call TestDirs, java/math)
   500 	$(call RunAgentvmBatch)
   465 	$(call RunBatch)
   501 
   466 
   502 # Stable agentvm testruns (TestNG)
       
   503 JDK_DEFAULT_TARGETS += jdk_time
   467 JDK_DEFAULT_TARGETS += jdk_time
   504 jdk_time: $(call TestDirs, java/time)
   468 jdk_time: $(call TestDirs, java/time)
   505 	$(call RunAgentvmBatch)
   469 	$(call RunBatch)
   506 
   470 
   507 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   508 JDK_ALL_TARGETS += jdk_other
   471 JDK_ALL_TARGETS += jdk_other
   509 JDK_DEFAULT_TARGETS += jdk_other
   472 JDK_DEFAULT_TARGETS += jdk_other
   510 jdk_other: $(call TestDirs, \
   473 jdk_other: $(call TestDirs, \
   511           demo/jvmti demo/zipfs sample \
   474           demo/jvmti demo/zipfs sample \
   512           javax/naming com/sun/jndi \
   475           javax/naming com/sun/jndi \
   520 	  jdk/lambda \
   483 	  jdk/lambda \
   521 	  com/sun/org/apache/xerces \
   484 	  com/sun/org/apache/xerces \
   522           com/sun/corba \
   485           com/sun/corba \
   523 	  com/sun/tracing \
   486 	  com/sun/tracing \
   524 	  sun/usagetracker)
   487 	  sun/usagetracker)
   525 	$(call RunAgentvmBatch)
   488 	$(call RunBatch)
   526 
   489 
   527 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   528 JDK_ALL_TARGETS += jdk_net
   490 JDK_ALL_TARGETS += jdk_net
   529 JDK_DEFAULT_TARGETS += jdk_net
   491 JDK_DEFAULT_TARGETS += jdk_net
   530 jdk_net: $(call TestDirs, com/sun/net java/net sun/net com/oracle/net)
   492 jdk_net: $(call TestDirs, com/sun/net java/net sun/net com/oracle/net)
   531 	$(call RunAgentvmBatch)
   493 	$(call RunBatch)
   532 
   494 
   533 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   534 jdk_nio: $(call TestDirs, java/nio sun/nio com/oracle/nio)
   495 jdk_nio: $(call TestDirs, java/nio sun/nio com/oracle/nio)
   535 	$(call SharedLibraryPermissions,java/nio/channels)
   496 	$(call SharedLibraryPermissions,java/nio/channels)
   536 	$(call RunAgentvmBatch)
   497 	$(call RunBatch)
   537 
   498 
   538 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   539 jdk_sctp: $(call TestDirs, com/sun/nio/sctp)
   499 jdk_sctp: $(call TestDirs, com/sun/nio/sctp)
   540 	$(call RunAgentvmBatch)
   500 	$(call RunBatch)
   541 
   501 
   542 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   543 #   Using agentvm has serious problems with these tests
       
   544 JDK_ALL_TARGETS += jdk_rmi
   502 JDK_ALL_TARGETS += jdk_rmi
   545 jdk_rmi: $(call TestDirs, java/rmi sun/rmi javax/rmi/ssl)
   503 jdk_rmi: $(call TestDirs, java/rmi sun/rmi javax/rmi/ssl)
   546 	$(call RunOthervmBatch)
   504 	$(call RunBatch)
   547 
   505 
   548 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   549 JDK_ALL_TARGETS += jdk_security1
   506 JDK_ALL_TARGETS += jdk_security1
   550 JDK_DEFAULT_TARGETS += jdk_security1
   507 JDK_DEFAULT_TARGETS += jdk_security1
   551 jdk_security1: $(call TestDirs, java/security)
   508 jdk_security1: $(call TestDirs, java/security)
   552 	$(call RunAgentvmBatch)
   509 	$(call RunBatch)
   553 
   510 
   554 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   555 JDK_ALL_TARGETS += jdk_security2
   511 JDK_ALL_TARGETS += jdk_security2
   556 jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto)
   512 jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto)
   557 	$(call RunAgentvmBatch)
   513 	$(call RunBatch)
   558 
   514 
   559 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   560 JDK_ALL_TARGETS += jdk_security3
   515 JDK_ALL_TARGETS += jdk_security3
   561 jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \
   516 jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \
   562         sun/security com/sun/org/apache/xml/internal/security \
   517         sun/security com/sun/org/apache/xml/internal/security \
   563         com/oracle/security)
   518         com/oracle/security)
   564 	$(call SharedLibraryPermissions,sun/security)
   519 	$(call SharedLibraryPermissions,sun/security)
   565 	$(call RunAgentvmBatch)
   520 	$(call RunBatch)
   566 
   521 
   567 # All security tests
   522 # All security tests
   568 jdk_security: jdk_security1 jdk_security2 jdk_security3
   523 jdk_security: jdk_security1 jdk_security2 jdk_security3
   569 	@$(SummaryInfo)
   524 	@$(SummaryInfo)
   570 
   525 
   571 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   572 JDK_ALL_TARGETS += jdk_sound
   526 JDK_ALL_TARGETS += jdk_sound
   573 jdk_sound: $(call TestDirs, javax/sound)
   527 jdk_sound: $(call TestDirs, javax/sound)
   574 	$(call RunAgentvmBatch)
   528 	$(call RunBatch)
   575 
   529 
   576 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   577 #   Using agentvm has problems, and doesn't help performance as much as others.
       
   578 JDK_ALL_TARGETS += jdk_swing
   530 JDK_ALL_TARGETS += jdk_swing
   579 jdk_swing: $(call TestDirs, javax/swing sun/java2d \
   531 jdk_swing: $(call TestDirs, javax/swing sun/java2d \
   580            demo/jfc com/sun/java/swing)
   532            demo/jfc com/sun/java/swing)
   581 	$(call RunOthervmBatch)
   533 	$(call RunBatch)
   582 
   534 
   583 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   584 JDK_ALL_TARGETS += jdk_text
   535 JDK_ALL_TARGETS += jdk_text
   585 JDK_DEFAULT_TARGETS += jdk_text
   536 JDK_DEFAULT_TARGETS += jdk_text
   586 jdk_text: $(call TestDirs, java/text sun/text)
   537 jdk_text: $(call TestDirs, java/text sun/text)
   587 	$(call RunAgentvmBatch)
   538 	$(call RunBatch)
   588 
   539 
   589 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   590 JDK_ALL_TARGETS += jdk_jdi
   540 JDK_ALL_TARGETS += jdk_jdi
   591 jdk_jdi: $(call TestDirs, com/sun/jdi)
   541 jdk_jdi: $(call TestDirs, com/sun/jdi)
   592 	$(call RunAgentvmBatch)
   542 	$(call RunBatch)
   593 
   543 
   594 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   595 #   Using agentvm has serious problems with these tests
       
   596 JDK_ALL_TARGETS += jdk_tools
   544 JDK_ALL_TARGETS += jdk_tools
   597 jdk_tools: $(call TestDirs, com/sun/tools sun/jvmstat sun/tools tools)
   545 jdk_tools: $(call TestDirs, com/sun/tools sun/jvmstat sun/tools tools)
   598 	$(call SharedLibraryPermissions,tools/launcher)
   546 	$(call SharedLibraryPermissions,tools/launcher)
   599 	$(call RunAgentvmBatch)
   547 	$(call RunBatch)
   600 
   548 
   601 # Stable othervm testruns (minus items from PROBLEM_LIST)
       
   602 #   Using agentvm has serious problems with these tests
       
   603 ifdef OPENJDK
   549 ifdef OPENJDK
   604 jdk_jfr:
   550 jdk_jfr:
   605 else
   551 else
   606 JDK_ALL_TARGETS += jdk_jfr
   552 JDK_ALL_TARGETS += jdk_jfr
   607 jdk_jfr: $(call TestDirs, com/oracle/jfr)
   553 jdk_jfr: $(call TestDirs, com/oracle/jfr)
   608 	$(call RunOthervmBatch)
   554 	$(call RunBatch)
   609 endif
   555 endif
   610 
   556 
   611 # Stable agentvm testruns (minus items from PROBLEM_LIST)
       
   612 JDK_ALL_TARGETS += jdk_util
   557 JDK_ALL_TARGETS += jdk_util
   613 JDK_DEFAULT_TARGETS += jdk_util
   558 JDK_DEFAULT_TARGETS += jdk_util
   614 jdk_util: $(call TestDirs, java/util sun/util)
   559 jdk_util: $(call TestDirs, java/util sun/util)
   615 	$(call RunAgentvmBatch)
   560 	$(call RunBatch)
   616 
   561 
   617 # ------------------------------------------------------------------
   562 # ------------------------------------------------------------------
   618 
   563 
   619 # Run default tests
   564 # Run default tests
   620 # note that this *does not* have the same meaning as jprt.properties :: jprt.make.rule.default.test.targets
   565 # note that this *does not* have the same meaning as jprt.properties :: jprt.make.rule.default.test.targets
   636 # These are all phony targets
   581 # These are all phony targets
   637 PHONY_LIST += $(JDK_ALL_TARGETS) jdk_default jdk_core jdk_all
   582 PHONY_LIST += $(JDK_ALL_TARGETS) jdk_default jdk_core jdk_all
   638 
   583 
   639 # ------------------------------------------------------------------
   584 # ------------------------------------------------------------------
   640 
   585 
       
   586 ifdef CONCURRENCY
       
   587   EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY)
       
   588 endif
       
   589 
   641 # Default JTREG to run (win32 script works for everybody)
   590 # Default JTREG to run (win32 script works for everybody)
   642 JTREG = $(JT_HOME)/win32/bin/jtreg
   591 JTREG = $(JT_HOME)/win32/bin/jtreg
   643 # Add any extra options (agentvm etc.)
   592 # run in agentvm mode
   644 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
   593 JTREG_BASIC_OPTIONS += -agentvm
   645 # Only run automatic tests
   594 # Only run automatic tests
   646 JTREG_BASIC_OPTIONS += -a
   595 JTREG_BASIC_OPTIONS += -a
   647 # Always turn on assertions
   596 # Always turn on assertions
   648 JTREG_ASSERT_OPTION = -ea -esa
   597 JTREG_ASSERT_OPTION = -ea -esa
   649 JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
   598 JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
   658 JTREG_TIMEOUT_OPTION =  -timeoutFactor:4
   607 JTREG_TIMEOUT_OPTION =  -timeoutFactor:4
   659 JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
   608 JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
   660 # Set the max memory for jtreg control vm
   609 # Set the max memory for jtreg control vm
   661 JTREG_MEMORY_OPTION = -J-Xmx512m
   610 JTREG_MEMORY_OPTION = -J-Xmx512m
   662 JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
   611 JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
       
   612 # Add any extra options
       
   613 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
       
   614 # Set other vm and test options
       
   615 JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
       
   616 # Set the GC options for test vms
       
   617 #JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC
       
   618 #JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION)
   663 # Set the max memory for jtreg target test vms
   619 # Set the max memory for jtreg target test vms
   664 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m
   620 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m
   665 JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION)
   621 JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION)
   666 
   622 
   667 # Make sure jtreg exists
   623 # Make sure jtreg exists