blob: 35313f1c30db598b61985b93e1f6f1a46f87aaaa [file] [log] [blame]
J. Dukef57b87e2007-12-01 00:00:00 +00001#
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -08002# Makefile to run jtreg and other tests
J. Dukef57b87e2007-12-01 00:00:00 +00003#
4
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -08005# Product builds and langtools builds
6#
7# A full product build (or "control" build) creates a complete JDK image.
8# To test a product build, set TESTJAVA to the path for the image.
9#
10# A langtools build just builds the langtools components of a JDK.
11# To test a langtools build, set TESTJAVA to the path for a recent JDK
12# build, and set TESTBOOTCLASSPATH to the compiled langtools classes --
13# for example build/classes or dist/lib/classes.jar.
14
15# JPRT
16# JPRT may invoke this Makefile directly, as part of a langtools build,
17# or indirectly, via FOREST/test/Makefile, as part of a control build.
18
J. Dukef57b87e2007-12-01 00:00:00 +000019# Get OS/ARCH specifics
20OSNAME = $(shell uname -s)
21ifeq ($(OSNAME), SunOS)
Jim Holmlunddae561e2011-11-01 15:49:45 -070022 SLASH_JAVA = /java
J. Dukef57b87e2007-12-01 00:00:00 +000023 PLATFORM = solaris
24 JT_PLATFORM = solaris
25 ARCH = $(shell uname -p)
26 ifeq ($(ARCH), i386)
27 ARCH=i586
28 endif
29endif
30ifeq ($(OSNAME), Linux)
Jim Holmlunddae561e2011-11-01 15:49:45 -070031 SLASH_JAVA = /java
J. Dukef57b87e2007-12-01 00:00:00 +000032 PLATFORM = linux
33 JT_PLATFORM = linux
34 ARCH = $(shell uname -m)
35 ifeq ($(ARCH), i386)
36 ARCH=i586
37 endif
38endif
Alan Bateman041b97a2012-03-06 20:27:12 +000039ifeq ($(OSNAME), Darwin)
40 PLATFORM = bsd
41 JT_PLATFORM = linux
42 ARCH = $(shell uname -m)
43 ifeq ($(ARCH), i386)
44 ARCH=i586
45 endif
46endif
J. Dukef57b87e2007-12-01 00:00:00 +000047ifeq ($(OSNAME), Windows_NT)
Jim Holmlunddae561e2011-11-01 15:49:45 -070048 # MKS
49 PLATFORM=windows
50endif
51ifeq ($(PLATFORM),)
J. Dukef57b87e2007-12-01 00:00:00 +000052 PLATFORM = windows
Jim Holmlunddae561e2011-11-01 15:49:45 -070053 CYGPATH = | cygpath -m -s -f -
54endif
55
56ifeq ($(PLATFORM), windows)
57 SLASH_JAVA = J:
J. Dukef57b87e2007-12-01 00:00:00 +000058 JT_PLATFORM = win32
59 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
60 ARCH=ia64
61 else
62 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
63 ARCH=x64
64 else
65 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
66 ARCH=x64
67 else
68 ARCH=i586
69 endif
70 endif
71 endif
Jonathan Gibbons1955a6c2010-05-21 17:32:19 -070072 EXE_SUFFIX=.exe
J. Dukef57b87e2007-12-01 00:00:00 +000073endif
74
75# Root of this test area (important to use full paths in some places)
Jim Holmlunddae561e2011-11-01 15:49:45 -070076TEST_ROOT := $(shell pwd $(CYGPATH) )
J. Dukef57b87e2007-12-01 00:00:00 +000077
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -080078# Default bundle of all test results (passed or not) (JPRT only)
79ifdef JPRT_JOB_ID
80 JPRT_CLEAN = clean
81 JPRT_ARCHIVE_BUNDLE = $(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
82endif
J. Dukef57b87e2007-12-01 00:00:00 +000083
J. Dukef57b87e2007-12-01 00:00:00 +000084ifeq ($(PLATFORM), windows)
85 SLASH_JAVA = J:
86else
87 SLASH_JAVA = /java
88endif
89
90# Default JTREG to run
Jonathan Gibbons98fa57b32009-09-01 11:35:00 -070091ifdef JPRT_JTREG_HOME
92 JTREG_HOME = $(JPRT_JTREG_HOME)
93else
Jim Holmlunddae561e2011-11-01 15:49:45 -070094 JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
Jonathan Gibbons98fa57b32009-09-01 11:35:00 -070095endif
96JTREG = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtreg
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -080097JTDIFF = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtdiff
J. Dukef57b87e2007-12-01 00:00:00 +000098
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -080099# Default JCK to run
100ifdef JPRT_JCK_HOME
101 JCK_HOME = $(JPRT_JCK_HOME)
102else
Jim Holmlunddae561e2011-11-01 15:49:45 -0700103 JCK_HOME = $(SLASH_JAVA)/re/jck/8/promoted/latest/binaries
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800104endif
105
106# Default JDK for JTREG and JCK
107#
108# JT_JAVA is the version of java used to run jtreg/JCK. Since it is now
109# standard to execute tests in sameVM mode, it should normally be set the
110# same as TESTJAVA (although not necessarily so.)
111#
J. Dukef57b87e2007-12-01 00:00:00 +0000112ifdef JPRT_JAVA_HOME
113 JT_JAVA = $(JPRT_JAVA_HOME)
114else
Jim Holmlunddae561e2011-11-01 15:49:45 -0700115 JT_JAVA = $(SLASH_JAVA)/re/jdk/1.7.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
J. Dukef57b87e2007-12-01 00:00:00 +0000116endif
117
118# Default JDK to test
Jonathan Gibbons98fa57b32009-09-01 11:35:00 -0700119ifdef JPRT_IMPORT_PRODUCT_HOME
120 TESTJAVA = $(JPRT_IMPORT_PRODUCT_HOME)
121else
122 TESTJAVA = $(SLASH_JAVA)/re/jdk/1.7.0/promoted/latest/binaries/$(PLATFORM)-$(ARCH)
123endif
124
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800125# PRODUCT_HOME is a JPRT variable pointing to a directory containing the output from
126# make/Makefile
127# For langtools, this is a directory containing build and dist
Jonathan Gibbons1955a6c2010-05-21 17:32:19 -0700128# For a control build, this is build/$(PRODUCT)-$(ARCH)/XYZ-image
129# (i.e, j2sdk-image or jdk-module-image)
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800130ifdef PRODUCT_HOME
131 ifeq ($(shell [ -r $(PRODUCT_HOME)/dist/lib/classes.jar ]; echo $$?),0)
132 TESTBOOTCLASSPATH = $(PRODUCT_HOME)/dist/lib/classes.jar
133 endif
Jonathan Gibbons1955a6c2010-05-21 17:32:19 -0700134 ifeq ($(shell [ -r $(PRODUCT_HOME)/bin/javac$(EXE_SUFFIX) ]; echo $$?),0)
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800135 TESTJAVA = $(PRODUCT_HOME)
136 endif
137endif
138
139ifdef TESTBOOTCLASSPATH
140 JTREG_OPTIONS += -Xbootclasspath/p:$(TESTBOOTCLASSPATH)
141### In the following, -refvmoptions is an undocumented option
142### The following does not work JCK 7 b30 2/6/2010. Awaiting b31.
143 JCK_OPTIONS += \
144 -vmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH) \
145 -refvmoptions:-Xbootclasspath/p:$(TESTBOOTCLASSPATH)
146endif
147
148# Concurrency is the number of tests that can execute at once.
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800149# On an otherwise empty machine, suggest setting to (#cpus + 2)
150# If unset, the default is (#cpus)
151### RFE: determine and use #cpus
Jim Holmlundc39f1d92012-11-16 18:27:36 +0000152ifdef CONCURRENCY
153 JTREG_OPTIONS += -agentvm -concurrency:$(CONCURRENCY)
154else
155 JTREG_OPTIONS += -samevm
156endif
157
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800158ifdef JCK_CONCURRENCY
159 JCK_OPTIONS += -concurrency:$(JCK_CONCURRENCY)
160endif
161
162# JCK is executed using "Multi-JVM Group Mode", which is a hybrid
163# of otherVM and sameVM modes. New JVMs are created and reused for
164# a number of tests, then eventually discarded and a new one started.
165# This amortizes the JVM startup time. The "group size" defines
166# how many tests are run in a JVM before it is replaced.
167# If unset, the default is 100.
168JCK_GROUP_SIZE = 1000
169ifdef JCK_GROUP_SIZE
170 JCK_COMPILER_OPTIONS += \
171 -jtoptions:-Ejck.env.compiler.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE) \
172 -jtoptions:-Ejck.env.compiler.compRefExecute.groupMode.groupSize=$(JCK_GROUP_SIZE)
173### The following is not supported. Awaiting RFE 6924287
174### 6924287: Jck4Jdk: Allow to configure test group size for group mode via simple command line option
175### JCK_RUNTIME_OPTIONS += \
176### -jtoptions:-Ejck.env.runtime.testCompile.groupMode.groupSize=$(JCK_GROUP_SIZE)
177endif
178
Jonathan Gibbons7648a5f2010-05-13 11:30:28 -0700179# Timeouts -- by default, increase test timeouts when running on JPRT
180ifdef JPRT_JOB_ID
181 ifndef JTREG_TIMEOUT_FACTOR
182 JTREG_TIMEOUT_FACTOR = 3
183 endif
184endif
185ifdef JTREG_TIMEOUT_FACTOR
186 JTREG_OPTIONS += -timeoutFactor:$(JTREG_TIMEOUT_FACTOR)
187endif
188
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800189# Assertions: some tests show failures when assertions are enabled.
190# Since javac is typically loaded via the bootclassloader (either via TESTJAVA
191# or TESTBOOTCLASSPATH), you may need -esa to enable assertions in javac.
192JTREG_OPTIONS += $(ASSERTION_OPTIONS)
193JCK_OPTIONS += $(ASSERTION_OPTIONS:%=-vmoptions:%)
194
195# Include shared options
196JCK_COMPILER_OPTIONS += $(JCK_OPTIONS)
197JCK_RUNTIME_OPTIONS += $(JCK_OPTIONS)
198
199# Exit codes:
200# jtreg, jck: 0: OK, 1: tests failed, 2: tests error; 3+: SERIOUS
201FATAL_JTREG_EXIT = 3
202FATAL_JCK_EXIT = 3
203# jtdiff: 0: OK, 1: differences found; 2+: SERIOUS
204FATAL_JTDIFF_EXIT = 2
205#
206# Exit -- used for final "normal" exit from "make". Redefine to "true" to avoid
207# having make exit with non-zero return code.
208EXIT = exit
209# Function to exit shell if exit code of preceding command is greater than or equal
210# to a given level. Redefine function or preceding FATAL_*_EXIT codes as needed.
211EXIT_IF_FATAL = status=$$?; if [ $$status -ge $(1) ]; then exit $$status ; fi
J. Dukef57b87e2007-12-01 00:00:00 +0000212
213# The test directories to run
214DEFAULT_TESTDIRS = .
215TESTDIRS = $(DEFAULT_TESTDIRS)
216
217# Root of all test results
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800218TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
219ABS_TEST_OUTPUT_DIR := \
220 $(shell mkdir -p $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
221 cd $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools; \
Jim Holmlunddae561e2011-11-01 15:49:45 -0700222 pwd $(CYGPATH))
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800223# Subdirectories for different test runs
224JTREG_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jtreg
225JCK_COMPILER_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-compiler
226JCK_RUNTIME_OUTPUT_DIR = $(ABS_TEST_OUTPUT_DIR)/jck-runtime-Xcompile
J. Dukef57b87e2007-12-01 00:00:00 +0000227
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800228# Default make rule -- warning, may take a while
229all: $(JPRT_CLEAN) jtreg-tests jck-compiler-tests jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) all-summary
230 @echo "Testing completed successfully"
231
Mandy Chunge8ce8822012-12-28 22:25:21 -0800232jtreg apt javac javadoc javah javap jdeps: $(JPRT_CLEAN) jtreg-tests $(JPRT_ARCHIVE_BUNDLE) jtreg-summary
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800233 @echo "Testing completed successfully"
234
235jck-compiler: $(JPRT_CLEAN) jck-compiler-tests $(JPRT_ARCHIVE_BUNDLE) jck-compiler-summary
236 @echo "Testing completed successfully"
237
238jck-runtime: $(JPRT_CLEAN) jck-runtime-tests $(JPRT_ARCHIVE_BUNDLE) jck-runtime-summary
J. Dukef57b87e2007-12-01 00:00:00 +0000239 @echo "Testing completed successfully"
240
241# for use with JPRT -testrule
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800242all: JTREG_TESTDIRS = .
243jtreg: JTREG_TESTDIRS = .
244apt: JTREG_TESTDIRS = tools/apt
245javac: JTREG_TESTDIRS = tools/javac
246javadoc: JTREG_TESTDIRS = tools/javadoc com/sun/javadoc
247javah: JTREG_TESTDIRS = tools/javah
248javap: JTREG_TESTDIRS = tools/javap
Mandy Chunge8ce8822012-12-28 22:25:21 -0800249jdeps: JTREG_TESTDIRS = tools/jdeps
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800250
251# Run jtreg tests
252#
253# JTREG_HOME
254# Installed location of jtreg
255# JT_JAVA
256# Version of java used to run jtreg. Should normally be the same as TESTJAVA
257# TESTJAVA
258# Version of java to be tested.
259# JTREG_OPTIONS
260# Additional options for jtreg
261# JTREG_TESTDIRS
262# Directories of tests to be run
263# JTREG_OUTPUT_DIR
264# Where to write the results
265# JTREG_REFERENCE
266# (Optional) reference results (e.g. work, report or summary.txt)
267#
Alan Bateman041b97a2012-03-06 20:27:12 +0000268jtreg_tests: jtreg-tests
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800269jtreg-tests: check-jtreg FRC
270 @rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
271 $(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
272 @mkdir -p $(JTREG_OUTPUT_DIR)
273 JT_JAVA=$(JT_JAVA) $(JTREG) \
274 -J-Xmx512m \
Maurizio Cimadamore5b1a78d2013-01-23 20:57:40 +0000275 -vmoption:-Xmx768m \
Jim Holmlundc39f1d92012-11-16 18:27:36 +0000276 -a -ignore:quiet -v:fail,error,nopass \
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800277 -r:$(JTREG_OUTPUT_DIR)/JTreport \
278 -w:$(JTREG_OUTPUT_DIR)/JTwork \
279 -jdk:$(TESTJAVA) \
280 $(JAVA_ARGS:%=-vmoption:%) \
281 $(JTREG_OPTIONS) \
282 $(JTREG_TESTDIRS) \
283 || ( $(call EXIT_IF_FATAL,$(FATAL_JTREG_EXIT)) ; \
284 echo $$status > $(JTREG_OUTPUT_DIR)/status.txt \
285 )
286ifdef JTREG_REFERENCE
287 JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JTREG_OUTPUT_DIR)/diff.html \
288 $(JTREG_REFERENCE) $(JTREG_OUTPUT_DIR)/JTreport \
289 || ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
290endif
291
292jtreg-summary: FRC
293 if [ -r $(JTREG_OUTPUT_DIR)/status.txt ]; then \
294 echo ; echo "Summary of jtreg test failures" ; \
295 cat $(JTREG_OUTPUT_DIR)/JTreport/text/summary.txt | \
296 grep -v 'Not run' | grep -v 'Passed' ; \
297 echo ; \
298 $(EXIT) `cat $(JTREG_OUTPUT_DIR)/status.txt` ; \
299 fi
J. Dukef57b87e2007-12-01 00:00:00 +0000300
301# Check to make sure these directories exist
Jim Holmlunddae561e2011-11-01 15:49:45 -0700302check-jtreg: $(PRODUCT_HOME) $(JTREG)
J. Dukef57b87e2007-12-01 00:00:00 +0000303
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800304
305# Run JCK-compiler tests
306#
307# JCK_HOME
308# Installed location of JCK: should include JCK-compiler, and JCK-extras
Jim Holmlunddae561e2011-11-01 15:49:45 -0700309# Default is JCK 8.
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800310# JT_JAVA
311# Version of java used to run JCK. Should normally be the same as TESTJAVA
Jim Holmlunddae561e2011-11-01 15:49:45 -0700312# Default is JDK 7
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800313# TESTJAVA
314# Version of java to be tested.
315# JCK_COMPILER_OPTIONS
316# Additional options for JCK-compiler
317# JCK_COMPILER_TESTDIRS
318# Directories of tests to be run
319# JCK_COMPILER_OUTPUT_DIR
320# Where to write the results
321# JCK_COMPILER_REFERENCE
322# (Optional) reference results (e.g. work, report or summary.txt)
323#
324jck-compiler-tests: check-jck FRC
325 @rm -f -r $(JCK_COMPILER_OUTPUT_DIR)/work $(JCK_COMPILER_OUTPUT_DIR)/report \
326 $(JCK_COMPILER_OUTPUT_DIR)/diff.html $(JCK_COMPILER_OUTPUT_DIR)/status.txt
327 @mkdir -p $(JCK_COMPILER_OUTPUT_DIR)
328 $(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \
Jim Holmlunddae561e2011-11-01 15:49:45 -0700329 -jar $(JCK_HOME)/JCK-compiler-8/lib/jtjck.jar \
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800330 -v:non-pass \
331 -r:$(JCK_COMPILER_OUTPUT_DIR)/report \
332 -w:$(JCK_COMPILER_OUTPUT_DIR)/work \
333 -jdk:$(TESTJAVA) \
334 $(JCK_COMPILER_OPTIONS) \
335 $(JCK_COMPILER_TESTDIRS) \
336 || ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
337 echo $$status > $(JCK_COMPILER_OUTPUT_DIR)/status.txt \
338 )
339ifdef JCK_COMPILER_REFERENCE
340 JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_COMPILER_OUTPUT_DIR)/diff.html \
341 $(JCK_COMPILER_REFERENCE) $(JCK_COMPILER_OUTPUT_DIR)/report \
342 || ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
343endif
344
345jck-compiler-summary: FRC
346 if [ -r $(JCK_COMPILER_OUTPUT_DIR)/status.txt ]; then \
347 echo ; echo "Summary of JCK-compiler test failures" ; \
348 cat $(JCK_COMPILER_OUTPUT_DIR)/report/text/summary.txt | \
349 grep -v 'Not run' | grep -v 'Passed' ; \
350 echo ; \
351 $(EXIT) `cat $(JCK_COMPILER_OUTPUT_DIR)/status.txt` ; \
352 fi
353
354# Run JCK-runtime tests in -Xcompile mode
355# This is a special mode to test javac by compiling the tests in the JCK-runtime test suite
356# Normal JCK-runtime invocation belongs in the jdk/ repository.
357#
358# JCK_HOME
359# Installed location of JCK: should include JCK-compiler, JCK-runtime and JCK-extras
360# JT_JAVA
361# Version of java used to run JCK. Should normally be the same as TESTJAVA
362# TESTJAVA
363# Version of java to be tested.
364# JCK_RUNTIME_OPTIONS
365# Additional options for JCK-runtime
366# JCK_RUNTIME_TESTDIRS
367# Directories of tests to be run
368# JCK_RUNTIME_OUTPUT_DIR
369# Where to write the results
370# JCK_RUNTIME_REFERENCE
371# (Optional) reference results (e.g. work, report or summary.txt)
372#
373jck-runtime-tests: check-jck FRC
374 @rm -f -r $(JCK_RUNTIME_OUTPUT_DIR)/work $(JCK_RUNTIME_OUTPUT_DIR)/report \
375 $(JCK_RUNTIME_OUTPUT_DIR)/diff.html $(JCK_RUNTIME_OUTPUT_DIR)/status.txt
376 @mkdir -p $(JCK_RUNTIME_OUTPUT_DIR)
377 $(JT_JAVA)/bin/java -XX:MaxPermSize=256m -Xmx512m \
Jim Holmlunddae561e2011-11-01 15:49:45 -0700378 -jar $(JCK_HOME)/JCK-runtime-8/lib/jtjck.jar \
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800379 -v:non-pass \
380 -r:$(JCK_RUNTIME_OUTPUT_DIR)/report \
381 -w:$(JCK_RUNTIME_OUTPUT_DIR)/work \
382 -jdk:$(TESTJAVA) \
383 -Xcompile \
384 $(JCK_RUNTIME_OPTIONS) \
385 $(JCK_RUNTIME_TESTDIRS) \
386 || ( $(call EXIT_IF_FATAL,$(FATAL_JCK_EXIT)) ; \
387 echo $$status > $(JCK_RUNTIME_OUTPUT_DIR)/status.txt \
388 )
389ifdef JCK_RUNTIME_REFERENCE
390 JT_JAVA=$(JT_JAVA) $(JTDIFF) -o $(JCK_RUNTIME_OUTPUT_DIR)/diff.html \
391 $(JCK_RUNTIME_REFERENCE) $(JCK_RUNTIME_OUTPUT_DIR)/report \
392 || ( $(call EXIT_IF_FATAL,$(FATAL_JTDIFF_EXIT)) )
393endif
394
395jck-runtime-summary: FRC
396 if [ -r $(JCK_RUNTIME_OUTPUT_DIR)/status.txt ]; then \
397 echo ; echo "Summary of JCK-runtime test failures" ; \
398 cat $(JCK_RUNTIME_OUTPUT_DIR)/report/text/summary.txt | \
399 grep -v 'Not run' | grep -v 'Passed' ; \
400 echo ; \
401 $(EXIT) `cat $(JCK_RUNTIME_OUTPUT_DIR)/status.txt` ; \
402 fi
403
404# Check to make sure these directories exist
Jim Holmlunddae561e2011-11-01 15:49:45 -0700405check-jck: $(JCK_HOME) $(PRODUCT_HOME)
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800406
407all-summary: FRC
408 if [ -n "`find $(TEST_OUTPUT_DIR) -name status.txt`" ]; then
409 echo ; echo "Summary of test failures" ; \
410 cat `find $(TEST_OUTPUT_DIR) -name summary.txt` | \
411 grep -v 'Not run' | grep -v 'Passed' ; \
412 echo ; \
413 $(EXIT) 1
414 fi
J. Dukef57b87e2007-12-01 00:00:00 +0000415
416# Bundle up the results
417$(JPRT_ARCHIVE_BUNDLE): FRC
418 @rm -f $@
419 @mkdir -p $(@D)
420 ( cd $(TEST_OUTPUT_DIR) && zip -q -r $@ . )
421
422# Cleanup
423clean:
J. Dukef57b87e2007-12-01 00:00:00 +0000424 rm -f $(JPRT_ARCHIVE_BUNDLE)
425
426# Used to force a target rules to run
427FRC:
428
429# Phony targets (e.g. these are not filenames)
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800430.PHONY: all clean \
Mandy Chunge8ce8822012-12-28 22:25:21 -0800431 jtreg javac javadoc javah javap jdeps jtreg-tests jtreg-summary check-jtreg \
Jonathan Gibbonsa49bd212010-03-12 12:00:42 -0800432 jck-compiler jck-compiler-tests jck-compiler-summary \
433 jck-runtime jck-runtime-tests jck-runtime-summary check-jck
434
435# No use of suffix rules
436.SUFFIXES:
J. Dukef57b87e2007-12-01 00:00:00 +0000437