59 60 # Get OS name from uname (Cygwin inexplicably adds _NT-5.1) 61 UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_) 62 63 # Commands to run on paths to make mixed paths for java on windows 64 ifeq ($(UNAME_S), CYGWIN) 65 # Location of developer shared files 66 SLASH_JAVA = J: 67 GETMIXEDPATH = cygpath -m 68 else 69 # Location of developer shared files 70 SLASH_JAVA = /java 71 72 GETMIXEDPATH=$(ECHO) 73 endif 74 75 # Root of this test area (important to use full paths in some places) 76 TEST_ROOT := $(shell $(PWD)) 77 78 # Root of all test results 79 ifdef ALT_OUTPUTDIR 80 ABS_OUTPUTDIR = $(shell $(CD) $(ALT_OUTPUTDIR) && $(PWD)) 81 else 82 ABS_OUTPUTDIR = $(shell $(CD) $(TEST_ROOT)/.. && $(PWD)) 83 endif 84 85 ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) 86 ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) 87 88 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) 89 ifndef PRODUCT_HOME 90 # Try to use j2sdk-image if it exists 91 ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/j2sdk-image 92 PRODUCT_HOME := \ 93 $(shell \ 94 if [ -d $(ABS_JDK_IMAGE) ] ; then \ 95 $(ECHO) "$(ABS_JDK_IMAGE)"; \ 96 else \ 97 $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \ 98 fi) 99 PRODUCT_HOME := $(PRODUCT_HOME) 100 endif 101 102 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.) 103 # Should be passed into 'java' only. 104 # Could include: -d64 -server -client OR any java option 105 ifdef JPRT_PRODUCT_ARGS 106 JAVA_ARGS = $(JPRT_PRODUCT_ARGS) | 59 60 # Get OS name from uname (Cygwin inexplicably adds _NT-5.1) 61 UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_) 62 63 # Commands to run on paths to make mixed paths for java on windows 64 ifeq ($(UNAME_S), CYGWIN) 65 # Location of developer shared files 66 SLASH_JAVA = J: 67 GETMIXEDPATH = cygpath -m 68 else 69 # Location of developer shared files 70 SLASH_JAVA = /java 71 72 GETMIXEDPATH=$(ECHO) 73 endif 74 75 # Root of this test area (important to use full paths in some places) 76 TEST_ROOT := $(shell $(PWD)) 77 78 # Root of all test results 79 ifdef TEST_OUTPUT_DIR 80 $(shell $(MKDIR) -p $(TEST_OUTPUT_DIR)/jtreg) 81 ABS_TEST_OUTPUT_DIR := \ 82 $(shell $(CD) $(TEST_OUTPUT_DIR)/jtreg && $(PWD)) 83 else 84 ifdef ALT_OUTPUTDIR 85 ABS_OUTPUTDIR = $(shell $(CD) $(ALT_OUTPUTDIR) && $(PWD)) 86 else 87 ABS_OUTPUTDIR = $(shell $(CD) $(TEST_ROOT)/.. && $(PWD)) 88 endif 89 90 ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) 91 ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) 92 endif 93 94 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) 95 ifndef PRODUCT_HOME 96 # Try to use j2sdk-image if it exists 97 ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/j2sdk-image 98 PRODUCT_HOME := \ 99 $(shell \ 100 if [ -d $(ABS_JDK_IMAGE) ] ; then \ 101 $(ECHO) "$(ABS_JDK_IMAGE)"; \ 102 else \ 103 $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \ 104 fi) 105 PRODUCT_HOME := $(PRODUCT_HOME) 106 endif 107 108 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.) 109 # Should be passed into 'java' only. 110 # Could include: -d64 -server -client OR any java option 111 ifdef JPRT_PRODUCT_ARGS 112 JAVA_ARGS = $(JPRT_PRODUCT_ARGS) |