annotate test/Makefile @ 3695:c510a9417516

Added tag jdk8u192-b05 for changeset 6c91965b2ac2
author diazhou
date Mon, 06 Aug 2018 23:10:32 -0700
parents 5e9879dfadde
children 6cbe1580e9e2
rev   line source
duke@0 1 #
jjg@525 2 # Makefile to run jtreg and other tests
duke@0 3 #
duke@0 4
jjg@525 5 # Product builds and langtools builds
jjg@525 6 #
jjg@525 7 # A full product build (or "control" build) creates a complete JDK image.
jjg@525 8 # To test a product build, set TESTJAVA to the path for the image.
jjg@525 9 #
mduigou@2072 10 # A langtools build just builds the langtools components of a JDK.
jjg@525 11 # To test a langtools build, set TESTJAVA to the path for a recent JDK
jjg@525 12 # build, and set TESTBOOTCLASSPATH to the compiled langtools classes --
jjg@525 13 # for example build/classes or dist/lib/classes.jar.
jjg@525 14
jjg@525 15 # JPRT
jjg@525 16 # JPRT may invoke this Makefile directly, as part of a langtools build,
jjg@525 17 # or indirectly, via FOREST/test/Makefile, as part of a control build.
jjg@525 18
duke@0 19 # Get OS/ARCH specifics
duke@0 20 OSNAME = $(shell uname -s)
duke@0 21 ifeq ($(OSNAME), SunOS)
jjh@1123 22 SLASH_JAVA = /java
duke@0 23 PLATFORM = solaris
duke@0 24 ARCH = $(shell uname -p)
duke@0 25 ifeq ($(ARCH), i386)
duke@0 26 ARCH=i586
duke@0 27 endif
duke@0 28 endif
duke@0 29 ifeq ($(OSNAME), Linux)
jjh@1123 30 SLASH_JAVA = /java
duke@0 31 PLATFORM = linux
duke@0 32 ARCH = $(shell uname -m)
duke@0 33 ifeq ($(ARCH), i386)
duke@0 34 ARCH=i586
duke@0 35 endif
duke@0 36 endif
michaelm@1222 37 ifeq ($(OSNAME), Darwin)
michaelm@1222 38 PLATFORM = bsd
michaelm@1222 39 ARCH = $(shell uname -m)
michaelm@1222 40 ifeq ($(ARCH), i386)
michaelm@1222 41 ARCH=i586
michaelm@1222 42 endif
michaelm@1222 43 endif
duke@0 44 ifeq ($(OSNAME), Windows_NT)
jjh@1123 45 # MKS
jjh@1123 46 PLATFORM=windows
jjh@1123 47 endif
jjh@1123 48 ifeq ($(PLATFORM),)
duke@0 49 PLATFORM = windows
jjh@1123 50 CYGPATH = | cygpath -m -s -f -
jjh@1123 51 endif
jjh@1123 52
jjh@1123 53 ifeq ($(PLATFORM), windows)
jjh@1123 54 SLASH_JAVA = J:
duke@0 55 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
duke@0 56 ARCH=ia64
duke@0 57 else
duke@0 58 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
duke@0 59 ARCH=x64
duke@0 60 else
duke@0 61 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
duke@0 62 ARCH=x64
duke@0 63 else
duke@0 64 ARCH=i586
duke@0 65 endif
duke@0 66 endif
duke@0 67 endif
jjg@564 68 EXE_SUFFIX=.exe
duke@0 69 endif
duke@0 70
duke@0 71 # Root of this test area (important to use full paths in some places)
jjh@1123 72 TEST_ROOT := $(shell pwd $(CYGPATH) )
duke@0 73
jjg@525 74 # Default bundle of all test results (passed or not) (JPRT only)
jjg@525 75 ifdef JPRT_JOB_ID
jjg@525 76 JPRT_CLEAN = clean
jjg@525 77 JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
jjg@525 78 endif
duke@0 79
duke@0 80 ifeq ($(PLATFORM), windows)
duke@0 81 SLASH_JAVA = J:
duke@0 82 else
duke@0 83 SLASH_JAVA = /java
duke@0 84 endif
duke@0 85
duke@0 86 # Default JTREG to run
jjg@396 87 ifdef JPRT_JTREG_HOME
jjg@396 88 JTREG_HOME = $(JPRT_JTREG_HOME)
jjg@396 89 else
jjh@1123 90 JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
jjg@396 91 endif
jjg@2848 92 JTREG = $(JTREG_HOME)/bin/jtreg
jjg@2848 93 JTDIFF = $(JTREG_HOME)/bin/jtdiff
duke@0 94
jjg@525 95 # Default JCK to run
jjg@525 96 ifdef JPRT_JCK_HOME
jjg@525 97 JCK_HOME = $(JPRT_JCK_HOME)
jjg@525 98 else
jjh@1123 99 JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
jjg@525 100 endif
jjg@525 101
jjg@525 102 # Default JDK for JTREG and JCK
jjg@525 103 #
jjg@525 104 # JT_JAVA is the version of java used to run jtreg/JCK. Since it is now
jjg@525 105 # standard to execute tests in sameVM mode, it should normally be set the
jjg@525 106 # same as TESTJAVA (although not necessarily so.)
jjg@525 107 #
duke@0 108 ifdef JPRT_JAVA_HOME
duke@0 109 JT_JAVA = $(JPRT_JAVA_HOME)
duke@0 110 else
jjh@1123 111 JT_JAVA = $(SLASH_JAVA)/re/jdk/1.7.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
duke@0 112 endif
duke@0 113
duke@0 114 # Default JDK to test
jjg@396 115 ifdef JPRT_IMPORT_PRODUCT_HOME
jjg@396 116 TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME)
jjg@396 117 else
jjg@396 118 TESTJAVA = $(SLASH_JAVA)/re/jdk/1.7.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH)
jjg@396 119 endif
jjg@396 120
mduigou@2072 121 # PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from
jjg@525 122 # make/Makefile
jjg@525 123 # For langtools, this is a directory containing build and dist
mduigou@2072 124 # For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image
jjg@564 125 # (i.e, j2sdk-image or jdk-module-image)
jjg@525 126 ifdef PRODUCT_HOME
jjg@525 127 ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0)
jjg@525 128 TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar
jjg@525 129 endif
jjg@564 130 ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0)
jjg@525 131 TESTJAVA = $(PRODUCT_HOME)
jjg@525 132 endif
jjg@525 133 endif
jjg@525 134
jjg@525 135 ifdef TESTBOOTCLASSPATH
jjg@525 136 JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH)
jjg@525 137 ### In the following, -refvmoptions is an undocumented option
mduigou@2072 138 ### The following does not work JCK 7 b30 2/6/2010. Awaiting b31.
jjg@525 139 JCK_OPTIONS += \
jjg@525 140 -vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \
jjg@525 141 -refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH)
jjg@525 142 endif
jjg@525 143
mduigou@2072 144 # Concurrency is the number of tests that can execute at once.
jjg@525 145 # On an otherwise empty machine, suggest setting to (#cpus + 2)
jjg@525 146 # If unset, the default is (#cpus)
jjg@525 147 ### RFE: determine and use #cpus
jjh@1413 148 ifdef CONCURRENCY
jjh@1413 149 JTREG_OPTIONS += -agentvm -concurrency:$(CONCURRENCY)
jjh@1413 150 else
jjh@1413 151 JTREG_OPTIONS += -samevm
jjh@1413 152 endif
jjh@1413 153
jjg@525 154 ifdef JCK_CONCURRENCY
jjg@525 155 JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY)
jjg@525 156 endif
jjg@525 157
jjg@525 158 # JCK is executed using "Multi-JVM Group Mode", which is a hybrid
jjg@525 159 # of otherVM and sameVM modes. New JVMs are created and reused for
jjg@525 160 # a number of tests, then eventually discarded and a new one started.
jjg@525 161 # This amortizes the JVM startup time. The "group size" defines
jjg@525 162 # how many tests are run in a JVM before it is replaced.
jjg@525 163 # If unset, the default is 100.
jjg@525 164 JCK_GROUP_SIZE = 1000
jjg@525 165 ifdef JCK_GROUP_SIZE
jjg@525 166 JCK_COMPILER_OPTIONS += \
jjg@525 167 -jtoptions:-Ejck.env.compiler.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE) \
jjg@525 168 -jtoptions:-Ejck.env.compiler.compRefExecute.groupMode.groupSize=$(JCK_GROUP_SIZE)
jjg@525 169 ### The following is not supported. Awaiting RFE 6924287
jjg@525 170 ### 6924287: Jck4Jdk: Allow to configure test group size for group mode via simple command line option
jjg@525 171 ### JCK_RUNTIME_OPTIONS += \
jjg@525 172 ### -jtoptions:-Ejck.env.runtime.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE)
jjg@525 173 endif
jjg@525 174
jjg@559 175 # Timeouts -- by default, increase test timeouts when running on JPRT
jjg@559 176 ifdef JPRT_JOB_ID
jjg@559 177 ifndef JTREG_TIMEOUT_FACTOR
jjg@559 178 JTREG_TIMEOUT_FACTOR = 3
jjg@559 179 endif
jjg@559 180 endif
jjg@559 181 ifdef JTREG_TIMEOUT_FACTOR
jjg@559 182 JTREG_OPTIONS += -timeoutFactor:$(JTREG_TIMEOUT_FACTOR)
jjg@559 183 endif
jjg@559 184
dlsmith@2416 185 # Default verbosity setting for jtreg
dlsmith@2416 186 JTREG_VERBOSE = fail,error,nopass
dlsmith@2416 187
dlsmith@2416 188 # Default verbosity setting for jck
dlsmith@2416 189 JCK_VERBOSE = non-pass
dlsmith@2416 190
jjg@525 191 # Assertions: some tests show failures when assertions are enabled.
jjg@525 192 # Since javac is typically loaded via the bootclassloader (either via TESTJAVA
jjg@525 193 # or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac.
jjg@525 194 JTREG_OPTIONS += $(ASSERTION_OPTIONS)
jjg@525 195 JCK_OPTIONS += $(ASSERTION_OPTIONS:%=-vmoptions:%)
jjg@525 196
jjg@525 197 # Include shared options
jjg@525 198 JCK_COMPILER_OPTIONS += $(JCK_OPTIONS)
jjg@525 199 JCK_RUNTIME_OPTIONS += $(JCK_OPTIONS)
jjg@525 200
jjg@525 201 # Exit codes:
jjg@525 202 # jtreg, jck: 0: OK, 1: tests failed, 2: tests error; 3+: SERIOUS
jjg@525 203 FATAL_JTREG_EXIT = 3
jjg@525 204 FATAL_JCK_EXIT = 3
jjg@525 205 # jtdiff: 0: OK, 1: differences found; 2+: SERIOUS
jjg@525 206 FATAL_JTDIFF_EXIT = 2
jjg@525 207 #
jjg@525 208 # Exit -- used for final "normal" exit from "make". Redefine to "true" to avoid
jjg@525 209 # having make exit with non-zero return code.
jjg@525 210 EXIT = exit
mduigou@2072 211 # Function to exit shell if exit code of preceding command is greater than or equal
jjg@525 212 # to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
jjg@525 213 EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
duke@0 214
duke@0 215 # The test directories to run
duke@0 216 DEFAULT_TESTDIRS = .
duke@0 217 TESTDIRS = $(DEFAULT_TESTDIRS)
duke@0 218
duke@0 219 # Root of all test results
jjg@525 220 TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
jjg@525 221 ABS_TEST_OUTPUT_DIR := \
mduigou@2072 222 $(shell mkdir -p $(TEST_OUTPUT_DIR); \
mduigou@2072 223 cd $(TEST_OUTPUT_DIR); \
jjh@1123 224 pwd $(CYGPATH))
jjg@525 225 # Subdirectories for different test runs
jjg@525 226 JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
jjg@525 227 JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
jjg@525 228 JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
duke@0 229
jjg@525 230 # Default make rule -- warning, may take a while
jjg@525 231 all: $(JPRT_CLEAN) jtreg-tests jck-compiler-tests jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) all-summary
jjg@525 232 @echo "Testing completed successfully"
jjg@525 233
mchung@1471 234 jtreg apt javac javadoc javah javap jdeps: $(JPRT_CLEAN) jtreg-tests $(JPRT_ARCHIVE_BUNDLE) jtreg-summary
jjg@525 235 @echo "Testing completed successfully"
jjg@525 236
jjg@525 237 jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary
jjg@525 238 @echo "Testing completed successfully"
jjg@525 239
jjg@525 240 jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
duke@0 241 @echo "Testing completed successfully"
duke@0 242
duke@0 243 # for use with JPRT -testrule
jjg@525 244 all: JTREG_TESTDIRS = .
jjg@525 245 jtreg: JTREG_TESTDIRS = .
jjg@525 246 apt: JTREG_TESTDIRS = tools/apt
jjg@525 247 javac: JTREG_TESTDIRS = tools/javac
jjg@525 248 javadoc: JTREG_TESTDIRS = tools/javadoc com/sun/javadoc
jjg@525 249 javah: JTREG_TESTDIRS = tools/javah
jjg@525 250 javap: JTREG_TESTDIRS = tools/javap
mchung@1471 251 jdeps: JTREG_TESTDIRS = tools/jdeps
jjg@525 252
jjg@525 253 # Run jtreg tests
jjg@525 254 #
jjg@525 255 # JTREG_HOME
jjg@525 256 # Installed location of jtreg
jjg@525 257 # JT_JAVA
jjg@525 258 # Version of java used to run jtreg. Should normally be the same as TESTJAVA
jjg@525 259 # TESTJAVA
mduigou@2072 260 # Version of java to be tested.
dlsmith@2416 261 # JTREG_VERBOSE
dlsmith@2416 262 # Verbosity setting for jtreg
jjg@525 263 # JTREG_OPTIONS
jjg@525 264 # Additional options for jtreg
jjg@525 265 # JTREG_TESTDIRS
jjg@525 266 # Directories of tests to be run
jjg@525 267 # JTREG_OUTPUT_DIR
jjg@525 268 # Where to write the results
jjg@525 269 # JTREG_REFERENCE
jjg@525 270 # (Optional) reference results (e.g. work, report or summary.txt)
jjg@525 271 #
michaelm@1222 272 jtreg_tests: jtreg-tests
jjg@525 273 jtreg-tests: check-jtreg FRC
jjg@525 274 @rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
jjg@525 275 $(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
jjg@525 276 @mkdir -p $(JTREG_OUTPUT_DIR)
jjg@525 277 JT_JAVA=$(JT_JAVA) $(JTREG) \
jjg@525 278 -J-Xmx512m \
vromero@1519 279 -vmoption:-Xmx768m \
dlsmith@2416 280 -a -ignore:quiet $(if $(JTREG_VERBOSE),-v:$(JTREG_VERBOSE)) \
jjg@525 281 -r:$(JTREG_OUTPUT_DIR)/JTreport \
jjg@525 282 -w:$(JTREG_OUTPUT_DIR)/JTwork \
jjg@525 283 -jdk:$(TESTJAVA) \
jjg@525 284 $(JAVA_ARGS:%=-vmoption:%) \
jjg@525 285 $(JTREG_OPTIONS) \
jjg@525 286 $(JTREG_TESTDIRS) \
jjg@525 287 || ( $(call EXIT_IF_FATAL,$(FATAL_JTREG_EXIT)) ; \
jjg@525 288 echo $$status > $(JTREG_OUTPUT_DIR)/status.txt \
jjg@525 289 )
jjg@525 290 ifdef JTREG_REFERENCE
jjg@525 291 JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JTREG_OUTPUT_DIR)/diff.html \
jjg@525 292 $(JTREG_REFERENCE) $(JTREG_OUTPUT_DIR)/JTreport \
jjg@525 293 || ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
jjg@525 294 endif
jjg@525 295
jjg@525 296 jtreg-summary: FRC
jjg@525 297 if [ -r $(JTREG_OUTPUT_DIR)/status.txt ]; then \
jjg@525 298 echo ; echo "Summary of jtreg test failures" ; \
jjg@525 299 cat $(JTREG_OUTPUT_DIR)/JTreport/text/summary.txt | \
jjg@525 300 grep -v 'Not run' | grep -v 'Passed' ; \
jjg@525 301 echo ; \
jjg@525 302 $(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \
jjg@525 303 fi
duke@0 304
duke@0 305 # Check to make sure these directories exist
jjh@1123 306 check-jtreg: $(PRODUCT_HOME) $(JTREG)
duke@0 307
jjg@525 308
jjg@525 309 # Run JCK-compiler tests
jjg@525 310 #
jjg@525 311 # JCK_HOME
jjg@525 312 # Installed location of JCK: should include JCK-compiler, and JCK-extras
jjh@1123 313 # Default is JCK 8.
jjg@525 314 # JT_JAVA
jjg@525 315 # Version of java used to run JCK. Should normally be the same as TESTJAVA
jjh@1123 316 # Default is JDK 7
jjg@525 317 # TESTJAVA
mduigou@2072 318 # Version of java to be tested.
dlsmith@2416 319 # JCK_VERBOSE
dlsmith@2416 320 # Verbosity setting for jtjck
jjg@525 321 # JCK_COMPILER_OPTIONS
jjg@525 322 # Additional options for JCK-compiler
jjg@525 323 # JCK_COMPILER_TESTDIRS
jjg@525 324 # Directories of tests to be run
jjg@525 325 # JCK_COMPILER_OUTPUT_DIR
jjg@525 326 # Where to write the results
jjg@525 327 # JCK_COMPILER_REFERENCE
jjg@525 328 # (Optional) reference results (e.g. work, report or summary.txt)
jjg@525 329 #
jjg@525 330 jck-compiler-tests: check-jck FRC
jjg@525 331 @rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \
jjg@525 332 $(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt
jjg@525 333 @mkdir -p $(JCK_COMPILER_OUTPUT_DIR)
dlsmith@2416 334 $(JT_JAVA)/bin/java -Xmx512m \
jjh@1123 335 -jar $(JCK_HOME)/JCK-compiler-8/lib/jtjck.jar \
dlsmith@2416 336 $(if $(JCK_VERBOSE),-v:$(JCK_VERBOSE)) \
jjg@525 337 -r:$(JCK_COMPILER_OUTPUT_DIR)/report \
jjg@525 338 -w:$(JCK_COMPILER_OUTPUT_DIR)/work \
jjg@525 339 -jdk:$(TESTJAVA) \
jjg@525 340 $(JCK_COMPILER_OPTIONS) \
jjg@525 341 $(JCK_COMPILER_TESTDIRS) \
jjg@525 342 || ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
jjg@525 343 echo $$status > $(JCK_COMPILER_OUTPUT_DIR)/status.txt \
jjg@525 344 )
jjg@525 345 ifdef JCK_COMPILER_REFERENCE
jjg@525 346 JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_COMPILER_OUTPUT_DIR)/diff.html \
jjg@525 347 $(JCK_COMPILER_REFERENCE) $(JCK_COMPILER_OUTPUT_DIR)/report \
jjg@525 348 || ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
jjg@525 349 endif
jjg@525 350
jjg@525 351 jck-compiler-summary: FRC
jjg@525 352 if [ -r $(JCK_COMPILER_OUTPUT_DIR)/status.txt ]; then \
jjg@525 353 echo ; echo "Summary of JCK-compiler test failures" ; \
jjg@525 354 cat $(JCK_COMPILER_OUTPUT_DIR)/report/text/summary.txt | \
jjg@525 355 grep -v 'Not run' | grep -v 'Passed' ; \
jjg@525 356 echo ; \
jjg@525 357 $(EXIT) `cat $(JCK_COMPILER_OUTPUT_DIR)/status.txt` ; \
jjg@525 358 fi
jjg@525 359
jjg@525 360 # Run JCK-runtime tests in -Xcompile mode
jjg@525 361 # This is a special mode to test javac by compiling the tests in the JCK-runtime test suite
jjg@525 362 # Normal JCK-runtime invocation belongs in the jdk/ repository.
jjg@525 363 #
jjg@525 364 # JCK_HOME
jjg@525 365 # Installed location of JCK: should include JCK-compiler, JCK-runtime and JCK-extras
jjg@525 366 # JT_JAVA
jjg@525 367 # Version of java used to run JCK. Should normally be the same as TESTJAVA
jjg@525 368 # TESTJAVA
mduigou@2072 369 # Version of java to be tested.
dlsmith@2416 370 # JCK_VERBOSE
dlsmith@2416 371 # Verbosity setting for jtjck
jjg@525 372 # JCK_RUNTIME_OPTIONS
jjg@525 373 # Additional options for JCK-runtime
jjg@525 374 # JCK_RUNTIME_TESTDIRS
jjg@525 375 # Directories of tests to be run
jjg@525 376 # JCK_RUNTIME_OUTPUT_DIR
jjg@525 377 # Where to write the results
jjg@525 378 # JCK_RUNTIME_REFERENCE
jjg@525 379 # (Optional) reference results (e.g. work, report or summary.txt)
jjg@525 380 #
jjg@525 381 jck-runtime-tests: check-jck FRC
jjg@525 382 @rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \
jjg@525 383 $(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt
jjg@525 384 @mkdir -p $(JCK_RUNTIME_OUTPUT_DIR)
dlsmith@2416 385 $(JT_JAVA)/bin/java -Xmx512m \
jjh@1123 386 -jar $(JCK_HOME)/JCK-runtime-8/lib/jtjck.jar \
dlsmith@2416 387 $(if $(JCK_VERBOSE),-v:$(JCK_VERBOSE)) \
jjg@525 388 -r:$(JCK_RUNTIME_OUTPUT_DIR)/report \
jjg@525 389 -w:$(JCK_RUNTIME_OUTPUT_DIR)/work \
jjg@525 390 -jdk:$(TESTJAVA) \
jjg@525 391 -Xcompile \
jjg@525 392 $(JCK_RUNTIME_OPTIONS) \
jjg@525 393 $(JCK_RUNTIME_TESTDIRS) \
jjg@525 394 || ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
jjg@525 395 echo $$status > $(JCK_RUNTIME_OUTPUT_DIR)/status.txt \
jjg@525 396 )
jjg@525 397 ifdef JCK_RUNTIME_REFERENCE
jjg@525 398 JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_RUNTIME_OUTPUT_DIR)/diff.html \
jjg@525 399 $(JCK_RUNTIME_REFERENCE) $(JCK_RUNTIME_OUTPUT_DIR)/report \
jjg@525 400 || ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
jjg@525 401 endif
jjg@525 402
jjg@525 403 jck-runtime-summary: FRC
jjg@525 404 if [ -r $(JCK_RUNTIME_OUTPUT_DIR)/status.txt ]; then \
jjg@525 405 echo ; echo "Summary of JCK-runtime test failures" ; \
jjg@525 406 cat $(JCK_RUNTIME_OUTPUT_DIR)/report/text/summary.txt | \
jjg@525 407 grep -v 'Not run' | grep -v 'Passed' ; \
jjg@525 408 echo ; \
jjg@525 409 $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
jjg@525 410 fi
jjg@525 411
jjg@525 412 # Check to make sure these directories exist
jjh@1123 413 check-jck: $(JCK_HOME) $(PRODUCT_HOME)
jjg@525 414
jjg@525 415 all-summary: FRC
jjg@525 416 if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then
jjg@525 417 echo ; echo "Summary of test failures" ; \
jjg@525 418 cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \
jjg@525 419 grep -v 'Not run' | grep -v 'Passed' ; \
jjg@525 420 echo ; \
jjg@525 421 $(EXIT) 1
jjg@525 422 fi
duke@0 423
duke@0 424 # Bundle up the results
duke@0 425 $(JPRT_ARCHIVE_BUNDLE): FRC
duke@0 426 @rm -f $@
duke@0 427 @mkdir -p $(@D)
duke@0 428 ( cd $(TEST_OUTPUT_DIR) && zip -q -r $@ . )
duke@0 429
duke@0 430 # Cleanup
duke@0 431 clean:
duke@0 432 rm -f $(JPRT_ARCHIVE_BUNDLE)
duke@0 433
duke@0 434 # Used to force a target rules to run
duke@0 435 FRC:
duke@0 436
duke@0 437 # Phony targets (e.g. these are not filenames)
jjg@525 438 .PHONY: all clean \
mchung@1471 439 jtreg javac javadoc javah javap jdeps jtreg-tests jtreg-summary check-jtreg \
jjg@525 440 jck-compiler jck-compiler-tests jck-compiler-summary \
jjg@525 441 jck-runtime jck-runtime-tests jck-runtime-summary check-jck
duke@0 442
jjg@525 443 # No use of suffix rules
jjg@525 444 .SUFFIXES:
jjg@525 445