test/Makefile

Tue, 01 Nov 2011 15:49:45 -0700

author
jjh
date
Tue, 01 Nov 2011 15:49:45 -0700
changeset 1124
9e2eb4bc49eb
parent 565
e9d66d392a8d
child 1223
f3743b82945e
permissions
-rw-r--r--

7101933: langtools jtreg tests do not work with jprt on windows
Summary: Fixed langtools/test/Makefile to work on cygwin. Updated jtreg to 4.1 and JCK to JCK8.
Reviewed-by: jjg, ohair

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

mercurial