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