test/TestCommon.gmk
changeset 51994 7577686cc9bd
parent 51856 11b9d3a6f31c
child 52030 57862a02bf4b
equal deleted inserted replaced
51993:c0d05cf1d19d 51994:7577686cc9bd
   116 
   116 
   117   ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR)
   117   ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR)
   118   ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
   118   ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
   119 endif
   119 endif
   120 
   120 
   121 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
   121 # If unset, set up the PRODUCT_HOME variable to the jdk to test
   122 ifndef PRODUCT_HOME
   122 ifndef PRODUCT_HOME
   123   # Try to use images/jdk if it exists
   123   # Try to use images/jdk if it exists
   124   ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/jdk
   124   ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/jdk
   125   PRODUCT_HOME :=                               \
   125   PRODUCT_HOME :=                               \
   126     $(shell                                     \
   126     $(shell                                     \
   143     endif
   143     endif
   144   endif
   144   endif
   145   JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH='$(_NT_SYMBOL_PATH)'
   145   JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH='$(_NT_SYMBOL_PATH)'
   146 endif
   146 endif
   147 
   147 
   148 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
       
   149 #   Should be passed into 'java' only.
       
   150 #   Could include: -d64 -server -client OR any java option
       
   151 ifdef JPRT_PRODUCT_ARGS
       
   152   JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
       
   153 endif
       
   154 
       
   155 # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
       
   156 #   Should be passed into anything running the vm (java, javac, javadoc, ...).
       
   157 ifdef JPRT_PRODUCT_VM_ARGS
       
   158   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
       
   159 endif
       
   160 
       
   161 ifneq ($(NATIVE_TEST_PATH), )
   148 ifneq ($(NATIVE_TEST_PATH), )
   162   # jtreg -nativepath <dir>
   149   # jtreg -nativepath <dir>
   163   #
   150   #
   164   # Local make tests will be TEST_IMAGE_DIR and JPRT with jprt.use.reg.test.bundle=true
   151   # Local make tests will be TEST_IMAGE_DIR
   165   # should be JPRT_TESTNATIVE_PATH
       
   166   ifdef TEST_IMAGE_DIR
   152   ifdef TEST_IMAGE_DIR
   167     TESTNATIVE_DIR = $(TEST_IMAGE_DIR)
   153     TESTNATIVE_DIR = $(TEST_IMAGE_DIR)
   168   else ifdef JPRT_TESTNATIVE_PATH
       
   169     TESTNATIVE_DIR = $(JPRT_TESTNATIVE_PATH)
       
   170   endif
   154   endif
   171   ifdef TESTNATIVE_DIR
   155   ifdef TESTNATIVE_DIR
   172     JTREG_NATIVE_PATH = -nativepath:$(shell $(GETMIXEDPATH) "$(TESTNATIVE_DIR)/$(NATIVE_TEST_PATH)")
   156     JTREG_NATIVE_PATH = -nativepath:$(shell $(GETMIXEDPATH) "$(TESTNATIVE_DIR)/$(NATIVE_TEST_PATH)")
   173   endif
   157   endif
   174 endif
   158 endif
   204 	    -XX:SharedArchiveFile=$(shell $(GETMIXEDPATH) "$(CDS_ARCHIVE_FILE)") -Xshare:dump
   188 	    -XX:SharedArchiveFile=$(shell $(GETMIXEDPATH) "$(CDS_ARCHIVE_FILE)") -Xshare:dump
   205 
   189 
   206   CDS_VM_ARGS := -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=$(shell $(GETMIXEDPATH) "$(CDS_ARCHIVE_FILE)")
   190   CDS_VM_ARGS := -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=$(shell $(GETMIXEDPATH) "$(CDS_ARCHIVE_FILE)")
   207   JTREG_TEST_OPTIONS += $(addprefix -vmoption:, $(CDS_VM_ARGS))
   191   JTREG_TEST_OPTIONS += $(addprefix -vmoption:, $(CDS_VM_ARGS))
   208   TEST_PREREQS += $(CDS_ARCHIVE_FILE)
   192   TEST_PREREQS += $(CDS_ARCHIVE_FILE)
   209 endif
       
   210 
       
   211 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
       
   212 ifdef JPRT_ARCHIVE_BUNDLE
       
   213   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
       
   214 endif
   193 endif
   215 
   194 
   216 # How to create the test bundle (pass or fail, we want to create this)
   195 # How to create the test bundle (pass or fail, we want to create this)
   217 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
   196 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
   218 ifneq ($(ARCHIVE_BUNDLE), )
   197 ifneq ($(ARCHIVE_BUNDLE), )
   338 # jtreg tests
   317 # jtreg tests
   339 
   318 
   340 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
   319 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
   341 ifndef JT_HOME
   320 ifndef JT_HOME
   342   JT_HOME = $(SLASH_JAVA)/re/jtreg/$(USE_JTREG_VERSION)/promoted/latest/binaries/jtreg
   321   JT_HOME = $(SLASH_JAVA)/re/jtreg/$(USE_JTREG_VERSION)/promoted/latest/binaries/jtreg
   343   ifdef JPRT_JTREG_HOME
       
   344     JT_HOME = $(JPRT_JTREG_HOME)
       
   345   endif
       
   346 endif
   322 endif
   347 
   323 
   348 # Problematic tests to be excluded
   324 # Problematic tests to be excluded
   349 EXTRA_PROBLEM_LISTS :=
   325 EXTRA_PROBLEM_LISTS :=
   350 PROBLEM_LISTS := ProblemList.txt $(EXTRA_PROBLEM_LISTS)
   326 PROBLEM_LISTS := ProblemList.txt $(EXTRA_PROBLEM_LISTS)
   356   JTREG_EXCLUSIONS = $(addprefix -exclude:, $(wildcard $(PROBLEM_LISTS)))
   332   JTREG_EXCLUSIONS = $(addprefix -exclude:, $(wildcard $(PROBLEM_LISTS)))
   357 endif
   333 endif
   358 
   334 
   359 # ------------------------------------------------------------------
   335 # ------------------------------------------------------------------
   360 
   336 
   361 # When called from JPRT the TESTDIRS variable is set to the jtreg tests to run
   337 # The TESTDIRS variable can be used to select the jtreg tests to run
   362 ifdef TESTDIRS
   338 ifdef TESTDIRS
   363   TEST_SELECTION = $(TESTDIRS)
   339   TEST_SELECTION = $(TESTDIRS)
   364 endif
   340 endif
   365 
   341 
   366 ifeq ($(UNAME_S), SunOS)
   342 ifeq ($(UNAME_S), SunOS)