J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 1 | # |
Kelly O'Hair | d2b1e20 | 2011-04-06 22:06:11 -0700 | [diff] [blame] | 2 | # Copyright (c) 1995, 2011, Oracle and/or its affiliates. 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 |
Kelly O'Hair | fe008ae | 2010-05-25 15:58:33 -0700 | [diff] [blame] | 7 | # published by the Free Software Foundation. Oracle designates this |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 8 | # particular file as subject to the "Classpath" exception as provided |
Kelly O'Hair | fe008ae | 2010-05-25 15:58:33 -0700 | [diff] [blame] | 9 | # by Oracle in the LICENSE file that accompanied this code. |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 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 | # |
Kelly O'Hair | fe008ae | 2010-05-25 15:58:33 -0700 | [diff] [blame] | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 22 | # or visit www.oracle.com if you need additional information or have any |
| 23 | # questions. |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 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 | 5613186 | 2010-05-12 21:35:55 -0700 | [diff] [blame] | 40 | CHMOD = chmod |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 41 | CP = cp |
| 42 | CUT = cut |
Kelly O'Hair | 5613186 | 2010-05-12 21:35:55 -0700 | [diff] [blame] | 43 | DIRNAME = dirname |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 44 | ECHO = echo |
| 45 | EGREP = egrep |
| 46 | EXPAND = expand |
Kelly O'Hair | 5613186 | 2010-05-12 21:35:55 -0700 | [diff] [blame] | 47 | FIND = find |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 48 | MKDIR = mkdir |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 49 | PWD = pwd |
| 50 | SED = sed |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 51 | SORT = sort |
| 52 | TEE = tee |
| 53 | UNAME = uname |
| 54 | UNIQ = uniq |
| 55 | WC = wc |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 56 | ZIP = zip |
| 57 | |
| 58 | # Get OS name from uname |
| 59 | UNAME_S := $(shell $(UNAME) -s) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 60 | |
| 61 | # 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] | 62 | GETMIXEDPATH=$(ECHO) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 63 | |
| 64 | # Location of developer shared files |
| 65 | SLASH_JAVA = /java |
| 66 | |
| 67 | # Platform specific settings |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 68 | ifeq ($(UNAME_S), SunOS) |
| 69 | OS_NAME = solaris |
| 70 | OS_ARCH := $(shell $(UNAME) -p) |
| 71 | OS_VERSION := $(shell $(UNAME) -r) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 72 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 73 | ifeq ($(UNAME_S), Linux) |
| 74 | OS_NAME = linux |
| 75 | OS_ARCH := $(shell $(UNAME) -m) |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 76 | # Check for unknown arch, try uname -p if uname -m says unknown |
| 77 | ifeq ($(OS_ARCH),unknown) |
| 78 | OS_ARCH := $(shell $(UNAME) -p) |
| 79 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 80 | OS_VERSION := $(shell $(UNAME) -r) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 81 | endif |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 82 | ifeq ($(OS_NAME),) |
| 83 | OS_NAME = windows |
| 84 | # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
| 85 | # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
| 86 | ifeq ($(PROCESSOR_IDENTIFIER),) |
| 87 | PROC_ARCH:=$(shell $(UNAME) -m) |
| 88 | else |
| 89 | PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
| 90 | endif |
| 91 | OS_ARCH:=$(PROC_ARCH) |
| 92 | SLASH_JAVA = J: |
| 93 | EXESUFFIX = .exe |
| 94 | # These need to be different depending on MKS or CYGWIN |
| 95 | ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), ) |
| 96 | GETMIXEDPATH = dosname -s |
| 97 | OS_VERSION := $(shell $(UNAME) -r) |
| 98 | else |
| 99 | GETMIXEDPATH = cygpath -m -s |
| 100 | OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 101 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 102 | endif |
| 103 | |
| 104 | # Only want major and minor numbers from os version |
| 105 | OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2) |
| 106 | |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 107 | # Name to use for x86_64 arch (historically amd64, but should change someday) |
| 108 | OS_ARCH_X64_NAME:=amd64 |
| 109 | #OS_ARCH_X64_NAME:=x64 |
| 110 | |
| 111 | # Alternate arch names (in case this arch is known by a second name) |
| 112 | # PROBLEM_LISTS may use either name. |
| 113 | OS_ARCH2-amd64:=x64 |
| 114 | #OS_ARCH2-x64:=amd64 |
| 115 | |
| 116 | # Try and use the arch names consistently |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 117 | OS_ARCH:=$(patsubst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 118 | OS_ARCH:=$(patsubst X64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 119 | OS_ARCH:=$(patsubst AMD64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 120 | OS_ARCH:=$(patsubst amd64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 121 | OS_ARCH:=$(patsubst x86_64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 122 | OS_ARCH:=$(patsubst 8664,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 123 | OS_ARCH:=$(patsubst EM64T,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 124 | OS_ARCH:=$(patsubst em64t,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 125 | OS_ARCH:=$(patsubst intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 126 | OS_ARCH:=$(patsubst Intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 127 | OS_ARCH:=$(patsubst INTEL64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 128 | OS_ARCH:=$(patsubst IA64,ia64,$(OS_ARCH)) |
| 129 | OS_ARCH:=$(patsubst X86,i586,$(OS_ARCH)) |
| 130 | OS_ARCH:=$(patsubst x86,i586,$(OS_ARCH)) |
| 131 | OS_ARCH:=$(patsubst i386,i586,$(OS_ARCH)) |
| 132 | OS_ARCH:=$(patsubst i486,i586,$(OS_ARCH)) |
| 133 | OS_ARCH:=$(patsubst i686,i586,$(OS_ARCH)) |
| 134 | OS_ARCH:=$(patsubst 386,i586,$(OS_ARCH)) |
| 135 | OS_ARCH:=$(patsubst 486,i586,$(OS_ARCH)) |
| 136 | OS_ARCH:=$(patsubst 586,i586,$(OS_ARCH)) |
| 137 | OS_ARCH:=$(patsubst 686,i586,$(OS_ARCH)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 138 | |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 139 | # Default ARCH_DATA_MODEL settings |
| 140 | ARCH_DATA_MODEL-i586 = 32 |
| 141 | ARCH_DATA_MODEL-$(OS_ARCH_X64_NAME) = 64 |
| 142 | ARCH_DATA_MODEL-ia64 = 64 |
| 143 | ARCH_DATA_MODEL-sparc = 32 |
| 144 | ARCH_DATA_MODEL-sparcv9 = 64 |
| 145 | |
| 146 | # If ARCH_DATA_MODEL is not defined, try and pick a reasonable default |
| 147 | ifndef ARCH_DATA_MODEL |
| 148 | ARCH_DATA_MODEL:=$(ARCH_DATA_MODEL-$(OS_ARCH)) |
| 149 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 150 | ifndef ARCH_DATA_MODEL |
| 151 | ARCH_DATA_MODEL=32 |
| 152 | endif |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 153 | |
| 154 | # Platform directory name |
| 155 | PLATFORM_OS = $(OS_NAME)-$(OS_ARCH) |
| 156 | |
| 157 | # Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 158 | ARCH_DATA_MODEL_ERROR= \ |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 159 | ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(PLATFORM_OS) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 160 | ifeq ($(ARCH_DATA_MODEL),64) |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 161 | ifeq ($(PLATFORM_OS),solaris-i586) |
| 162 | OS_ARCH=$(OS_ARCH_X64_NAME) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 163 | endif |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 164 | ifeq ($(PLATFORM_OS),solaris-sparc) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 165 | OS_ARCH=sparcv9 |
| 166 | endif |
| 167 | ifeq ($(OS_ARCH),i586) |
| 168 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 169 | endif |
| 170 | ifeq ($(OS_ARCH),sparc) |
| 171 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 172 | endif |
| 173 | else |
| 174 | ifeq ($(ARCH_DATA_MODEL),32) |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 175 | ifeq ($(OS_ARCH),$(OS_ARCH_X64_NAME)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 176 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 177 | endif |
| 178 | ifeq ($(OS_ARCH),ia64) |
| 179 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 180 | endif |
| 181 | ifeq ($(OS_ARCH),sparcv9) |
| 182 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 183 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 184 | else |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 185 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 186 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 187 | endif |
| 188 | |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 189 | # Alternate OS_ARCH name (defaults to OS_ARCH) |
| 190 | OS_ARCH2:=$(OS_ARCH2-$(OS_ARCH)) |
| 191 | ifeq ($(OS_ARCH2),) |
| 192 | OS_ARCH2:=$(OS_ARCH) |
| 193 | endif |
| 194 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 195 | # 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] | 196 | TEST_ROOT := $(shell $(PWD)) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 197 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 198 | # Root of all test results |
| 199 | ifdef ALT_OUTPUTDIR |
| 200 | ABS_OUTPUTDIR = $(ALT_OUTPUTDIR) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 201 | else |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 202 | ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(PLATFORM_OS) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 203 | endif |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 204 | ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) |
| 205 | ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 206 | |
| 207 | # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) |
| 208 | ifndef PRODUCT_HOME |
| 209 | # Try to use j2sdk-image if it exists |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 210 | ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/j2sdk-image |
| 211 | PRODUCT_HOME := \ |
| 212 | $(shell \ |
| 213 | if [ -d $(ABS_JDK_IMAGE) ] ; then \ |
| 214 | $(ECHO) "$(ABS_JDK_IMAGE)"; \ |
| 215 | else \ |
| 216 | $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 217 | fi) |
| 218 | PRODUCT_HOME := $(PRODUCT_HOME) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 219 | endif |
| 220 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 221 | # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.) |
| 222 | # Should be passed into 'java' only. |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 223 | # Could include: -d64 -server -client OR any java option |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 224 | ifdef JPRT_PRODUCT_ARGS |
| 225 | JAVA_ARGS = $(JPRT_PRODUCT_ARGS) |
| 226 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 227 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 228 | # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.) |
| 229 | # Should be passed into anything running the vm (java, javac, javadoc, ...). |
| 230 | ifdef JPRT_PRODUCT_VM_ARGS |
| 231 | JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS) |
| 232 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 233 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 234 | # Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc. |
| 235 | ifeq ($(OS_NAME),solaris) |
| 236 | D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS) |
| 237 | ifeq ($(ARCH_DATA_MODEL),32) |
| 238 | ifneq ($(findstring -d64,$(JAVA_ARGS)),) |
| 239 | x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)") |
| 240 | endif |
| 241 | endif |
| 242 | ifeq ($(ARCH_DATA_MODEL),64) |
| 243 | ifeq ($(findstring -d64,$(JAVA_ARGS)),) |
| 244 | x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)") |
| 245 | endif |
| 246 | endif |
| 247 | endif |
| 248 | |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 249 | # Macro to run make and set the shared library permissions |
| 250 | define SharedLibraryPermissions |
| 251 | $(MAKE) SHARED_LIBRARY_DIR=$1 UNIQUE_DIR=$@ shared_library_permissions |
Kelly O'Hair | 5613186 | 2010-05-12 21:35:55 -0700 | [diff] [blame] | 252 | endef |
| 253 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 254 | # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results) |
| 255 | ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip |
| 256 | ifdef JPRT_ARCHIVE_BUNDLE |
| 257 | ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE) |
| 258 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 259 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 260 | # How to create the test bundle (pass or fail, we want to create this) |
| 261 | # Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed. |
Kelly O'Hair | 5613186 | 2010-05-12 21:35:55 -0700 | [diff] [blame] | 262 | ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 263 | && $(CD) $(ABS_TEST_OUTPUT_DIR) \ |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 264 | && $(CHMOD) -R a+r . \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 265 | && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . ) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 266 | SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt |
| 267 | STATS_TXT_NAME = Stats.txt |
| 268 | STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME) |
| 269 | RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt |
| 270 | PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt |
| 271 | FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 272 | EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt |
| 273 | |
| 274 | TESTEXIT = \ |
| 275 | if [ ! -s $(EXITCODE) ] ; then \ |
| 276 | $(ECHO) "ERROR: EXITCODE file not filled in."; \ |
| 277 | $(ECHO) "1" > $(EXITCODE); \ |
| 278 | fi ; \ |
| 279 | testExitCode=`$(CAT) $(EXITCODE)`; \ |
| 280 | $(ECHO) "EXIT CODE: $${testExitCode}"; \ |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 281 | exit $${testExitCode} |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 282 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 283 | BUNDLE_UP_AND_EXIT = \ |
| 284 | ( \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 285 | jtregExitCode=$$? && \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 286 | _summary="$(SUMMARY_TXT)"; \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 287 | $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \ |
| 288 | $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 289 | if [ -r "$${_summary}" ] ; then \ |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 290 | $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 291 | $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \ |
| 292 | $(EGREP) ' Passed\.' $(RUNLIST) \ |
| 293 | | $(EGREP) -v ' Error\.' \ |
| 294 | | $(EGREP) -v ' Failed\.' > $(PASSLIST); \ |
| 295 | ( $(EGREP) ' Failed\.' $(RUNLIST); \ |
| 296 | $(EGREP) ' Error\.' $(RUNLIST); \ |
| 297 | $(EGREP) -v ' Passed\.' $(RUNLIST) ) \ |
| 298 | | $(SORT) | $(UNIQ) > $(FAILLIST); \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 299 | if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 300 | $(EXPAND) $(FAILLIST) \ |
| 301 | | $(CUT) -d' ' -f1 \ |
| 302 | | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 303 | if [ $${jtregExitCode} = 0 ] ; then \ |
| 304 | jtregExitCode=1; \ |
| 305 | fi; \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 306 | fi; \ |
| 307 | runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 308 | passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 309 | failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 310 | exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
Kelly O'Hair | b383b9b | 2010-06-20 14:53:36 -0700 | [diff] [blame] | 311 | $(ECHO) "TEST STATS: name=$(UNIQUE_DIR) run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 312 | >> $(STATS_TXT); \ |
| 313 | else \ |
| 314 | $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ |
| 315 | fi; \ |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 316 | if [ -f $(STATS_TXT) ] ; then \ |
| 317 | $(CAT) $(STATS_TXT); \ |
| 318 | fi; \ |
Kelly O'Hair | e4fce69 | 2010-03-06 14:59:23 -0800 | [diff] [blame] | 319 | $(ZIP_UP_RESULTS) ; \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 320 | $(TESTEXIT) \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 321 | ) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 322 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 323 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 324 | |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 325 | # Default make rule (runs default jdk tests) |
| 326 | all: jdk_default |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 327 | @$(ECHO) "Testing completed successfully" |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 328 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 329 | # Prep for output |
| 330 | prep: clean |
| 331 | @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR) |
Kelly O'Hair | b383b9b | 2010-06-20 14:53:36 -0700 | [diff] [blame] | 332 | @$(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 333 | |
| 334 | # Cleanup |
| 335 | clean: |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 336 | $(RM) -r $(ABS_TEST_OUTPUT_DIR) |
| 337 | $(RM) $(ARCHIVE_BUNDLE) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 338 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 339 | ################################################################ |
| 340 | |
| 341 | # jtreg tests |
| 342 | |
| 343 | # 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] | 344 | ifndef JT_HOME |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 345 | JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 346 | ifdef JPRT_JTREG_HOME |
| 347 | JT_HOME = $(JPRT_JTREG_HOME) |
| 348 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 349 | endif |
| 350 | |
| 351 | # Expect JPRT to set TESTDIRS to the jtreg test dirs |
| 352 | ifndef TESTDIRS |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 353 | TESTDIRS = demo |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 354 | endif |
| 355 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 356 | # Agentvm settings (default is false) |
| 357 | ifndef USE_JTREG_AGENTVM |
| 358 | USE_JTREG_AGENTVM=false |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 359 | endif |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 360 | # With agentvm, you cannot use -javaoptions? |
| 361 | ifeq ($(USE_JTREG_AGENTVM),true) |
| 362 | JTREG_AGENTVM_OPTION = -agentvm |
| 363 | EXTRA_JTREG_OPTIONS += $(JTREG_AGENTVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 364 | JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%) |
| 365 | else |
| 366 | JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
| 367 | endif |
| 368 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 369 | ifdef CONCURRENCY |
| 370 | EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY) |
| 371 | endif |
| 372 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 373 | # Some tests annoy me and fail frequently |
| 374 | PROBLEM_LIST=ProblemList.txt |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 375 | PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 376 | EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt |
| 377 | |
| 378 | # Create exclude list for this platform and arch |
| 379 | ifdef NO_EXCLUDES |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 380 | $(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 381 | @$(ECHO) "NOTHING_EXCLUDED" > $@ |
| 382 | else |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 383 | $(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 384 | @$(RM) $@ $@.temp1 $@.temp2 |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 385 | @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\ |
Kelly O'Hair | b383b9b | 2010-06-20 14:53:36 -0700 | [diff] [blame] | 386 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(PLATFORM_OS)' ) ;\ |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 387 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)' ) ;\ |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 388 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\ |
| 389 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\ |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 390 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)' ) ;\ |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 391 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\ |
| 392 | ($(ECHO) "#") ;\ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 393 | ) | $(SED) -e 's@^[\ ]*@@' \ |
| 394 | | $(EGREP) -v '^#' > $@.temp1 |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 395 | for tdir in $(TESTDIRS) SOLARIS_10_SH_BUG_NO_EMPTY_FORS ; do \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 396 | ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \ |
| 397 | done |
| 398 | @$(ECHO) "# at least one line" >> $@.temp2 |
| 399 | @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@ |
| 400 | @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items" |
| 401 | endif |
| 402 | |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 403 | # Select list of directories that exist |
| 404 | define TestDirs |
| 405 | $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i})) |
| 406 | endef |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 407 | # Running batches of tests with or without agentvm |
| 408 | define RunAgentvmBatch |
| 409 | $(ECHO) "Running tests in agentvm mode: $?" |
| 410 | $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=true UNIQUE_DIR=$@ jtreg_tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 411 | endef |
| 412 | define RunOthervmBatch |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 413 | $(ECHO) "Running tests in othervm mode: $?" |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 414 | $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=false UNIQUE_DIR=$@ jtreg_tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 415 | endef |
| 416 | define SummaryInfo |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 417 | $(ECHO) "########################################################" |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 418 | $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 419 | $(ECHO) "########################################################" |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 420 | endef |
| 421 | |
| 422 | # ------------------------------------------------------------------ |
| 423 | |
| 424 | # Batches of tests (somewhat arbitrary assigments to jdk_* targets) |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 425 | JDK_DEFAULT_TARGETS = |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 426 | JDK_ALL_TARGETS = |
| 427 | |
| 428 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 429 | # Using agentvm has problems, and doesn't help performance as much as others. |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 430 | JDK_ALL_TARGETS += jdk_awt |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 431 | jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \ |
| 432 | javax/imageio javax/print sun/pisces) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 433 | $(call RunOthervmBatch) |
| 434 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 435 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 436 | JDK_ALL_TARGETS += jdk_beans1 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 437 | JDK_DEFAULT_TARGETS += jdk_beans1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 438 | jdk_beans1: $(call TestDirs, \ |
| 439 | java/beans/beancontext java/beans/PropertyChangeSupport \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 440 | java/beans/Introspector java/beans/Performance \ |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 441 | java/beans/VetoableChangeSupport java/beans/Statement) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 442 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 443 | |
| 444 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 445 | # Using agentvm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 446 | JDK_ALL_TARGETS += jdk_beans2 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 447 | jdk_beans2: $(call TestDirs, \ |
| 448 | java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \ |
| 449 | java/beans/PropertyEditor) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 450 | $(call RunOthervmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 451 | |
| 452 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 453 | # Using agentvm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 454 | JDK_ALL_TARGETS += jdk_beans3 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 455 | jdk_beans3: $(call TestDirs, java/beans/XMLEncoder) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 456 | $(call RunOthervmBatch) |
| 457 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 458 | # All beans tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 459 | jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3 |
| 460 | @$(SummaryInfo) |
| 461 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 462 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 463 | JDK_ALL_TARGETS += jdk_io |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 464 | JDK_DEFAULT_TARGETS += jdk_io |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 465 | jdk_io: $(call TestDirs, java/io) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 466 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 467 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 468 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 469 | JDK_ALL_TARGETS += jdk_lang |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 470 | JDK_DEFAULT_TARGETS += jdk_lang |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 471 | jdk_lang: $(call TestDirs, java/lang) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 472 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 473 | |
| 474 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 475 | # Using agentvm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 476 | JDK_ALL_TARGETS += jdk_management1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 477 | jdk_management1: $(call TestDirs, javax/management) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 478 | $(call RunOthervmBatch) |
| 479 | |
| 480 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 481 | # Using agentvm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 482 | JDK_ALL_TARGETS += jdk_management2 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 483 | jdk_management2: $(call TestDirs, com/sun/jmx com/sun/management sun/management) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 484 | $(call RunOthervmBatch) |
| 485 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 486 | # All management tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 487 | jdk_management: jdk_management1 jdk_management2 |
| 488 | @$(SummaryInfo) |
| 489 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 490 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 491 | JDK_ALL_TARGETS += jdk_math |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 492 | JDK_DEFAULT_TARGETS += jdk_math |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 493 | jdk_math: $(call TestDirs, java/math) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 494 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 495 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 496 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 497 | JDK_ALL_TARGETS += jdk_misc |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 498 | JDK_DEFAULT_TARGETS += jdk_misc |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 499 | jdk_misc: $(call TestDirs, \ |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 500 | demo/jvmti demo/zipfs javax/naming javax/script \ |
| 501 | javax/smartcardio com/sun/jndi com/sun/xml sun/misc) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 502 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 503 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 504 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 505 | JDK_ALL_TARGETS += jdk_net |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 506 | JDK_DEFAULT_TARGETS += jdk_net |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 507 | jdk_net: $(call TestDirs, com/sun/net java/net sun/net) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 508 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 509 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 510 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 511 | JDK_ALL_TARGETS += jdk_nio1 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 512 | JDK_DEFAULT_TARGETS += jdk_nio1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 513 | jdk_nio1: $(call TestDirs, java/nio/file) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 514 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 515 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 516 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 517 | JDK_ALL_TARGETS += jdk_nio2 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 518 | JDK_DEFAULT_TARGETS += jdk_nio2 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 519 | jdk_nio2: $(call TestDirs, java/nio/Buffer java/nio/ByteOrder \ |
Mandy Chung | 793f107 | 2011-03-29 15:50:55 -0700 | [diff] [blame] | 520 | java/nio/channels java/nio/MappedByteBuffer) |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 521 | $(call SharedLibraryPermissions,java/nio/channels) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 522 | $(call RunAgentvmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 523 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 524 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 525 | JDK_ALL_TARGETS += jdk_nio3 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 526 | JDK_DEFAULT_TARGETS += jdk_nio3 |
Chris Hegarty | d97cf81 | 2011-06-23 13:00:14 +0100 | [diff] [blame] | 527 | jdk_nio3: $(call TestDirs, sun/nio) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 528 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 529 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 530 | # All nio tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 531 | jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3 |
| 532 | @$(SummaryInfo) |
| 533 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 534 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Chris Hegarty | d97cf81 | 2011-06-23 13:00:14 +0100 | [diff] [blame] | 535 | jdk_sctp: $(call TestDirs, com/sun/nio/sctp) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 536 | $(call RunAgentvmBatch) |
Chris Hegarty | d97cf81 | 2011-06-23 13:00:14 +0100 | [diff] [blame] | 537 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 538 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 539 | # Using agentvm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 540 | JDK_ALL_TARGETS += jdk_rmi |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 541 | jdk_rmi: $(call TestDirs, java/rmi javax/rmi sun/rmi) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 542 | $(call RunOthervmBatch) |
| 543 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 544 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 545 | JDK_ALL_TARGETS += jdk_security1 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 546 | JDK_DEFAULT_TARGETS += jdk_security1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 547 | jdk_security1: $(call TestDirs, java/security) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 548 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 549 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 550 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 551 | JDK_ALL_TARGETS += jdk_security2 |
Weijun Wang | 5dcff73 | 2011-08-30 10:46:27 +0800 | [diff] [blame] | 552 | jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 553 | $(call RunAgentvmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 554 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 555 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 556 | JDK_ALL_TARGETS += jdk_security3 |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 557 | jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \ |
Valerie Peng | eafb7ad | 2012-01-12 16:04:03 -0800 | [diff] [blame^] | 558 | sun/security com/sun/org/apache/xml/internal/security \ |
| 559 | com/oracle/secrity/ucrypto) |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 560 | $(call SharedLibraryPermissions,sun/security) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 561 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 562 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 563 | # All security tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 564 | jdk_security: jdk_security1 jdk_security2 jdk_security3 |
| 565 | @$(SummaryInfo) |
| 566 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 567 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 568 | JDK_ALL_TARGETS += jdk_sound |
| 569 | jdk_sound: $(call TestDirs, javax/sound) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 570 | $(call RunAgentvmBatch) |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 571 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 572 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 573 | # Using agentvm has problems, and doesn't help performance as much as others. |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 574 | JDK_ALL_TARGETS += jdk_swing |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 575 | jdk_swing: $(call TestDirs, javax/swing sun/java2d \ |
| 576 | demo/jfc com/sun/java/swing) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 577 | $(call RunOthervmBatch) |
| 578 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 579 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 580 | JDK_ALL_TARGETS += jdk_text |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 581 | JDK_DEFAULT_TARGETS += jdk_text |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 582 | jdk_text: $(call TestDirs, java/text sun/text) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 583 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 584 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 585 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 586 | JDK_ALL_TARGETS += jdk_tools1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 587 | jdk_tools1: $(call TestDirs, com/sun/jdi) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 588 | $(call RunAgentvmBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 589 | |
| 590 | # Stable othervm testruns (minus items from PROBLEM_LIST) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 591 | # Using agentvm has serious problems with these tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 592 | JDK_ALL_TARGETS += jdk_tools2 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 593 | jdk_tools2: $(call TestDirs, \ |
| 594 | com/sun/tools sun/jvmstat sun/tools tools vm \ |
| 595 | com/sun/servicetag com/sun/tracing) |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 596 | $(call SharedLibraryPermissions,tools/launcher) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 597 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 598 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 599 | # All tools tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 600 | jdk_tools: jdk_tools1 jdk_tools2 |
| 601 | @$(SummaryInfo) |
| 602 | |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 603 | # Stable agentvm testruns (minus items from PROBLEM_LIST) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 604 | JDK_ALL_TARGETS += jdk_util |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 605 | JDK_DEFAULT_TARGETS += jdk_util |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 606 | jdk_util: $(call TestDirs, java/util sun/util) |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 607 | $(call RunAgentvmBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 608 | |
| 609 | # ------------------------------------------------------------------ |
| 610 | |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 611 | # Run default tests |
| 612 | jdk_default: $(JDK_DEFAULT_TARGETS) |
| 613 | @$(SummaryInfo) |
| 614 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 615 | # Run all tests |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 616 | jdk_all: $(JDK_ALL_TARGETS) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 617 | @$(SummaryInfo) |
| 618 | |
| 619 | # These are all phony targets |
| 620 | PHONY_LIST += $(JDK_ALL_TARGETS) |
| 621 | |
| 622 | # ------------------------------------------------------------------ |
| 623 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 624 | # Default JTREG to run (win32 script works for everybody) |
| 625 | JTREG = $(JT_HOME)/win32/bin/jtreg |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 626 | # Add any extra options (agentvm etc.) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 627 | JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) |
| 628 | # Only run automatic tests |
| 629 | JTREG_BASIC_OPTIONS += -a |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 630 | # Always turn on assertions |
| 631 | JTREG_ASSERT_OPTION = -ea -esa |
| 632 | JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 633 | # Report details on all failed or error tests, times too |
| 634 | JTREG_BASIC_OPTIONS += -v:fail,error,time |
| 635 | # Retain all files for failing tests |
| 636 | JTREG_BASIC_OPTIONS += -retain:fail,error |
| 637 | # Ignore tests are not run and completely silent about it |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 638 | JTREG_IGNORE_OPTION = -ignore:quiet |
| 639 | JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 640 | # Multiple by 4 the timeout numbers |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 641 | JTREG_TIMEOUT_OPTION = -timeoutFactor:4 |
| 642 | JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 643 | # Boost the max memory for jtreg to avoid gc thrashing |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 644 | JTREG_MEMORY_OPTION = -J-Xmx512m |
| 645 | JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 646 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 647 | # Make sure jtreg exists |
| 648 | $(JTREG): $(JT_HOME) |
| 649 | |
| 650 | # Run jtreg |
| 651 | jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST) |
| 652 | @$(EXPAND) $(EXCLUDELIST) \ |
| 653 | | $(CUT) -d' ' -f1 \ |
| 654 | | $(SED) -e 's@^@Excluding: @' |
| 655 | ( \ |
| 656 | ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ |
| 657 | export JT_HOME; \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 658 | $(shell $(GETMIXEDPATH) "$(JTREG)") \ |
| 659 | $(JTREG_BASIC_OPTIONS) \ |
| 660 | -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \ |
| 661 | -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \ |
| 662 | -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
| 663 | -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \ |
| 664 | $(JTREG_TEST_OPTIONS) \ |
| 665 | $(TESTDIRS) \ |
| 666 | ) ; $(BUNDLE_UP_AND_EXIT) \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 667 | ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 668 | |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 669 | # Rule that may change execute permissions on shared library files. |
| 670 | # Files in repositories should never have execute permissions, but there |
| 671 | # are some tests that have pre-built shared libraries, and these windows |
| 672 | # dll files must have execute permission. Adding execute permission |
| 673 | # may happen automatically on windows when using certain versions of mercurial |
| 674 | # but it cannot be guaranteed. And blindly adding execute permission might |
| 675 | # be seen as a mercurial 'change', so we avoid adding execute permission to |
| 676 | # repository files. But testing from a plain source tree needs the chmod a+rx. |
| 677 | # Used on select directories and applying the chmod to all shared libraries |
| 678 | # not just dll files. On windows, this may not work with MKS if the files |
| 679 | # were installed with CYGWIN unzip or untar (MKS chmod may not do anything). |
| 680 | # And with CYGWIN and sshd service, you may need CYGWIN=ntsec for this to work. |
| 681 | # |
| 682 | shared_library_permissions: $(SHARED_LIBRARY_DIR) |
| 683 | if [ ! -d $(TEST_ROOT)/../.hg ] ; then \ |
| 684 | $(FIND) $< \( -name \*.dll -o -name \*.DLL -o -name \*.so \) \ |
| 685 | -exec $(CHMOD) a+rx {} \; ; \ |
| 686 | fi |
| 687 | |
| 688 | PHONY_LIST += jtreg_tests shared_library_permissions |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 689 | |
| 690 | ################################################################ |
| 691 | |
| 692 | # packtest |
| 693 | |
| 694 | # Expect JPRT to set JPRT_PACKTEST_HOME. |
| 695 | PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest |
| 696 | ifdef JPRT_PACKTEST_HOME |
| 697 | PACKTEST_HOME = $(JPRT_PACKTEST_HOME) |
| 698 | endif |
| 699 | |
| 700 | packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME) |
| 701 | ( $(CD) $(PACKTEST_HOME) && \ |
| 702 | $(PACKTEST_HOME)/ptest \ |
| 703 | -t "$(PRODUCT_HOME)" \ |
| 704 | $(PACKTEST_STRESS_OPTION) \ |
| 705 | $(EXTRA_PACKTEST_OPTIONS) \ |
| 706 | -W $(ABS_TEST_OUTPUT_DIR) \ |
| 707 | $(JAVA_ARGS:%=-J %) \ |
| 708 | $(JAVA_VM_ARGS:%=-J %) \ |
| 709 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 710 | |
| 711 | packtest_stress: PACKTEST_STRESS_OPTION=-s |
| 712 | packtest_stress: packtest |
| 713 | |
| 714 | PHONY_LIST += packtest packtest_stress |
| 715 | |
| 716 | ################################################################ |
| 717 | |
Mandy Chung | 793f107 | 2011-03-29 15:50:55 -0700 | [diff] [blame] | 718 | # perftest to collect statistics |
Mandy Chung | e2f7248 | 2009-05-26 17:47:57 -0700 | [diff] [blame] | 719 | |
| 720 | # Expect JPRT to set JPRT_PACKTEST_HOME. |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 721 | PERFTEST_HOME = $(TEST_ROOT)/perf |
Mandy Chung | e2f7248 | 2009-05-26 17:47:57 -0700 | [diff] [blame] | 722 | ifdef JPRT_PERFTEST_HOME |
| 723 | PERFTEST_HOME = $(JPRT_PERFTEST_HOME) |
| 724 | endif |
| 725 | |
| 726 | perftest: ( $(PERFTEST_HOME)/perftest \ |
| 727 | -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
| 728 | -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \ |
| 729 | -h $(PERFTEST_HOME) \ |
| 730 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 731 | |
| 732 | |
| 733 | PHONY_LIST += perftest |
| 734 | |
| 735 | ################################################################ |
| 736 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 737 | # vmsqe tests |
| 738 | |
| 739 | # Expect JPRT to set JPRT_VMSQE_HOME. |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 740 | VMSQE_HOME = $(SLASH_JAVA)/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 741 | ifdef JPRT_VMSQE_HOME |
| 742 | VMSQE_HOME = $(JPRT_VMSQE_HOME) |
| 743 | endif |
| 744 | |
| 745 | # Expect JPRT to set JPRT_RUNVMSQE_HOME. |
| 746 | RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe |
| 747 | ifdef JPRT_RUNVMSQE_HOME |
| 748 | RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME) |
| 749 | endif |
| 750 | |
| 751 | # Expect JPRT to set JPRT_TONGA3_HOME. |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 752 | TONGA3_HOME = $(SLASH_JAVA)/sqe/tools/gtee/harness/tonga |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 753 | ifdef JPRT_TONGA3_HOME |
| 754 | TONGA3_HOME = $(JPRT_TONGA3_HOME) |
| 755 | endif |
| 756 | |
| 757 | RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe |
| 758 | |
| 759 | vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME) |
| 760 | $(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe |
| 761 | ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \ |
| 762 | $(RUNVMSQE_BIN) \ |
| 763 | -jdk "$(PRODUCT_HOME)" \ |
| 764 | -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \ |
| 765 | -testbase "$(VMSQE_HOME)/vm" \ |
| 766 | -tonga "$(TONGA3_HOME)" \ |
| 767 | -tongajdk "$(ALT_BOOTDIR)" \ |
| 768 | $(JAVA_ARGS) \ |
| 769 | $(JAVA_VM_ARGS) \ |
| 770 | $(RUNVMSQE_TEST_OPTION) \ |
| 771 | $(EXTRA_RUNVMSQE_OPTIONS) \ |
| 772 | ) ; $(BUNDLE_UP_AND_EXIT) |
| 773 | |
| 774 | vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp |
| 775 | vmsqe_jdwp: vmsqe_tests |
| 776 | |
| 777 | vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi |
| 778 | vmsqe_jdi: vmsqe_tests |
| 779 | |
| 780 | vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb |
| 781 | vmsqe_jdb: vmsqe_tests |
| 782 | |
| 783 | vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi |
| 784 | vmsqe_quick-jdi: vmsqe_tests |
| 785 | |
| 786 | vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi |
| 787 | vmsqe_sajdi: vmsqe_tests |
| 788 | |
| 789 | vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti |
| 790 | vmsqe_jvmti: vmsqe_tests |
| 791 | |
| 792 | vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof |
| 793 | vmsqe_hprof: vmsqe_tests |
| 794 | |
| 795 | vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring |
| 796 | vmsqe_monitoring: vmsqe_tests |
| 797 | |
| 798 | PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \ |
| 799 | vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests |
| 800 | |
| 801 | ################################################################ |
| 802 | |
| 803 | # jck tests |
| 804 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 805 | # Default is to use jck 7 from /java/re |
| 806 | JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/7/promoted/latest/binaries |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 807 | |
| 808 | # Expect JPRT to set JPRT_JCK7COMPILER_HOME. |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 809 | JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-7 |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 810 | ifdef JPRT_JCK7COMPILER_HOME |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 811 | JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)/JCK-compiler-7 |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 812 | endif |
| 813 | |
| 814 | # Expect JPRT to set JPRT_JCK7RUNTIME_HOME. |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 815 | JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-7 |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 816 | ifdef JPRT_JCK7RUNTIME_HOME |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 817 | JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)/JCK-runtime-7 |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 818 | endif |
| 819 | |
| 820 | # Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME. |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 821 | JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-7 |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 822 | ifdef JPRT_JCK7DEVTOOLS_HOME |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 823 | JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)/JCK-devtools-7 |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 824 | endif |
| 825 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 826 | # The jtjck.jar utility to use to run the tests |
| 827 | JTJCK_JAR = $(JCK_HOME)/lib/jtjck.jar |
| 828 | JTJCK_JAVA_ARGS = -XX:MaxPermSize=256m -Xmx512m |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 829 | JTJCK_OPTIONS = -headless -v |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 830 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 831 | # Default tests to run |
| 832 | ifndef JCK_COMPILER_TESTS |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 833 | JCK_COMPILER_TESTS = |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 834 | endif |
| 835 | ifndef JCK_RUNTIME_TESTS |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 836 | JCK_RUNTIME_TESTS = |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 837 | endif |
| 838 | ifndef JCK_DEVTOOLS_TESTS |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 839 | JCK_DEVTOOLS_TESTS = |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 840 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 841 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 842 | # Generic rule used to run jck tests |
| 843 | _generic_jck_tests: prep $(PRODUCT_HOME) $(EXCLUDELIST) |
| 844 | @$(EXPAND) $(EXCLUDELIST) \ |
| 845 | | $(CUT) -d' ' -f1 \ |
| 846 | | $(SED) -e 's@^@Excluding: @' |
| 847 | ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \ |
| 848 | $(PRODUCT_HOME)/bin/java $(JTJCK_JAVA_ARGS) \ |
| 849 | -jar "$(JTJCK_JAR)" \ |
| 850 | $(JTJCK_OPTIONS) \ |
| 851 | -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \ |
| 852 | -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \ |
| 853 | -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
| 854 | $(TESTDIRS) \ |
| 855 | ) ; $(BUNDLE_UP_AND_EXIT) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 856 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 857 | # JCK7 compiler tests |
| 858 | jck7compiler: |
| 859 | $(MAKE) UNIQUE_DIR=$@ \ |
| 860 | JCK_HOME=$(JCK7COMPILER_HOME) \ |
| 861 | TESTDIRS="$(JCK_COMPILER_TESTS)" \ |
| 862 | _generic_jck_tests |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 863 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 864 | # JCK7 runtime tests |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 865 | jck7runtime: |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 866 | $(MAKE) UNIQUE_DIR=$@ \ |
| 867 | JCK_HOME=$(JCK7RUNTIME_HOME) \ |
| 868 | TESTDIRS="$(JCK_RUNTIME_TESTS)" \ |
| 869 | _generic_jck_tests |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 870 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 871 | # JCK7 devtools tests |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 872 | jck7devtools: |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 873 | $(MAKE) UNIQUE_DIR=$@ \ |
| 874 | JCK_HOME=$(JCK7DEVTOOLS_HOME) \ |
| 875 | TESTDIRS="$(JCK_DEVTOOLS_TESTS)" \ |
| 876 | _generic_jck_tests |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 877 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 878 | # Run all 3 sets of JCK7 tests |
| 879 | jck_all: jck7runtime jck7devtools jck7compiler |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 880 | |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 881 | PHONY_LIST += jck_all _generic_jck_tests \ |
| 882 | jck7compiler jck7runtime jck7devtools |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 883 | |
| 884 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 885 | |
| 886 | # Phony targets (e.g. these are not filenames) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 887 | .PHONY: all clean prep $(PHONY_LIST) |
| 888 | |
| 889 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 890 | |