J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 1 | # |
Kelly O'Hair | e4fce69 | 2010-03-06 14:59:23 -0800 | [diff] [blame^] | 2 | # Copyright 1995-2010 Sun Microsystems, Inc. All Rights Reserved. |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | # |
| 5 | # This code is free software; you can redistribute it and/or modify it |
| 6 | # under the terms of the GNU General Public License version 2 only, as |
| 7 | # published by the Free Software Foundation. Sun designates this |
| 8 | # particular file as subject to the "Classpath" exception as provided |
| 9 | # by Sun in the LICENSE file that accompanied this code. |
| 10 | # |
| 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | # version 2 for more details (a copy is included in the LICENSE file that |
| 15 | # accompanied this code). |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License version |
| 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | # |
| 21 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 22 | # CA 95054 USA or visit www.sun.com if you need additional information or |
| 23 | # have any questions. |
| 24 | # |
| 25 | |
| 26 | # |
| 27 | # Makefile to run various jdk tests |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 28 | # |
| 29 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 30 | # Empty these to get rid of some default rules |
| 31 | .SUFFIXES: |
| 32 | .SUFFIXES: .java |
| 33 | CO= |
| 34 | GET= |
| 35 | |
| 36 | # Utilities used |
| 37 | AWK = awk |
| 38 | CAT = cat |
| 39 | CD = cd |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 40 | CP = cp |
| 41 | CUT = cut |
| 42 | ECHO = echo |
| 43 | EGREP = egrep |
| 44 | EXPAND = expand |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 45 | MKDIR = mkdir |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 46 | PWD = pwd |
| 47 | SED = sed |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 48 | SORT = sort |
| 49 | TEE = tee |
| 50 | UNAME = uname |
| 51 | UNIQ = uniq |
| 52 | WC = wc |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 53 | ZIP = zip |
| 54 | |
| 55 | # Get OS name from uname |
| 56 | UNAME_S := $(shell $(UNAME) -s) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 57 | |
| 58 | # Commands to run on paths to make mixed paths for java on windows |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 59 | GETMIXEDPATH=$(ECHO) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 60 | |
| 61 | # Location of developer shared files |
| 62 | SLASH_JAVA = /java |
| 63 | |
| 64 | # Platform specific settings |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 65 | ifeq ($(UNAME_S), SunOS) |
| 66 | OS_NAME = solaris |
| 67 | OS_ARCH := $(shell $(UNAME) -p) |
| 68 | OS_VERSION := $(shell $(UNAME) -r) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 69 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 70 | ifeq ($(UNAME_S), Linux) |
| 71 | OS_NAME = linux |
| 72 | OS_ARCH := $(shell $(UNAME) -m) |
| 73 | OS_VERSION := $(shell $(UNAME) -r) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 74 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 75 | ifndef OS_NAME |
| 76 | ifneq ($(PROCESSOR_IDENTIFIER), ) |
| 77 | OS_NAME = windows |
| 78 | SLASH_JAVA = J: |
| 79 | # A variety of ways to say X64 arch :^( |
| 80 | OS_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
| 81 | EXESUFFIX = .exe |
| 82 | # These need to be different depending on MKS or CYGWIN |
| 83 | ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), ) |
| 84 | GETMIXEDPATH = dosname -s |
| 85 | OS_VERSION := $(shell $(UNAME) -r) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 86 | else |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 87 | GETMIXEDPATH = cygpath -m -s |
| 88 | OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 89 | endif |
| 90 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 91 | endif |
| 92 | |
| 93 | # Only want major and minor numbers from os version |
| 94 | OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2) |
| 95 | |
| 96 | # Try and use names i586, x64, and ia64 consistently |
| 97 | OS_ARCH:=$(subst X64,x64,$(OS_ARCH)) |
| 98 | OS_ARCH:=$(subst AMD64,x64,$(OS_ARCH)) |
| 99 | OS_ARCH:=$(subst amd64,x64,$(OS_ARCH)) |
| 100 | OS_ARCH:=$(subst x86_64,x64,$(OS_ARCH)) |
| 101 | OS_ARCH:=$(subst EM64T,x64,$(OS_ARCH)) |
| 102 | OS_ARCH:=$(subst em64t,x64,$(OS_ARCH)) |
| 103 | OS_ARCH:=$(subst intel64,x64,$(OS_ARCH)) |
| 104 | OS_ARCH:=$(subst Intel64,x64,$(OS_ARCH)) |
| 105 | OS_ARCH:=$(subst INTEL64,x64,$(OS_ARCH)) |
| 106 | OS_ARCH:=$(subst IA64,ia64,$(OS_ARCH)) |
| 107 | OS_ARCH:=$(subst X86,i586,$(OS_ARCH)) |
| 108 | OS_ARCH:=$(subst x86,i586,$(OS_ARCH)) |
| 109 | OS_ARCH:=$(subst i386,i586,$(OS_ARCH)) |
| 110 | OS_ARCH:=$(subst i486,i586,$(OS_ARCH)) |
| 111 | OS_ARCH:=$(subst i686,i586,$(OS_ARCH)) |
| 112 | |
| 113 | # Check for ARCH_DATA_MODEL, adjust OS_ARCH accordingly |
| 114 | ifndef ARCH_DATA_MODEL |
| 115 | ARCH_DATA_MODEL=32 |
| 116 | endif |
| 117 | ARCH_DATA_MODEL_ERROR= \ |
| 118 | ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(OS_NAME)-$(ARCH) |
| 119 | ifeq ($(ARCH_DATA_MODEL),64) |
| 120 | ifeq ($(OS_NAME)-$(OS_ARCH),solaris-i586) |
| 121 | OS_ARCH=x64 |
| 122 | endif |
| 123 | ifeq ($(OS_NAME)-$(OS_ARCH),solaris-sparc) |
| 124 | OS_ARCH=sparcv9 |
| 125 | endif |
| 126 | ifeq ($(OS_ARCH),i586) |
| 127 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 128 | endif |
| 129 | ifeq ($(OS_ARCH),sparc) |
| 130 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 131 | endif |
| 132 | else |
| 133 | ifeq ($(ARCH_DATA_MODEL),32) |
| 134 | ifeq ($(OS_ARCH),x64) |
| 135 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 136 | endif |
| 137 | ifeq ($(OS_ARCH),ia64) |
| 138 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 139 | endif |
| 140 | ifeq ($(OS_ARCH),sparcv9) |
| 141 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 142 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 143 | else |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 144 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 145 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 146 | endif |
| 147 | |
| 148 | # Root of this test area (important to use full paths in some places) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 149 | TEST_ROOT := $(shell $(PWD)) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 150 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 151 | # Root of all test results |
| 152 | ifdef ALT_OUTPUTDIR |
| 153 | ABS_OUTPUTDIR = $(ALT_OUTPUTDIR) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 154 | else |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 155 | ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(OS_NAME)-$(OS_ARCH) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 156 | endif |
| 157 | ABS_BUILD_ROOT = $(ABS_OUTPUTDIR) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 158 | ABS_TEST_OUTPUT_DIR := $(ABS_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 159 | |
| 160 | # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) |
| 161 | ifndef PRODUCT_HOME |
| 162 | # Try to use j2sdk-image if it exists |
| 163 | ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image |
| 164 | PRODUCT_HOME := \ |
| 165 | $(shell \ |
| 166 | if [ -d $(ABS_JDK_IMAGE) ] ; then \ |
| 167 | $(ECHO) "$(ABS_JDK_IMAGE)"; \ |
| 168 | else \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 169 | $(ECHO) "$(ABS_BUILD_ROOT)"; \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 170 | fi) |
| 171 | PRODUCT_HOME := $(PRODUCT_HOME) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 172 | endif |
| 173 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 174 | # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.) |
| 175 | # Should be passed into 'java' only. |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 176 | # Could include: -d64 -server -client OR any java option |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 177 | ifdef JPRT_PRODUCT_ARGS |
| 178 | JAVA_ARGS = $(JPRT_PRODUCT_ARGS) |
| 179 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 180 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 181 | # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.) |
| 182 | # Should be passed into anything running the vm (java, javac, javadoc, ...). |
| 183 | ifdef JPRT_PRODUCT_VM_ARGS |
| 184 | JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS) |
| 185 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 186 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 187 | # Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc. |
| 188 | ifeq ($(OS_NAME),solaris) |
| 189 | D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS) |
| 190 | ifeq ($(ARCH_DATA_MODEL),32) |
| 191 | ifneq ($(findstring -d64,$(JAVA_ARGS)),) |
| 192 | x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)") |
| 193 | endif |
| 194 | endif |
| 195 | ifeq ($(ARCH_DATA_MODEL),64) |
| 196 | ifeq ($(findstring -d64,$(JAVA_ARGS)),) |
| 197 | x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)") |
| 198 | endif |
| 199 | endif |
| 200 | endif |
| 201 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 202 | # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results) |
| 203 | ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip |
| 204 | ifdef JPRT_ARCHIVE_BUNDLE |
| 205 | ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE) |
| 206 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 207 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 208 | # How to create the test bundle (pass or fail, we want to create this) |
| 209 | # Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed. |
| 210 | ZIP_UP_RESULTS = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \ |
| 211 | && $(CD) $(ABS_TEST_OUTPUT_DIR) \ |
| 212 | && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . ) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 213 | SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt |
| 214 | STATS_TXT_NAME = Stats.txt |
| 215 | STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME) |
| 216 | RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt |
| 217 | PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt |
| 218 | FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 219 | EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt |
| 220 | |
| 221 | TESTEXIT = \ |
| 222 | if [ ! -s $(EXITCODE) ] ; then \ |
| 223 | $(ECHO) "ERROR: EXITCODE file not filled in."; \ |
| 224 | $(ECHO) "1" > $(EXITCODE); \ |
| 225 | fi ; \ |
| 226 | testExitCode=`$(CAT) $(EXITCODE)`; \ |
| 227 | $(ECHO) "EXIT CODE: $${testExitCode}"; \ |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 228 | exit $${testExitCode} |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 229 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 230 | BUNDLE_UP_AND_EXIT = \ |
| 231 | ( \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 232 | jtregExitCode=$$? && \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 233 | _summary="$(SUMMARY_TXT)"; \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 234 | $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \ |
| 235 | $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 236 | if [ -r "$${_summary}" ] ; then \ |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 237 | $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 238 | $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \ |
| 239 | $(EGREP) ' Passed\.' $(RUNLIST) \ |
| 240 | | $(EGREP) -v ' Error\.' \ |
| 241 | | $(EGREP) -v ' Failed\.' > $(PASSLIST); \ |
| 242 | ( $(EGREP) ' Failed\.' $(RUNLIST); \ |
| 243 | $(EGREP) ' Error\.' $(RUNLIST); \ |
| 244 | $(EGREP) -v ' Passed\.' $(RUNLIST) ) \ |
| 245 | | $(SORT) | $(UNIQ) > $(FAILLIST); \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 246 | if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 247 | $(EXPAND) $(FAILLIST) \ |
| 248 | | $(CUT) -d' ' -f1 \ |
| 249 | | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 250 | if [ $${jtregExitCode} = 0 ] ; then \ |
| 251 | jtregExitCode=1; \ |
| 252 | fi; \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 253 | fi; \ |
| 254 | runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 255 | passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 256 | failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 257 | exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 258 | $(ECHO) "TEST STATS: run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \ |
| 259 | >> $(STATS_TXT); \ |
| 260 | else \ |
| 261 | $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ |
| 262 | fi; \ |
| 263 | $(CAT) $(STATS_TXT); \ |
Kelly O'Hair | e4fce69 | 2010-03-06 14:59:23 -0800 | [diff] [blame^] | 264 | $(ZIP_UP_RESULTS) ; \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 265 | $(TESTEXIT) \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 266 | ) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 267 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 268 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 269 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 270 | # Default make rule (runs jtreg_tests) |
| 271 | all: jtreg_tests |
| 272 | @$(ECHO) "Testing completed successfully" |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 273 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 274 | # Prep for output |
| 275 | prep: clean |
| 276 | @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR) |
| 277 | @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 278 | |
| 279 | # Cleanup |
| 280 | clean: |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 281 | $(RM) -r $(ABS_TEST_OUTPUT_DIR) |
| 282 | $(RM) $(ARCHIVE_BUNDLE) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 283 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 284 | ################################################################ |
| 285 | |
| 286 | # jtreg tests |
| 287 | |
| 288 | # Expect JT_HOME to be set for jtreg tests. (home for jtreg) |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 289 | ifndef JT_HOME |
| 290 | JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg |
| 291 | ifdef JPRT_JTREG_HOME |
| 292 | JT_HOME = $(JPRT_JTREG_HOME) |
| 293 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 294 | endif |
| 295 | |
| 296 | # Expect JPRT to set TESTDIRS to the jtreg test dirs |
| 297 | ifndef TESTDIRS |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 298 | TESTDIRS = demo |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 299 | endif |
| 300 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 301 | # Samevm settings (default is false) |
| 302 | ifndef USE_JTREG_SAMEVM |
| 303 | USE_JTREG_SAMEVM=false |
| 304 | endif |
| 305 | # With samevm, you cannot use -javaoptions? |
| 306 | ifeq ($(USE_JTREG_SAMEVM),true) |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 307 | JTREG_SAMEVM_OPTION = -samevm |
| 308 | EXTRA_JTREG_OPTIONS += $(JTREG_SAMEVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 309 | JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%) |
| 310 | else |
| 311 | JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
| 312 | endif |
| 313 | |
| 314 | # Some tests annoy me and fail frequently |
| 315 | PROBLEM_LIST=ProblemList.txt |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 316 | PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 317 | EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt |
| 318 | |
| 319 | # Create exclude list for this platform and arch |
| 320 | ifdef NO_EXCLUDES |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 321 | $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 322 | @$(ECHO) "NOTHING_EXCLUDED" > $@ |
| 323 | else |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 324 | $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 325 | @$(RM) $@ $@.temp1 $@.temp2 |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 326 | @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\ |
| 327 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\ |
| 328 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\ |
| 329 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\ |
| 330 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\ |
| 331 | ($(ECHO) "#") ;\ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 332 | ) | $(SED) -e 's@^[\ ]*@@' \ |
| 333 | | $(EGREP) -v '^#' > $@.temp1 |
| 334 | @for tdir in $(TESTDIRS) ; do \ |
| 335 | ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \ |
| 336 | done |
| 337 | @$(ECHO) "# at least one line" >> $@.temp2 |
| 338 | @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@ |
| 339 | @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items" |
| 340 | endif |
| 341 | |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 342 | # Select list of directories that exist |
| 343 | define TestDirs |
| 344 | $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i})) |
| 345 | endef |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 346 | # Running batches of tests with or without samevm |
| 347 | define RunSamevmBatch |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 348 | $(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)" |
| 349 | $(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 350 | endef |
| 351 | define RunOthervmBatch |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 352 | $(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)" |
| 353 | $(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 354 | endef |
| 355 | define SummaryInfo |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 356 | $(ECHO) "########################################################" |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 357 | $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 358 | $(ECHO) "########################################################" |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 359 | endef |
| 360 | |
| 361 | # ------------------------------------------------------------------ |
| 362 | |
| 363 | # Batches of tests (somewhat arbitrary assigments to jdk_* targets) |
| 364 | JDK_ALL_TARGETS = |
| 365 | |
| 366 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 367 | # Using samevm has problems, and doesn't help performance as much as others. |
| 368 | JDK_ALL_TARGETS += jdk_awt |
| 369 | jdk_awt: com/sun/awt java/awt sun/awt |
| 370 | $(call RunOthervmBatch) |
| 371 | |
| 372 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 373 | JDK_ALL_TARGETS += jdk_beans1 |
| 374 | jdk_beans1: java/beans/beancontext java/beans/PropertyChangeSupport \ |
| 375 | java/beans/Introspector java/beans/Performance \ |
| 376 | java/beans/VetoableChangeSupport java/beans/Statement |
| 377 | $(call RunSamevmBatch) |
| 378 | |
| 379 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 380 | # Using samevm has serious problems with these tests |
| 381 | JDK_ALL_TARGETS += jdk_beans2 |
| 382 | jdk_beans2: java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \ |
| 383 | java/beans/PropertyEditor |
| 384 | $(call RunOthervmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 385 | |
| 386 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 387 | # Using samevm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 388 | JDK_ALL_TARGETS += jdk_beans3 |
| 389 | jdk_beans3: java/beans/XMLEncoder |
| 390 | $(call RunOthervmBatch) |
| 391 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 392 | # All beans tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 393 | jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3 |
| 394 | @$(SummaryInfo) |
| 395 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 396 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 397 | JDK_ALL_TARGETS += jdk_io |
| 398 | jdk_io: java/io |
| 399 | $(call RunSamevmBatch) |
| 400 | |
| 401 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 402 | JDK_ALL_TARGETS += jdk_lang |
| 403 | jdk_lang: java/lang |
| 404 | $(call RunSamevmBatch) |
| 405 | |
| 406 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 407 | # Using samevm has serious problems with these tests |
| 408 | JDK_ALL_TARGETS += jdk_management1 |
| 409 | jdk_management1: javax/management |
| 410 | $(call RunOthervmBatch) |
| 411 | |
| 412 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 413 | # Using samevm has serious problems with these tests |
| 414 | JDK_ALL_TARGETS += jdk_management2 |
| 415 | jdk_management2: com/sun/jmx com/sun/management sun/management |
| 416 | $(call RunOthervmBatch) |
| 417 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 418 | # All management tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 419 | jdk_management: jdk_management1 jdk_management2 |
| 420 | @$(SummaryInfo) |
| 421 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 422 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 423 | JDK_ALL_TARGETS += jdk_math |
| 424 | jdk_math: java/math |
| 425 | $(call RunSamevmBatch) |
| 426 | |
| 427 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 428 | JDK_ALL_TARGETS += jdk_misc |
| 429 | jdk_misc: demo javax/imageio javax/naming javax/print javax/script \ |
| 430 | javax/smartcardio javax/sound com/sun/java com/sun/jndi \ |
| 431 | com/sun/org sun/misc sun/pisces |
| 432 | $(call RunSamevmBatch) |
| 433 | |
| 434 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 435 | JDK_ALL_TARGETS += jdk_net |
| 436 | jdk_net: com/sun/net java/net sun/net |
| 437 | $(call RunSamevmBatch) |
| 438 | |
| 439 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 440 | JDK_ALL_TARGETS += jdk_nio1 |
| 441 | jdk_nio1: java/nio/file |
| 442 | $(call RunSamevmBatch) |
| 443 | |
| 444 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 445 | # Using samevm has serious problems with these tests |
| 446 | JDK_ALL_TARGETS += jdk_nio2 |
| 447 | jdk_nio2: java/nio/Buffer java/nio/ByteOrder \ |
| 448 | java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer |
| 449 | $(call RunOthervmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 450 | |
| 451 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 452 | # Using samevm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 453 | JDK_ALL_TARGETS += jdk_nio3 |
| 454 | jdk_nio3: com/sun/nio sun/nio |
| 455 | $(call RunOthervmBatch) |
| 456 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 457 | # All nio tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 458 | jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3 |
| 459 | @$(SummaryInfo) |
| 460 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 461 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 462 | # Using samevm has serious problems with these tests |
| 463 | JDK_ALL_TARGETS += jdk_rmi |
| 464 | jdk_rmi: java/rmi javax/rmi sun/rmi |
| 465 | $(call RunOthervmBatch) |
| 466 | |
| 467 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 468 | JDK_ALL_TARGETS += jdk_security1 |
| 469 | jdk_security1: java/security |
| 470 | $(call RunSamevmBatch) |
| 471 | |
| 472 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 473 | # Using samevm has serious problems with these tests |
| 474 | JDK_ALL_TARGETS += jdk_security2 |
| 475 | jdk_security2: javax/crypto com/sun/crypto |
| 476 | $(call RunOthervmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 477 | |
| 478 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 479 | # Using samevm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 480 | JDK_ALL_TARGETS += jdk_security3 |
| 481 | jdk_security3: com/sun/security lib/security javax/security sun/security |
| 482 | $(call RunOthervmBatch) |
| 483 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 484 | # All security tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 485 | jdk_security: jdk_security1 jdk_security2 jdk_security3 |
| 486 | @$(SummaryInfo) |
| 487 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 488 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 489 | # Using samevm has problems, and doesn't help performance as much as others. |
| 490 | JDK_ALL_TARGETS += jdk_swing |
| 491 | jdk_swing: javax/swing sun/java2d |
| 492 | $(call RunOthervmBatch) |
| 493 | |
| 494 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 495 | JDK_ALL_TARGETS += jdk_text |
| 496 | jdk_text: java/text sun/text |
| 497 | $(call RunSamevmBatch) |
| 498 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 499 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 500 | JDK_ALL_TARGETS += jdk_tools1 |
| 501 | jdk_tools1: com/sun/jdi |
Kelly O'Hair | 547328d | 2009-11-25 08:24:58 -0800 | [diff] [blame] | 502 | $(call RunSamevmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 503 | |
| 504 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
| 505 | # Using samevm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 506 | JDK_ALL_TARGETS += jdk_tools2 |
| 507 | jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing |
| 508 | $(call RunOthervmBatch) |
| 509 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 510 | # All tools tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 511 | jdk_tools: jdk_tools1 jdk_tools2 |
| 512 | @$(SummaryInfo) |
| 513 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 514 | # Stable samevm testruns (minus items from PROBLEM_LIST) |
| 515 | JDK_ALL_TARGETS += jdk_util |
| 516 | jdk_util: java/util sun/util |
| 517 | $(call RunSamevmBatch) |
| 518 | |
| 519 | # ------------------------------------------------------------------ |
| 520 | |
| 521 | # Run all tests |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 522 | FILTER_OUT_LIST=jdk_awt jdk_rmi jdk_swing |
| 523 | JDK_ALL_STABLE_TARGETS := $(filter-out $(FILTER_OUT_LIST), $(JDK_ALL_TARGETS)) |
| 524 | jdk_all: $(JDK_ALL_STABLE_TARGETS) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 525 | @$(SummaryInfo) |
| 526 | |
| 527 | # These are all phony targets |
| 528 | PHONY_LIST += $(JDK_ALL_TARGETS) |
| 529 | |
| 530 | # ------------------------------------------------------------------ |
| 531 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 532 | # Default JTREG to run (win32 script works for everybody) |
| 533 | JTREG = $(JT_HOME)/win32/bin/jtreg |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 534 | # Add any extra options (samevm etc.) |
| 535 | JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) |
| 536 | # Only run automatic tests |
| 537 | JTREG_BASIC_OPTIONS += -a |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 538 | # Always turn on assertions |
| 539 | JTREG_ASSERT_OPTION = -ea -esa |
| 540 | JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 541 | # Report details on all failed or error tests, times too |
| 542 | JTREG_BASIC_OPTIONS += -v:fail,error,time |
| 543 | # Retain all files for failing tests |
| 544 | JTREG_BASIC_OPTIONS += -retain:fail,error |
| 545 | # Ignore tests are not run and completely silent about it |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 546 | JTREG_IGNORE_OPTION = -ignore:quiet |
| 547 | JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 548 | # Multiple by 4 the timeout numbers |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 549 | JTREG_TIMEOUT_OPTION = -timeoutFactor:4 |
| 550 | JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 551 | # Boost the max memory for jtreg to avoid gc thrashing |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 552 | JTREG_MEMORY_OPTION = -J-Xmx512m |
| 553 | JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 554 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 555 | # Make sure jtreg exists |
| 556 | $(JTREG): $(JT_HOME) |
| 557 | |
| 558 | # Run jtreg |
| 559 | jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST) |
| 560 | @$(EXPAND) $(EXCLUDELIST) \ |
| 561 | | $(CUT) -d' ' -f1 \ |
| 562 | | $(SED) -e 's@^@Excluding: @' |
| 563 | ( \ |
| 564 | ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ |
| 565 | export JT_HOME; \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 566 | $(shell $(GETMIXEDPATH) "$(JTREG)") \ |
| 567 | $(JTREG_BASIC_OPTIONS) \ |
| 568 | -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \ |
| 569 | -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \ |
| 570 | -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
| 571 | -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \ |
| 572 | $(JTREG_TEST_OPTIONS) \ |
| 573 | $(TESTDIRS) \ |
| 574 | ) ; $(BUNDLE_UP_AND_EXIT) \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 575 | ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 576 | |
| 577 | PHONY_LIST += jtreg_tests |
| 578 | |
| 579 | ################################################################ |
| 580 | |
| 581 | # packtest |
| 582 | |
| 583 | # Expect JPRT to set JPRT_PACKTEST_HOME. |
| 584 | PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest |
| 585 | ifdef JPRT_PACKTEST_HOME |
| 586 | PACKTEST_HOME = $(JPRT_PACKTEST_HOME) |
| 587 | endif |
| 588 | |
| 589 | packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME) |
| 590 | ( $(CD) $(PACKTEST_HOME) && \ |
| 591 | $(PACKTEST_HOME)/ptest \ |
| 592 | -t "$(PRODUCT_HOME)" \ |
| 593 | $(PACKTEST_STRESS_OPTION) \ |
| 594 | $(EXTRA_PACKTEST_OPTIONS) \ |
| 595 | -W $(ABS_TEST_OUTPUT_DIR) \ |
| 596 | $(JAVA_ARGS:%=-J %) \ |
| 597 | $(JAVA_VM_ARGS:%=-J %) \ |
| 598 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 599 | |
| 600 | packtest_stress: PACKTEST_STRESS_OPTION=-s |
| 601 | packtest_stress: packtest |
| 602 | |
| 603 | PHONY_LIST += packtest packtest_stress |
| 604 | |
| 605 | ################################################################ |
| 606 | |
Mandy Chung | e2f7248 | 2009-05-26 17:47:57 -0700 | [diff] [blame] | 607 | # perftest to collect statistics |
| 608 | |
| 609 | # Expect JPRT to set JPRT_PACKTEST_HOME. |
| 610 | PERFTEST_HOME = ${TEST_ROOT}/perf |
| 611 | ifdef JPRT_PERFTEST_HOME |
| 612 | PERFTEST_HOME = $(JPRT_PERFTEST_HOME) |
| 613 | endif |
| 614 | |
| 615 | perftest: ( $(PERFTEST_HOME)/perftest \ |
| 616 | -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
| 617 | -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \ |
| 618 | -h $(PERFTEST_HOME) \ |
| 619 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 620 | |
| 621 | |
| 622 | PHONY_LIST += perftest |
| 623 | |
| 624 | ################################################################ |
| 625 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 626 | # vmsqe tests |
| 627 | |
| 628 | # Expect JPRT to set JPRT_VMSQE_HOME. |
| 629 | VMSQE_HOME = /java/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm |
| 630 | ifdef JPRT_VMSQE_HOME |
| 631 | VMSQE_HOME = $(JPRT_VMSQE_HOME) |
| 632 | endif |
| 633 | |
| 634 | # Expect JPRT to set JPRT_RUNVMSQE_HOME. |
| 635 | RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe |
| 636 | ifdef JPRT_RUNVMSQE_HOME |
| 637 | RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME) |
| 638 | endif |
| 639 | |
| 640 | # Expect JPRT to set JPRT_TONGA3_HOME. |
| 641 | TONGA3_HOME = /java/sqe//tools/gtee/harness/tonga |
| 642 | ifdef JPRT_TONGA3_HOME |
| 643 | TONGA3_HOME = $(JPRT_TONGA3_HOME) |
| 644 | endif |
| 645 | |
| 646 | RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe |
| 647 | |
| 648 | vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME) |
| 649 | $(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe |
| 650 | ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \ |
| 651 | $(RUNVMSQE_BIN) \ |
| 652 | -jdk "$(PRODUCT_HOME)" \ |
| 653 | -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \ |
| 654 | -testbase "$(VMSQE_HOME)/vm" \ |
| 655 | -tonga "$(TONGA3_HOME)" \ |
| 656 | -tongajdk "$(ALT_BOOTDIR)" \ |
| 657 | $(JAVA_ARGS) \ |
| 658 | $(JAVA_VM_ARGS) \ |
| 659 | $(RUNVMSQE_TEST_OPTION) \ |
| 660 | $(EXTRA_RUNVMSQE_OPTIONS) \ |
| 661 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 662 | |
| 663 | vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp |
| 664 | vmsqe_jdwp: vmsqe_tests |
| 665 | |
| 666 | vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi |
| 667 | vmsqe_jdi: vmsqe_tests |
| 668 | |
| 669 | vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb |
| 670 | vmsqe_jdb: vmsqe_tests |
| 671 | |
| 672 | vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi |
| 673 | vmsqe_quick-jdi: vmsqe_tests |
| 674 | |
| 675 | vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi |
| 676 | vmsqe_sajdi: vmsqe_tests |
| 677 | |
| 678 | vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti |
| 679 | vmsqe_jvmti: vmsqe_tests |
| 680 | |
| 681 | vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof |
| 682 | vmsqe_hprof: vmsqe_tests |
| 683 | |
| 684 | vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring |
| 685 | vmsqe_monitoring: vmsqe_tests |
| 686 | |
| 687 | PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \ |
| 688 | vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests |
| 689 | |
| 690 | ################################################################ |
| 691 | |
| 692 | # jck tests |
| 693 | |
| 694 | JCK_WORK_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKwork |
| 695 | JCK_REPORT_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKreport |
| 696 | JCK_PROPERTIES = $(ABS_TEST_OUTPUT_DIR)/jck.properties |
| 697 | JCK_CONFIG = $(ABS_TEST_OUTPUT_DIR)/jck.config |
| 698 | |
| 699 | JCK_JAVA_EXE = $(PRODUCT_HOME)/bin/java$(EXESUFFIX) |
| 700 | |
| 701 | JCK_JAVATEST_JAR = $(JCK_HOME)/lib/javatest.jar |
| 702 | JCK_JAVATEST = $(ALT_BOOTDIR)/bin/java -jar $(JCK_JAVATEST_JAR) |
| 703 | |
| 704 | $(JCK_CONFIG): $(TEST_ROOT)/JCK-$(JCK_BUNDLE_NAME)-$(JCK_RELEASE)-base.jti |
| 705 | $(RM) $@ |
| 706 | $(MKDIR) -p $(@D) |
| 707 | $(CP) $< $@ |
| 708 | |
| 709 | $(JCK_PROPERTIES): $(PRODUCT_HOME) $(JCK_JAVA_EXE) |
| 710 | $(RM) $@ |
| 711 | $(MKDIR) -p $(@D) |
| 712 | $(ECHO) "jck.env.compiler.compRefExecute.cmdAsFile=$(JCK_JAVA_EXE)" >> $@ |
| 713 | $(ECHO) "jck.env.compiler.compRefExecute.systemRoot=$(SYSTEMROOT)" >> $@ |
| 714 | $(ECHO) "jck.env.compiler.testCompile.testCompileAPImultiJVM.cmdAsFile=$(JCK_JAVA_EXE)" >> $@ |
| 715 | $(ECHO) "jck.tests.tests=$(JCK_BUNDLE_TESTDIRS)" >> $@ |
| 716 | |
| 717 | jck_tests: prep $(JCK_HOME) $(JCK_PROPERTIES) $(JCK_CONFIG) $(JCK_JAVATEST_JAR) |
| 718 | $(MKDIR) -p $(JCK_WORK_DIR) |
| 719 | ( $(JCK_JAVATEST) \ |
| 720 | -verbose:commands,non-pass \ |
| 721 | -testSuite $(JCK_HOME) \ |
| 722 | -workDir $(JCK_WORK_DIR) \ |
| 723 | -config $(JCK_CONFIG) \ |
| 724 | -set -file $(JCK_PROPERTIES) \ |
| 725 | -runtests \ |
| 726 | -writeReport $(JCK_REPORT_DIR) \ |
| 727 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 728 | |
| 729 | PHONY_LIST += jck_tests |
| 730 | |
| 731 | ################################################################ |
| 732 | |
| 733 | # jck6 tests |
| 734 | |
| 735 | JCK6_RELEASE = 6b |
| 736 | JCK6_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK6_RELEASE)/archive/fcs/binaries |
| 737 | |
| 738 | # Expect JPRT to set JPRT_JCK6COMPILER_HOME. |
| 739 | JCK6COMPILER_HOME = $(JCK6_DEFAULT_HOME)/JCK-compiler-$(JCK6_RELEASE) |
| 740 | ifdef JPRT_JCK6COMPILER_HOME |
| 741 | JCK6COMPILER_HOME = $(JPRT_JCK6COMPILER_HOME) |
| 742 | endif |
| 743 | |
| 744 | # Expect JPRT to set JPRT_JCK6RUNTIME_HOME. |
| 745 | JCK6RUNTIME_HOME = $(JCK6_DEFAULT_HOME)/JCK-runtime-$(JCK6_RELEASE) |
| 746 | ifdef JPRT_JCK6RUNTIME_HOME |
| 747 | JCK6RUNTIME_HOME = $(JPRT_JCK6RUNTIME_HOME) |
| 748 | endif |
| 749 | |
| 750 | # Expect JPRT to set JPRT_JCK6DEVTOOLS_HOME. |
| 751 | JCK6DEVTOOLS_HOME = $(JCK6_DEFAULT_HOME)/JCK-devtools-$(JCK6_RELEASE) |
| 752 | ifdef JPRT_JCK6DEVTOOLS_HOME |
| 753 | JCK6DEVTOOLS_HOME = $(JPRT_JCK6DEVTOOLS_HOME) |
| 754 | endif |
| 755 | |
| 756 | jck6_tests: JCK_HOME=$(JCK6_HOME) |
| 757 | jck6_tests: JCK_RELEASE=$(JCK6_RELEASE) |
| 758 | jck6_tests: jck_tests |
| 759 | |
| 760 | jck6compiler: JCK6_HOME=$(JCK6COMPILER_HOME) |
| 761 | jck6compiler: JCK_BUNDLE_NAME=compiler |
| 762 | jck6compiler: jck6_tests |
| 763 | |
| 764 | jck6compiler_lang: JCK_BUNDLE_TESTDIRS=lang |
| 765 | jck6compiler_lang: jck6compiler |
| 766 | |
| 767 | jck6runtime: JCK6_HOME=$(JCK6RUNTIME_HOME) |
| 768 | jck6runtime: JCK_BUNDLE_NAME=runtime |
| 769 | jck6runtime: jck6_tests |
| 770 | |
| 771 | jck6runtime_lang: JCK_BUNDLE_TESTDIRS=lang |
| 772 | jck6runtime_lang: jck6runtime |
| 773 | |
| 774 | jck6devtools: JCK6_HOME=$(JCK6DEVTOOLS_HOME) |
| 775 | jck6devtools: JCK_BUNDLE_NAME=devtools |
| 776 | jck6devtools: jck6_tests |
| 777 | |
| 778 | jck6devtools_lang: JCK_BUNDLE_TESTDIRS=lang |
| 779 | jck6devtools_lang: jck6devtools |
| 780 | |
| 781 | PHONY_LIST += jck6compiler jck6runtime jck6devtools jck6_tests \ |
| 782 | jck6compiler_lang jck6runtime_lang jck6devtools_lang |
| 783 | |
| 784 | ################################################################ |
| 785 | |
| 786 | # jck7 tests |
| 787 | |
| 788 | JCK7_RELEASE = 7 |
| 789 | JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK7_RELEASE)/archive/fcs/binaries |
| 790 | |
| 791 | # Expect JPRT to set JPRT_JCK7COMPILER_HOME. |
| 792 | JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-$(JCK7_RELEASE) |
| 793 | ifdef JPRT_JCK7COMPILER_HOME |
| 794 | JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME) |
| 795 | endif |
| 796 | |
| 797 | # Expect JPRT to set JPRT_JCK7RUNTIME_HOME. |
| 798 | JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-$(JCK7_RELEASE) |
| 799 | ifdef JPRT_JCK7RUNTIME_HOME |
| 800 | JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME) |
| 801 | endif |
| 802 | |
| 803 | # Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME. |
| 804 | JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-$(JCK7_RELEASE) |
| 805 | ifdef JPRT_JCK7DEVTOOLS_HOME |
| 806 | JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME) |
| 807 | endif |
| 808 | |
| 809 | jck7_tests: JCK_HOME=$(JCK7_HOME) |
| 810 | jck7_tests: JCK_RELEASE=$(JCK7_RELEASE) |
| 811 | jck7_tests: jck_tests |
| 812 | |
| 813 | jck7compiler: JCK7_HOME=$(JCK7COMPILER_HOME) |
| 814 | jck7compiler: JCK_BUNDLE_NAME=compiler |
| 815 | jck7compiler: jck7_tests |
| 816 | |
| 817 | jck7compiler_lang: JCK_BUNDLE_TESTDIRS=lang |
| 818 | jck7compiler_lang: jck7compiler |
| 819 | |
| 820 | jck7runtime: JCK7_HOME=$(JCK7RUNTIME_HOME) |
| 821 | jck7runtime: JCK_BUNDLE_NAME=runtime |
| 822 | jck7runtime: jck7_tests |
| 823 | |
| 824 | jck7runtime_lang: JCK_BUNDLE_TESTDIRS=lang |
| 825 | jck7runtime_lang: jck7runtime |
| 826 | |
| 827 | jck7devtools: JCK7_HOME=$(JCK7DEVTOOLS_HOME) |
| 828 | jck7devtools: JCK_BUNDLE_NAME=devtools |
| 829 | jck7devtools: jck7_tests |
| 830 | |
| 831 | jck7devtools_lang: JCK_BUNDLE_TESTDIRS=lang |
| 832 | jck7devtools_lang: jck7devtools |
| 833 | |
| 834 | PHONY_LIST += jck7compiler jck7runtime jck7devtools jck7_tests \ |
| 835 | jck7compiler_lang jck7runtime_lang jck7devtools_lang |
| 836 | |
| 837 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 838 | |
| 839 | # Phony targets (e.g. these are not filenames) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 840 | .PHONY: all clean prep $(PHONY_LIST) |
| 841 | |
| 842 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 843 | |