annotate test/Makefile @ 5584:746dd4858356

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