69 endif 70 71 # Root of this test area (important to use full paths in some places) 72 TEST_ROOT := $(shell pwd $(CYGPATH) ) 73 74 # Default bundle of all test results (passed or not) (JPRT only) 75 ifdef JPRT_JOB_ID 76 JPRT_CLEAN = clean 77 JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip 78 endif 79 80 ifeq ($(PLATFORM), windows) 81 SLASH_JAVA = J: 82 else 83 SLASH_JAVA = /java 84 endif 85 86 # Default JTREG to run 87 ifdef JPRT_JTREG_HOME 88 JTREG_HOME = $(JPRT_JTREG_HOME) 89 else 90 JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1-jigsaw/nightly/binaries/jtreg/ 91 endif 92 JTREG = $(JTREG_HOME)/bin/jtreg 93 JTDIFF = $(JTREG_HOME)/bin/jtdiff 94 95 # Problematic tests to be excluded 96 PROBLEM_LISTS=ProblemList.txt 97 98 # Create exclude list for this platform and arch 99 ifdef NO_EXCLUDES 100 JTREG_EXCLUSIONS = 101 else 102 JTREG_EXCLUSIONS = $(PROBLEM_LISTS:%=-exclude:%) 103 endif 104 105 # Default JCK to run 106 ifdef JPRT_JCK_HOME 107 JCK_HOME = $(JPRT_JCK_HOME) 108 else 109 JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries 110 endif 111 112 # Default JDK for JTREG and JCK 113 # 114 # JT_JAVA is the version of java used to run jtreg/JCK. 115 # 116 ifdef JPRT_JAVA_HOME 117 JT_JAVA = $(JPRT_JAVA_HOME) 118 else 119 JT_JAVA = $(SLASH_JAVA)/re/jdk/1.9.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH) 120 endif 121 122 # Default JDK to test 123 ifdef JPRT_IMPORT_PRODUCT_HOME 124 TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME) 125 else 126 TESTJAVA = $(SLASH_JAVA)/re/jdk/1.9.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH) 127 endif 128 129 # PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from 130 # make/Makefile 131 # For langtools, this is a directory containing build and dist 132 # For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image 133 # (i.e, j2sdk-image or jdk-module-image) 134 ifdef PRODUCT_HOME 135 ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0) 136 TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar 137 endif 138 ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0) 139 TESTJAVA = $(PRODUCT_HOME) 140 endif 141 endif 142 143 ifdef TESTBOOTCLASSPATH 144 JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH) 145 ### In the following, -refvmoptions is an undocumented option 146 ### The following does not work JCK 7 b30 2/6/2010. Awaiting b31. 147 JCK_OPTIONS += \ 148 -vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \ 149 -refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) 150 endif 151 152 # Concurrency is the number of tests that can execute at once. 153 # On an otherwise empty machine, suggest setting to (#cpus + 2) 154 # If unset, the default is (#cpus) 155 ### RFE: determine and use #cpus 156 ifdef CONCURRENCY 157 JTREG_OPTIONS += -agentvm -concurrency:$(CONCURRENCY) 158 else 159 JTREG_OPTIONS += -agentvm 160 endif 161 162 ifdef JCK_CONCURRENCY 163 JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY) 164 endif 165 166 # JCK is executed using "Multi-JVM Group Mode", which is a hybrid 167 # of otherVM and sameVM modes. New JVMs are created and reused for 168 # a number of tests, then eventually discarded and a new one started. 169 # This amortizes the JVM startup time. The "group size" defines 170 # how many tests are run in a JVM before it is replaced. 171 # If unset, the default is 100. 245 246 jtreg apt javac javadoc javah javap jdeps: $(JPRT_CLEAN) jtreg-tests $(JPRT_ARCHIVE_BUNDLE) jtreg-summary 247 @echo "Testing completed successfully" 248 249 jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary 250 @echo "Testing completed successfully" 251 252 jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary 253 @echo "Testing completed successfully" 254 255 # for use with JPRT -testrule 256 all: JTREG_TESTDIRS = . 257 jtreg: JTREG_TESTDIRS = . 258 apt: JTREG_TESTDIRS = tools/apt 259 javac: JTREG_TESTDIRS = tools/javac 260 javadoc: JTREG_TESTDIRS = tools/javadoc com/sun/javadoc 261 javah: JTREG_TESTDIRS = tools/javah 262 javap: JTREG_TESTDIRS = tools/javap 263 jdeps: JTREG_TESTDIRS = tools/jdeps 264 265 # Run jtreg tests 266 # 267 # JTREG_HOME 268 # Installed location of jtreg 269 # JT_JAVA 270 # Version of java used to run jtreg. Should normally be the same as TESTJAVA 271 # TESTJAVA 272 # Version of java to be tested. 273 # JTREG_VERBOSE 274 # Verbosity setting for jtreg 275 # JTREG_OPTIONS 276 # Additional options for jtreg 277 # JTREG_TESTDIRS 278 # Directories of tests to be run 279 # JTREG_OUTPUT_DIR 280 # Where to write the results 281 # JTREG_REFERENCE 282 # (Optional) reference results (e.g. work, report or summary.txt) 283 # 284 jtreg_tests: jtreg-tests | 69 endif 70 71 # Root of this test area (important to use full paths in some places) 72 TEST_ROOT := $(shell pwd $(CYGPATH) ) 73 74 # Default bundle of all test results (passed or not) (JPRT only) 75 ifdef JPRT_JOB_ID 76 JPRT_CLEAN = clean 77 JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip 78 endif 79 80 ifeq ($(PLATFORM), windows) 81 SLASH_JAVA = J: 82 else 83 SLASH_JAVA = /java 84 endif 85 86 # Default JTREG to run 87 ifdef JPRT_JTREG_HOME 88 JTREG_HOME = $(JPRT_JTREG_HOME) 89 else ifdef JT_HOME 90 JTREG_HOME = $(JT_HOME) 91 else 92 JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1-jigsaw/nightly/binaries/jtreg/ 93 endif 94 JTREG = $(JTREG_HOME)/bin/jtreg 95 JTDIFF = $(JTREG_HOME)/bin/jtdiff 96 97 # Problematic tests to be excluded 98 PROBLEM_LISTS=ProblemList.txt 99 100 # Create exclude list for this platform and arch 101 ifdef NO_EXCLUDES 102 JTREG_EXCLUSIONS = 103 else 104 JTREG_EXCLUSIONS = $(PROBLEM_LISTS:%=-exclude:%) 105 endif 106 107 # Default JCK to run 108 ifdef JPRT_JCK_HOME 109 JCK_HOME = $(JPRT_JCK_HOME) 110 else 111 JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries 112 endif 113 114 # Default JDK for JTREG and JCK 115 # 116 # JT_JAVA is the version of java used to run jtreg/JCK. 117 # 118 ifndef JT_JAVA 119 ifdef JPRT_JAVA_HOME 120 JT_JAVA = $(JPRT_JAVA_HOME) 121 else 122 JT_JAVA = $(SLASH_JAVA)/re/jdk/1.9.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH) 123 endif 124 endif 125 126 # Default JDK to test 127 ifdef JPRT_IMPORT_PRODUCT_HOME 128 TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME) 129 else 130 TESTJAVA = $(SLASH_JAVA)/re/jdk/1.9.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH) 131 endif 132 133 # PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from 134 # make/Makefile 135 # For langtools, this is a directory containing build and dist 136 # For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image 137 # (i.e, j2sdk-image or jdk-module-image) 138 ifdef PRODUCT_HOME 139 ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0) 140 TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar 141 endif 142 ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0) 143 TESTJAVA = $(PRODUCT_HOME) 144 endif 145 endif 146 147 ifdef TESTBOOTCLASSPATH 148 JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH) 149 ### In the following, -refvmoptions is an undocumented option 150 ### The following does not work JCK 7 b30 2/6/2010. Awaiting b31. 151 JCK_OPTIONS += \ 152 -vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \ 153 -refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) 154 endif 155 156 ifdef EXTRA_JTREG_OPTIONS 157 JTREG_OPTIONS += $(EXTRA_JTREG_OPTIONS) 158 endif 159 160 # Concurrency is the number of tests that can execute at once. 161 # On an otherwise empty machine, suggest setting to (#cpus + 2) 162 # If unset, the default is (#cpus) 163 ### RFE: determine and use #cpus 164 ifdef CONCURRENCY 165 JTREG_OPTIONS += -agentvm -concurrency:$(CONCURRENCY) 166 else 167 JTREG_OPTIONS += -agentvm 168 endif 169 170 ifdef JCK_CONCURRENCY 171 JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY) 172 endif 173 174 # JCK is executed using "Multi-JVM Group Mode", which is a hybrid 175 # of otherVM and sameVM modes. New JVMs are created and reused for 176 # a number of tests, then eventually discarded and a new one started. 177 # This amortizes the JVM startup time. The "group size" defines 178 # how many tests are run in a JVM before it is replaced. 179 # If unset, the default is 100. 253 254 jtreg apt javac javadoc javah javap jdeps: $(JPRT_CLEAN) jtreg-tests $(JPRT_ARCHIVE_BUNDLE) jtreg-summary 255 @echo "Testing completed successfully" 256 257 jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary 258 @echo "Testing completed successfully" 259 260 jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary 261 @echo "Testing completed successfully" 262 263 # for use with JPRT -testrule 264 all: JTREG_TESTDIRS = . 265 jtreg: JTREG_TESTDIRS = . 266 apt: JTREG_TESTDIRS = tools/apt 267 javac: JTREG_TESTDIRS = tools/javac 268 javadoc: JTREG_TESTDIRS = tools/javadoc com/sun/javadoc 269 javah: JTREG_TESTDIRS = tools/javah 270 javap: JTREG_TESTDIRS = tools/javap 271 jdeps: JTREG_TESTDIRS = tools/jdeps 272 273 # a way to select jtreg tests from outside 274 ifdef TEST_SELECTION 275 JTREG_TESTDIRS = $(TEST_SELECTION) 276 endif 277 278 279 # Run jtreg tests 280 # 281 # JTREG_HOME 282 # Installed location of jtreg 283 # JT_JAVA 284 # Version of java used to run jtreg. Should normally be the same as TESTJAVA 285 # TESTJAVA 286 # Version of java to be tested. 287 # JTREG_VERBOSE 288 # Verbosity setting for jtreg 289 # JTREG_OPTIONS 290 # Additional options for jtreg 291 # JTREG_TESTDIRS 292 # Directories of tests to be run 293 # JTREG_OUTPUT_DIR 294 # Where to write the results 295 # JTREG_REFERENCE 296 # (Optional) reference results (e.g. work, report or summary.txt) 297 # 298 jtreg_tests: jtreg-tests |