test/Makefile

Fri, 01 Aug 2014 11:06:04 +0100

author
coffeys
date
Fri, 01 Aug 2014 11:06:04 +0100
changeset 2633
ca516bc459f6
parent 2393
5e9879dfadde
child 2525
2eb010b6cb22
child 2806
d35c539d0e6d
permissions
-rw-r--r--

Merge

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

mercurial