J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 1 | # |
Mike Duigou | 12f1183 | 2013-04-01 20:15:48 -0700 | [diff] [blame] | 2 | # Copyright (c) 1995, 2013, 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 |
Alan Bateman | 3269d85 | 2012-03-06 20:34:38 +0000 | [diff] [blame] | 82 | ifeq ($(UNAME_S), Darwin) |
| 83 | OS_NAME = macosx |
| 84 | OS_ARCH := $(shell $(UNAME) -m) |
| 85 | # Check for unknown arch, try uname -p if uname -m says unknown |
| 86 | ifeq ($(OS_ARCH),unknown) |
| 87 | OS_ARCH := $(shell $(UNAME) -p) |
| 88 | endif |
| 89 | OS_VERSION := $(shell $(UNAME) -r) |
| 90 | endif |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 91 | ifeq ($(OS_NAME),) |
| 92 | OS_NAME = windows |
| 93 | # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
| 94 | # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
| 95 | ifeq ($(PROCESSOR_IDENTIFIER),) |
| 96 | PROC_ARCH:=$(shell $(UNAME) -m) |
| 97 | else |
| 98 | PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
| 99 | endif |
| 100 | OS_ARCH:=$(PROC_ARCH) |
| 101 | SLASH_JAVA = J: |
| 102 | EXESUFFIX = .exe |
| 103 | # These need to be different depending on MKS or CYGWIN |
| 104 | ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), ) |
| 105 | GETMIXEDPATH = dosname -s |
| 106 | OS_VERSION := $(shell $(UNAME) -r) |
| 107 | else |
| 108 | GETMIXEDPATH = cygpath -m -s |
| 109 | OS_VERSION := $(shell $(UNAME) -s | $(CUT) -d'-' -f2) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 110 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 111 | endif |
| 112 | |
| 113 | # Only want major and minor numbers from os version |
| 114 | OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2) |
| 115 | |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 116 | # Name to use for x86_64 arch (historically amd64, but should change someday) |
| 117 | OS_ARCH_X64_NAME:=amd64 |
| 118 | #OS_ARCH_X64_NAME:=x64 |
| 119 | |
| 120 | # Alternate arch names (in case this arch is known by a second name) |
| 121 | # PROBLEM_LISTS may use either name. |
| 122 | OS_ARCH2-amd64:=x64 |
| 123 | #OS_ARCH2-x64:=amd64 |
| 124 | |
| 125 | # Try and use the arch names consistently |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 126 | OS_ARCH:=$(patsubst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 127 | OS_ARCH:=$(patsubst X64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 128 | OS_ARCH:=$(patsubst AMD64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 129 | OS_ARCH:=$(patsubst amd64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 130 | OS_ARCH:=$(patsubst x86_64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 131 | OS_ARCH:=$(patsubst 8664,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 132 | OS_ARCH:=$(patsubst EM64T,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 133 | OS_ARCH:=$(patsubst em64t,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 134 | OS_ARCH:=$(patsubst intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 135 | OS_ARCH:=$(patsubst Intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 136 | OS_ARCH:=$(patsubst INTEL64,$(OS_ARCH_X64_NAME),$(OS_ARCH)) |
| 137 | OS_ARCH:=$(patsubst IA64,ia64,$(OS_ARCH)) |
| 138 | OS_ARCH:=$(patsubst X86,i586,$(OS_ARCH)) |
| 139 | OS_ARCH:=$(patsubst x86,i586,$(OS_ARCH)) |
| 140 | OS_ARCH:=$(patsubst i386,i586,$(OS_ARCH)) |
| 141 | OS_ARCH:=$(patsubst i486,i586,$(OS_ARCH)) |
| 142 | OS_ARCH:=$(patsubst i686,i586,$(OS_ARCH)) |
| 143 | OS_ARCH:=$(patsubst 386,i586,$(OS_ARCH)) |
| 144 | OS_ARCH:=$(patsubst 486,i586,$(OS_ARCH)) |
| 145 | OS_ARCH:=$(patsubst 586,i586,$(OS_ARCH)) |
| 146 | OS_ARCH:=$(patsubst 686,i586,$(OS_ARCH)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 147 | |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 148 | # Default ARCH_DATA_MODEL settings |
| 149 | ARCH_DATA_MODEL-i586 = 32 |
| 150 | ARCH_DATA_MODEL-$(OS_ARCH_X64_NAME) = 64 |
| 151 | ARCH_DATA_MODEL-ia64 = 64 |
| 152 | ARCH_DATA_MODEL-sparc = 32 |
| 153 | ARCH_DATA_MODEL-sparcv9 = 64 |
| 154 | |
| 155 | # If ARCH_DATA_MODEL is not defined, try and pick a reasonable default |
| 156 | ifndef ARCH_DATA_MODEL |
| 157 | ARCH_DATA_MODEL:=$(ARCH_DATA_MODEL-$(OS_ARCH)) |
| 158 | endif |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 159 | ifndef ARCH_DATA_MODEL |
| 160 | ARCH_DATA_MODEL=32 |
| 161 | endif |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 162 | |
| 163 | # Platform directory name |
| 164 | PLATFORM_OS = $(OS_NAME)-$(OS_ARCH) |
| 165 | |
| 166 | # Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 167 | ARCH_DATA_MODEL_ERROR= \ |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 168 | 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] | 169 | ifeq ($(ARCH_DATA_MODEL),64) |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 170 | ifeq ($(PLATFORM_OS),solaris-i586) |
| 171 | OS_ARCH=$(OS_ARCH_X64_NAME) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 172 | endif |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 173 | ifeq ($(PLATFORM_OS),solaris-sparc) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 174 | OS_ARCH=sparcv9 |
| 175 | endif |
| 176 | ifeq ($(OS_ARCH),i586) |
| 177 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 178 | endif |
| 179 | ifeq ($(OS_ARCH),sparc) |
| 180 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 181 | endif |
| 182 | else |
| 183 | ifeq ($(ARCH_DATA_MODEL),32) |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 184 | ifeq ($(OS_ARCH),$(OS_ARCH_X64_NAME)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 185 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 186 | endif |
| 187 | ifeq ($(OS_ARCH),ia64) |
| 188 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 189 | endif |
| 190 | ifeq ($(OS_ARCH),sparcv9) |
| 191 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
| 192 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 193 | else |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 194 | x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)") |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 195 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 196 | endif |
| 197 | |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 198 | # Alternate OS_ARCH name (defaults to OS_ARCH) |
| 199 | OS_ARCH2:=$(OS_ARCH2-$(OS_ARCH)) |
| 200 | ifeq ($(OS_ARCH2),) |
| 201 | OS_ARCH2:=$(OS_ARCH) |
| 202 | endif |
| 203 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 204 | # 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] | 205 | TEST_ROOT := $(shell $(PWD)) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 206 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 207 | # Root of all test results |
| 208 | ifdef ALT_OUTPUTDIR |
| 209 | ABS_OUTPUTDIR = $(ALT_OUTPUTDIR) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 210 | else |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 211 | ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(PLATFORM_OS) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 212 | endif |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 213 | ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) |
| 214 | ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 215 | |
| 216 | # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) |
| 217 | ifndef PRODUCT_HOME |
| 218 | # Try to use j2sdk-image if it exists |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 219 | ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/j2sdk-image |
| 220 | PRODUCT_HOME := \ |
| 221 | $(shell \ |
| 222 | if [ -d $(ABS_JDK_IMAGE) ] ; then \ |
| 223 | $(ECHO) "$(ABS_JDK_IMAGE)"; \ |
| 224 | else \ |
| 225 | $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)"; \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 226 | fi) |
| 227 | PRODUCT_HOME := $(PRODUCT_HOME) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 228 | endif |
| 229 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 230 | # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.) |
| 231 | # Should be passed into 'java' only. |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 232 | # Could include: -d64 -server -client OR any java option |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 233 | ifdef JPRT_PRODUCT_ARGS |
| 234 | JAVA_ARGS = $(JPRT_PRODUCT_ARGS) |
| 235 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 236 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 237 | # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.) |
| 238 | # Should be passed into anything running the vm (java, javac, javadoc, ...). |
| 239 | ifdef JPRT_PRODUCT_VM_ARGS |
| 240 | JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS) |
| 241 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 242 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 243 | # Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc. |
| 244 | ifeq ($(OS_NAME),solaris) |
| 245 | D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS) |
| 246 | ifeq ($(ARCH_DATA_MODEL),32) |
| 247 | ifneq ($(findstring -d64,$(JAVA_ARGS)),) |
| 248 | x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)") |
| 249 | endif |
| 250 | endif |
| 251 | ifeq ($(ARCH_DATA_MODEL),64) |
| 252 | ifeq ($(findstring -d64,$(JAVA_ARGS)),) |
| 253 | x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)") |
| 254 | endif |
| 255 | endif |
| 256 | endif |
| 257 | |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 258 | # Macro to run make and set the shared library permissions |
| 259 | define SharedLibraryPermissions |
| 260 | $(MAKE) SHARED_LIBRARY_DIR=$1 UNIQUE_DIR=$@ shared_library_permissions |
Kelly O'Hair | 5613186 | 2010-05-12 21:35:55 -0700 | [diff] [blame] | 261 | endef |
| 262 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 263 | # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results) |
| 264 | ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip |
| 265 | ifdef JPRT_ARCHIVE_BUNDLE |
| 266 | ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE) |
| 267 | endif |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 268 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 269 | # How to create the test bundle (pass or fail, we want to create this) |
| 270 | # 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] | 271 | ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 272 | && $(CD) $(ABS_TEST_OUTPUT_DIR) \ |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 273 | && $(CHMOD) -R a+r . \ |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 274 | && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . ) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 275 | SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt |
| 276 | STATS_TXT_NAME = Stats.txt |
| 277 | STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME) |
| 278 | RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt |
| 279 | PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt |
| 280 | FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 281 | EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt |
| 282 | |
| 283 | TESTEXIT = \ |
| 284 | if [ ! -s $(EXITCODE) ] ; then \ |
| 285 | $(ECHO) "ERROR: EXITCODE file not filled in."; \ |
| 286 | $(ECHO) "1" > $(EXITCODE); \ |
| 287 | fi ; \ |
| 288 | testExitCode=`$(CAT) $(EXITCODE)`; \ |
| 289 | $(ECHO) "EXIT CODE: $${testExitCode}"; \ |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 290 | exit $${testExitCode} |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 291 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 292 | BUNDLE_UP_AND_EXIT = \ |
| 293 | ( \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 294 | jtregExitCode=$$? && \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 295 | _summary="$(SUMMARY_TXT)"; \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 296 | $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \ |
| 297 | $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 298 | if [ -r "$${_summary}" ] ; then \ |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 299 | $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 300 | $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \ |
| 301 | $(EGREP) ' Passed\.' $(RUNLIST) \ |
| 302 | | $(EGREP) -v ' Error\.' \ |
| 303 | | $(EGREP) -v ' Failed\.' > $(PASSLIST); \ |
| 304 | ( $(EGREP) ' Failed\.' $(RUNLIST); \ |
| 305 | $(EGREP) ' Error\.' $(RUNLIST); \ |
| 306 | $(EGREP) -v ' Passed\.' $(RUNLIST) ) \ |
| 307 | | $(SORT) | $(UNIQ) > $(FAILLIST); \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 308 | if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 309 | $(EXPAND) $(FAILLIST) \ |
| 310 | | $(CUT) -d' ' -f1 \ |
| 311 | | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 312 | if [ $${jtregExitCode} = 0 ] ; then \ |
| 313 | jtregExitCode=1; \ |
| 314 | fi; \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 315 | fi; \ |
| 316 | runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 317 | passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 318 | failc="`$(CAT) $(FAILLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
| 319 | exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ |
Kelly O'Hair | b383b9b | 2010-06-20 14:53:36 -0700 | [diff] [blame] | 320 | $(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] | 321 | >> $(STATS_TXT); \ |
| 322 | else \ |
| 323 | $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ |
| 324 | fi; \ |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 325 | if [ -f $(STATS_TXT) ] ; then \ |
| 326 | $(CAT) $(STATS_TXT); \ |
| 327 | fi; \ |
Kelly O'Hair | e4fce69 | 2010-03-06 14:59:23 -0800 | [diff] [blame] | 328 | $(ZIP_UP_RESULTS) ; \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 329 | $(TESTEXIT) \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 330 | ) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 331 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 332 | ################################################################ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 333 | |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 334 | # Default make rule (runs default jdk tests) |
| 335 | all: jdk_default |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 336 | @$(ECHO) "Testing completed successfully" |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 337 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 338 | # Prep for output |
Mike Duigou | cd2f264 | 2013-04-01 12:02:19 -0700 | [diff] [blame] | 339 | prep: |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 340 | @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR) |
Kelly O'Hair | b383b9b | 2010-06-20 14:53:36 -0700 | [diff] [blame] | 341 | @$(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 342 | |
| 343 | # Cleanup |
| 344 | clean: |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 345 | @$(RM) -r $(ABS_TEST_OUTPUT_DIR) |
| 346 | @$(RM) $(ARCHIVE_BUNDLE) |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 347 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 348 | ################################################################ |
| 349 | |
| 350 | # jtreg tests |
| 351 | |
| 352 | # 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] | 353 | ifndef JT_HOME |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 354 | 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] | 355 | ifdef JPRT_JTREG_HOME |
| 356 | JT_HOME = $(JPRT_JTREG_HOME) |
| 357 | endif |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 358 | endif |
| 359 | |
| 360 | # Expect JPRT to set TESTDIRS to the jtreg test dirs |
| 361 | ifndef TESTDIRS |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 362 | TESTDIRS = demo |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 363 | endif |
| 364 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 365 | # Some tests annoy me and fail frequently |
| 366 | PROBLEM_LIST=ProblemList.txt |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 367 | PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST)) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 368 | EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt |
| 369 | |
| 370 | # Create exclude list for this platform and arch |
| 371 | ifdef NO_EXCLUDES |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 372 | $(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 373 | @$(ECHO) "NOTHING_EXCLUDED" > $@ |
| 374 | else |
Kelly O'Hair | 119b647 | 2011-03-22 11:08:09 -0700 | [diff] [blame] | 375 | $(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 376 | @$(RM) $@ $@.temp1 $@.temp2 |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 377 | @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\ |
Kelly O'Hair | b383b9b | 2010-06-20 14:53:36 -0700 | [diff] [blame] | 378 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(PLATFORM_OS)' ) ;\ |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 379 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)' ) ;\ |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 380 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\ |
| 381 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\ |
Kelly O'Hair | 7913295 | 2010-03-12 09:03:02 -0800 | [diff] [blame] | 382 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)' ) ;\ |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 383 | ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\ |
| 384 | ($(ECHO) "#") ;\ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 385 | ) | $(SED) -e 's@^[\ ]*@@' \ |
| 386 | | $(EGREP) -v '^#' > $@.temp1 |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 387 | @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] | 388 | ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \ |
| 389 | done |
| 390 | @$(ECHO) "# at least one line" >> $@.temp2 |
| 391 | @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@ |
| 392 | @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items" |
| 393 | endif |
| 394 | |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 395 | # Select list of directories that exist |
| 396 | define TestDirs |
| 397 | $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i})) |
| 398 | endef |
Weijun Wang | 035522b | 2011-09-22 12:05:26 +0800 | [diff] [blame] | 399 | # Running batches of tests with or without agentvm |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 400 | define RunBatch |
| 401 | $(ECHO) "Running tests: $?" |
| 402 | $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" UNIQUE_DIR=$@ jtreg_tests |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 403 | endef |
| 404 | define SummaryInfo |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 405 | $(ECHO) "########################################################" |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 406 | $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME)) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 407 | $(ECHO) "########################################################" |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 408 | endef |
| 409 | |
| 410 | # ------------------------------------------------------------------ |
| 411 | |
| 412 | # Batches of tests (somewhat arbitrary assigments to jdk_* targets) |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 413 | # NOTE: These *do not* run the same tests as make/jprt.properties |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 414 | JDK_DEFAULT_TARGETS = |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 415 | JDK_ALL_TARGETS = |
| 416 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 417 | JDK_ALL_TARGETS += jdk_awt |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 418 | jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \ |
| 419 | javax/imageio javax/print sun/pisces) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 420 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 421 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 422 | JDK_ALL_TARGETS += jdk_beans1 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 423 | JDK_DEFAULT_TARGETS += jdk_beans1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 424 | jdk_beans1: $(call TestDirs, \ |
| 425 | java/beans/beancontext java/beans/PropertyChangeSupport \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 426 | java/beans/Introspector java/beans/Performance \ |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 427 | java/beans/VetoableChangeSupport java/beans/Statement) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 428 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 429 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 430 | JDK_ALL_TARGETS += jdk_beans2 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 431 | jdk_beans2: $(call TestDirs, \ |
| 432 | java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \ |
| 433 | java/beans/PropertyEditor) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 434 | $(call RunBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 435 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 436 | JDK_ALL_TARGETS += jdk_beans3 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 437 | jdk_beans3: $(call TestDirs, java/beans/XMLEncoder) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 438 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 439 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 440 | # All beans tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 441 | jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3 |
| 442 | @$(SummaryInfo) |
| 443 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 444 | JDK_ALL_TARGETS += jdk_io |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 445 | JDK_DEFAULT_TARGETS += jdk_io |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 446 | jdk_io: $(call TestDirs, java/io) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 447 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 448 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 449 | JDK_ALL_TARGETS += jdk_lang |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 450 | JDK_DEFAULT_TARGETS += jdk_lang |
Mandy Chung | 176ed8d | 2013-04-16 21:39:52 -0700 | [diff] [blame] | 451 | jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc sun/reflect vm) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 452 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 453 | |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 454 | JDK_ALL_TARGETS += jdk_jmx |
| 455 | jdk_jmx: $(call TestDirs, javax/management com/sun/jmx) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 456 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 457 | |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 458 | JDK_ALL_TARGETS += jdk_management |
| 459 | jdk_management: $(call TestDirs, com/sun/management sun/management) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 460 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 461 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 462 | JDK_ALL_TARGETS += jdk_math |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 463 | JDK_DEFAULT_TARGETS += jdk_math |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 464 | jdk_math: $(call TestDirs, java/math) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 465 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 466 | |
Stephen Colebourne | df4d235 | 2013-01-22 20:59:21 -0800 | [diff] [blame] | 467 | JDK_DEFAULT_TARGETS += jdk_time |
| 468 | jdk_time: $(call TestDirs, java/time) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 469 | $(call RunBatch) |
Stephen Colebourne | df4d235 | 2013-01-22 20:59:21 -0800 | [diff] [blame] | 470 | |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 471 | JDK_ALL_TARGETS += jdk_other |
| 472 | JDK_DEFAULT_TARGETS += jdk_other |
| 473 | jdk_other: $(call TestDirs, \ |
| 474 | demo/jvmti demo/zipfs sample \ |
| 475 | javax/naming com/sun/jndi \ |
| 476 | javax/script \ |
Rob McKenna | bf46e16 | 2012-12-12 15:57:14 +0000 | [diff] [blame] | 477 | java/sql javax/sql \ |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 478 | javax/smartcardio \ |
Joe Wang | dc574bf | 2013-02-18 13:02:09 -0800 | [diff] [blame] | 479 | javax/xml/jaxp \ |
Sean Mullan | be64e9b | 2012-12-18 13:48:48 -0500 | [diff] [blame] | 480 | javax/xml/soap \ |
Sean Mullan | 2e81067 | 2013-03-27 10:37:46 +0000 | [diff] [blame] | 481 | javax/xml/ws com/sun/internal/ws com/sun/org/glassfish \ |
Jim Holmlund | d11cb7e | 2012-10-20 22:49:26 +0100 | [diff] [blame] | 482 | jdk/asm \ |
Brian Goetz | 15adfaf | 2013-05-06 11:43:51 -0400 | [diff] [blame] | 483 | jdk/lambda \ |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 484 | com/sun/org/apache/xerces \ |
| 485 | com/sun/corba \ |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 486 | com/sun/tracing \ |
| 487 | sun/usagetracker) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 488 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 489 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 490 | JDK_ALL_TARGETS += jdk_net |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 491 | JDK_DEFAULT_TARGETS += jdk_net |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 492 | jdk_net: $(call TestDirs, com/sun/net java/net sun/net com/oracle/net) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 493 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 494 | |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 495 | jdk_nio: $(call TestDirs, java/nio sun/nio com/oracle/nio) |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 496 | $(call SharedLibraryPermissions,java/nio/channels) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 497 | $(call RunBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 498 | |
Chris Hegarty | d97cf81 | 2011-06-23 13:00:14 +0100 | [diff] [blame] | 499 | jdk_sctp: $(call TestDirs, com/sun/nio/sctp) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 500 | $(call RunBatch) |
Chris Hegarty | d97cf81 | 2011-06-23 13:00:14 +0100 | [diff] [blame] | 501 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 502 | JDK_ALL_TARGETS += jdk_rmi |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 503 | jdk_rmi: $(call TestDirs, java/rmi sun/rmi javax/rmi/ssl) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 504 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 505 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 506 | JDK_ALL_TARGETS += jdk_security1 |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 507 | JDK_DEFAULT_TARGETS += jdk_security1 |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 508 | jdk_security1: $(call TestDirs, java/security) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 509 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 510 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 511 | JDK_ALL_TARGETS += jdk_security2 |
Weijun Wang | 5dcff73 | 2011-08-30 10:46:27 +0800 | [diff] [blame] | 512 | jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 513 | $(call RunBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 514 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 515 | JDK_ALL_TARGETS += jdk_security3 |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 516 | jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \ |
Valerie Peng | eafb7ad | 2012-01-12 16:04:03 -0800 | [diff] [blame] | 517 | sun/security com/sun/org/apache/xml/internal/security \ |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 518 | com/oracle/security) |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 519 | $(call SharedLibraryPermissions,sun/security) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 520 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 521 | |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 522 | # All security tests |
Kelly O'Hair | d020b04 | 2009-11-23 09:51:52 -0800 | [diff] [blame] | 523 | jdk_security: jdk_security1 jdk_security2 jdk_security3 |
| 524 | @$(SummaryInfo) |
| 525 | |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 526 | JDK_ALL_TARGETS += jdk_sound |
| 527 | jdk_sound: $(call TestDirs, javax/sound) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 528 | $(call RunBatch) |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 529 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 530 | JDK_ALL_TARGETS += jdk_swing |
Weijun Wang | 6b8980e | 2011-09-08 09:04:28 +0800 | [diff] [blame] | 531 | jdk_swing: $(call TestDirs, javax/swing sun/java2d \ |
| 532 | demo/jfc com/sun/java/swing) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 533 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 534 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 535 | JDK_ALL_TARGETS += jdk_text |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 536 | JDK_DEFAULT_TARGETS += jdk_text |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 537 | jdk_text: $(call TestDirs, java/text sun/text) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 538 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 539 | |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 540 | JDK_ALL_TARGETS += jdk_jdi |
| 541 | jdk_jdi: $(call TestDirs, com/sun/jdi) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 542 | $(call RunBatch) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 543 | |
Alan Bateman | 511c6ab | 2012-10-09 13:28:32 +0100 | [diff] [blame] | 544 | JDK_ALL_TARGETS += jdk_tools |
| 545 | jdk_tools: $(call TestDirs, com/sun/tools sun/jvmstat sun/tools tools) |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 546 | $(call SharedLibraryPermissions,tools/launcher) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 547 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 548 | |
Staffan Larsen | a253545 | 2012-06-07 15:28:38 +0200 | [diff] [blame] | 549 | ifdef OPENJDK |
| 550 | jdk_jfr: |
| 551 | else |
| 552 | JDK_ALL_TARGETS += jdk_jfr |
| 553 | jdk_jfr: $(call TestDirs, com/oracle/jfr) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 554 | $(call RunBatch) |
Staffan Larsen | a253545 | 2012-06-07 15:28:38 +0200 | [diff] [blame] | 555 | endif |
| 556 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 557 | JDK_ALL_TARGETS += jdk_util |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 558 | JDK_DEFAULT_TARGETS += jdk_util |
Rama Pulavarthi | 691add8 | 2011-03-09 15:47:15 -0800 | [diff] [blame] | 559 | jdk_util: $(call TestDirs, java/util sun/util) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 560 | $(call RunBatch) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 561 | |
| 562 | # ------------------------------------------------------------------ |
| 563 | |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 564 | # Run default tests |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 565 | # note that this *does not* have the same meaning as jprt.properties :: jprt.make.rule.default.test.targets |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 566 | jdk_default: $(JDK_DEFAULT_TARGETS) |
| 567 | @$(SummaryInfo) |
| 568 | |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 569 | # Run core tests |
| 570 | # please keep this in sync with jdk/make/jprt.properties :: jprt.make.rule.core.test.targets |
| 571 | jdk_core: jdk_lang jdk_math jdk_util jdk_io jdk_net jdk_nio \ |
| 572 | jdk_security1 jdk_security2 jdk_security3 jdk_rmi \ |
| 573 | jdk_management jdk_jmx jdk_text jdk_tools jdk_jfr jdk_other |
| 574 | @$(SummaryInfo) |
| 575 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 576 | # Run all tests |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 577 | # note that this *does not* have the same meaning as jprt.properties :: jprt.make.rule.all.test.targets |
Kelly O'Hair | f5bfcb0 | 2011-12-12 08:17:28 -0800 | [diff] [blame] | 578 | jdk_all: $(JDK_ALL_TARGETS) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 579 | @$(SummaryInfo) |
| 580 | |
| 581 | # These are all phony targets |
Mike Duigou | 62b85e6 | 2013-02-06 11:28:25 -0800 | [diff] [blame] | 582 | PHONY_LIST += $(JDK_ALL_TARGETS) jdk_default jdk_core jdk_all |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 583 | |
| 584 | # ------------------------------------------------------------------ |
| 585 | |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 586 | ifdef CONCURRENCY |
| 587 | EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY) |
| 588 | endif |
| 589 | |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 590 | # Default JTREG to run (win32 script works for everybody) |
| 591 | JTREG = $(JT_HOME)/win32/bin/jtreg |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 592 | # run in agentvm mode |
| 593 | JTREG_BASIC_OPTIONS += -agentvm |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 594 | # Only run automatic tests |
| 595 | JTREG_BASIC_OPTIONS += -a |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 596 | # Always turn on assertions |
| 597 | JTREG_ASSERT_OPTION = -ea -esa |
| 598 | JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION) |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 599 | # Report details on all failed or error tests, times too |
| 600 | JTREG_BASIC_OPTIONS += -v:fail,error,time |
| 601 | # Retain all files for failing tests |
| 602 | JTREG_BASIC_OPTIONS += -retain:fail,error |
| 603 | # Ignore tests are not run and completely silent about it |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 604 | JTREG_IGNORE_OPTION = -ignore:quiet |
| 605 | JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION) |
Kelly O'Hair | 61c0915 | 2009-12-09 09:46:57 -0800 | [diff] [blame] | 606 | # Multiple by 4 the timeout numbers |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 607 | JTREG_TIMEOUT_OPTION = -timeoutFactor:4 |
| 608 | JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION) |
Mike Duigou | eccee3e | 2013-05-22 09:59:37 -0700 | [diff] [blame] | 609 | # Set the max memory for jtreg control vm |
Kelly O'Hair | d44fe66 | 2009-12-11 15:29:22 -0800 | [diff] [blame] | 610 | JTREG_MEMORY_OPTION = -J-Xmx512m |
| 611 | JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION) |
Mike Duigou | 164f412 | 2013-07-27 12:26:01 -0700 | [diff] [blame^] | 612 | # Add any extra options |
| 613 | JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS) |
| 614 | # Set other vm and test options |
| 615 | JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%) |
| 616 | # Set the GC options for test vms |
| 617 | #JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC |
| 618 | #JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION) |
Mike Duigou | eccee3e | 2013-05-22 09:59:37 -0700 | [diff] [blame] | 619 | # Set the max memory for jtreg target test vms |
| 620 | JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m |
| 621 | JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 622 | |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 623 | # Make sure jtreg exists |
| 624 | $(JTREG): $(JT_HOME) |
| 625 | |
| 626 | # Run jtreg |
| 627 | jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST) |
| 628 | @$(EXPAND) $(EXCLUDELIST) \ |
| 629 | | $(CUT) -d' ' -f1 \ |
| 630 | | $(SED) -e 's@^@Excluding: @' |
| 631 | ( \ |
| 632 | ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ |
| 633 | export JT_HOME; \ |
Kelly O'Hair | d125892 | 2009-11-08 15:11:10 -0800 | [diff] [blame] | 634 | $(shell $(GETMIXEDPATH) "$(JTREG)") \ |
| 635 | $(JTREG_BASIC_OPTIONS) \ |
| 636 | -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \ |
| 637 | -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \ |
| 638 | -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ |
| 639 | -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)") \ |
| 640 | $(JTREG_TEST_OPTIONS) \ |
| 641 | $(TESTDIRS) \ |
| 642 | ) ; $(BUNDLE_UP_AND_EXIT) \ |
Kelly O'Hair | 0ce235a | 2009-12-01 08:51:16 -0800 | [diff] [blame] | 643 | ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 644 | |
Kelly O'Hair | d738280 | 2010-05-20 13:57:58 -0700 | [diff] [blame] | 645 | # Rule that may change execute permissions on shared library files. |
| 646 | # Files in repositories should never have execute permissions, but there |
| 647 | # are some tests that have pre-built shared libraries, and these windows |
| 648 | # dll files must have execute permission. Adding execute permission |
| 649 | # may happen automatically on windows when using certain versions of mercurial |
| 650 | # but it cannot be guaranteed. And blindly adding execute permission might |
| 651 | # be seen as a mercurial 'change', so we avoid adding execute permission to |
| 652 | # repository files. But testing from a plain source tree needs the chmod a+rx. |
| 653 | # Used on select directories and applying the chmod to all shared libraries |
| 654 | # not just dll files. On windows, this may not work with MKS if the files |
| 655 | # were installed with CYGWIN unzip or untar (MKS chmod may not do anything). |
| 656 | # And with CYGWIN and sshd service, you may need CYGWIN=ntsec for this to work. |
| 657 | # |
| 658 | shared_library_permissions: $(SHARED_LIBRARY_DIR) |
| 659 | if [ ! -d $(TEST_ROOT)/../.hg ] ; then \ |
| 660 | $(FIND) $< \( -name \*.dll -o -name \*.DLL -o -name \*.so \) \ |
| 661 | -exec $(CHMOD) a+rx {} \; ; \ |
| 662 | fi |
| 663 | |
| 664 | PHONY_LIST += jtreg_tests shared_library_permissions |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 665 | |
| 666 | ################################################################ |
| 667 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 668 | # Phony targets (e.g. these are not filenames) |
Kelly O'Hair | 53b5f6a | 2009-03-31 16:12:56 -0700 | [diff] [blame] | 669 | .PHONY: all clean prep $(PHONY_LIST) |
| 670 | |
| 671 | ################################################################ |