annotate test/Makefile @ 1821:7aff5786cc02

6991596: JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC Reviewed-by: kvn, jrose, dsamersoff
author twisti
date Mon, 18 Oct 2010 01:54:24 -0700
parents c18cbe5936b8
children 0a8e0d4345b3
rev   line source
duke@0 1 #
trims@1472 2 # Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation.
duke@0 8 #
duke@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 # accompanied this code).
duke@0 14 #
duke@0 15 # You should have received a copy of the GNU General Public License version
duke@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 #
trims@1472 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 20 # or visit www.oracle.com if you need additional information or have any
trims@1472 21 # questions.
ohair@328 22 #
duke@0 23 #
duke@0 24
duke@0 25 #
ohair@328 26 # Makefile to run various jdk tests
duke@0 27 #
duke@0 28
ohair@328 29 # Get OS/ARCH specifics
duke@0 30 OSNAME = $(shell uname -s)
duke@0 31 ifeq ($(OSNAME), SunOS)
duke@0 32 PLATFORM = solaris
twisti@560 33 SLASH_JAVA = /java
duke@0 34 ARCH = $(shell uname -p)
duke@0 35 ifeq ($(ARCH), i386)
duke@0 36 ARCH=i586
duke@0 37 endif
duke@0 38 endif
duke@0 39 ifeq ($(OSNAME), Linux)
duke@0 40 PLATFORM = linux
twisti@560 41 SLASH_JAVA = /java
duke@0 42 ARCH = $(shell uname -m)
duke@0 43 ifeq ($(ARCH), i386)
ohair@328 44 ARCH = i586
duke@0 45 endif
duke@0 46 endif
duke@0 47 ifeq ($(OSNAME), Windows_NT)
duke@0 48 PLATFORM = windows
ohair@328 49 SLASH_JAVA = J:
duke@0 50 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
ohair@328 51 ARCH = ia64
duke@0 52 else
duke@0 53 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
ohair@328 54 ARCH = x64
duke@0 55 else
duke@0 56 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
ohair@328 57 ARCH = x64
duke@0 58 else
ohair@328 59 ARCH = i586
duke@0 60 endif
duke@0 61 endif
duke@0 62 endif
ohair@328 63 EXESUFFIX = .exe
duke@0 64 endif
duke@0 65
twisti@560 66 ifdef ALT_SLASH_JAVA
twisti@560 67 SLASH_JAVA = $(ALT_SLASH_JAVA)
twisti@560 68 endif
twisti@560 69
ohair@328 70 # Utilities used
ohair@328 71 CD = cd
ohair@328 72 CP = cp
ohair@328 73 ECHO = echo
ohair@328 74 MKDIR = mkdir
ohair@328 75 ZIP = zip
duke@0 76
ohair@328 77 # Root of this test area (important to use full paths in some places)
ohair@328 78 TEST_ROOT := $(shell pwd)
ohair@328 79
ohair@328 80 # Root of all test results
twisti@1821 81 ifdef ALT_OUTPUTDIR
twisti@1821 82 ABS_BUILD_ROOT = $(ALT_OUTPUTDIR)/$(PLATFORM)-$(ARCH)
twisti@1821 83 else
twisti@1821 84 ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
twisti@1821 85 endif
ohair@328 86 ABS_TEST_OUTPUT_DIR = $(ABS_BUILD_ROOT)/testoutput
ohair@328 87
ohair@328 88 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
ohair@328 89 ifndef PRODUCT_HOME
ohair@328 90 # Try to use j2sdk-image if it exists
ohair@328 91 ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image
ohair@328 92 PRODUCT_HOME := \
ohair@328 93 $(shell \
ohair@328 94 if [ -d $(ABS_JDK_IMAGE) ] ; then \
ohair@328 95 $(ECHO) "$(ABS_JDK_IMAGE)"; \
ohair@328 96 else \
ohair@328 97 $(ECHO) "$(ABS_BUILD_ROOT)" ; \
ohair@328 98 fi)
duke@0 99 endif
duke@0 100
ohair@328 101 # Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
ohair@328 102 JAVA_OPTIONS =
ohair@328 103 ifdef JAVA_ARGS
ohair@328 104 JAVA_OPTIONS = $(JAVA_ARGS)
ohair@328 105 endif
duke@0 106
ohair@328 107 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
ohair@328 108 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
ohair@328 109 ifdef JPRT_ARCHIVE_BUNDLE
ohair@328 110 ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
ohair@328 111 endif
duke@0 112
ohair@328 113 # How to create the test bundle (pass or fail, we want to create this)
ohair@328 114 BUNDLE_UP = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
ohair@328 115 && $(CD) $(ABS_TEST_OUTPUT_DIR) \
ohair@328 116 && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
ohair@328 117 BUNDLE_UP_FAILED = ( exitCode=$$? && $(BUNDLE_UP) && exit $${exitCode} )
duke@0 118
ohair@328 119 ################################################################
duke@0 120
ohair@328 121 # Default make rule (runs jtreg_tests)
ohair@328 122 all: jtreg_tests
ohair@328 123 @$(ECHO) "Testing completed successfully"
duke@0 124
ohair@328 125 # Prep for output
ohair@328 126 prep: clean
ohair@328 127 @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
ohair@328 128 @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
duke@0 129
duke@0 130 # Cleanup
duke@0 131 clean:
ohair@328 132 $(RM) -r $(ABS_TEST_OUTPUT_DIR)
ohair@328 133 $(RM) $(ARCHIVE_BUNDLE)
duke@0 134
ohair@328 135 ################################################################
duke@0 136
ohair@328 137 # jtreg tests
ohair@328 138
ohair@328 139 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
ohair@328 140 JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
ohair@328 141 ifdef JPRT_JTREG_HOME
ohair@328 142 JT_HOME = $(JPRT_JTREG_HOME)
ohair@328 143 endif
ohair@328 144
ohair@328 145 # Expect JPRT to set TESTDIRS to the jtreg test dirs
ohair@328 146 JTREG_TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
ohair@328 147 ifdef TESTDIRS
ohair@328 148 JTREG_TESTDIRS = $(TESTDIRS)
ohair@328 149 endif
ohair@328 150
ohair@328 151 # Default JTREG to run (win32 script works for everybody)
ohair@328 152 JTREG = $(JT_HOME)/win32/bin/jtreg
ohair@328 153
ohair@328 154 # Option to tell jtreg to not run tests marked with "ignore"
ohair@328 155 ifeq ($(PLATFORM), windows)
ohair@328 156 JTREG_KEY_OPTION = -k:!ignore
ohair@328 157 else
ohair@328 158 JTREG_KEY_OPTION = -k:\!ignore
ohair@328 159 endif
ohair@328 160
ohair@328 161 #EXTRA_JTREG_OPTIONS =
ohair@328 162
ohair@328 163 jtreg_tests: prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
ohair@328 164 $(JTREG) -a -v:fail,error \
ohair@328 165 $(JTREG_KEY_OPTION) \
ohair@328 166 $(EXTRA_JTREG_OPTIONS) \
ohair@328 167 -r:$(ABS_TEST_OUTPUT_DIR)/JTreport \
ohair@328 168 -w:$(ABS_TEST_OUTPUT_DIR)/JTwork \
ohair@328 169 -jdk:$(PRODUCT_HOME) \
ohair@328 170 $(JAVA_OPTIONS:%=-vmoption:%) \
ohair@328 171 $(JTREG_TESTDIRS) \
ohair@328 172 || $(BUNDLE_UP_FAILED)
ohair@328 173 $(BUNDLE_UP)
ohair@328 174
ohair@328 175 PHONY_LIST += jtreg_tests
ohair@328 176
ohair@328 177 ################################################################
ohair@328 178
ohair@781 179 # clienttest (make sure various basic java client options work)
ohair@781 180
ohair@781 181 clienttest: prep $(PRODUCT_HOME)
ohair@781 182 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
ohair@781 183 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
ohair@781 184 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
ohair@781 185 $(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa
ohair@781 186 $(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes_g.jsa
ohair@781 187 $(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
ohair@781 188 $(RM) $(PRODUCT_HOME)/jre/bin/client/classes_g.jsa
ohair@781 189 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
ohair@781 190
ohair@781 191 PHONY_LIST += clienttest
ohair@781 192
ohair@781 193 ################################################################
ohair@781 194
ohair@781 195 # servertest (make sure various basic java server options work)
ohair@781 196
ohair@781 197 servertest: prep $(PRODUCT_HOME)
ohair@781 198 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
ohair@781 199 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
ohair@781 200 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
ohair@781 201
ohair@781 202 PHONY_LIST += servertest
ohair@781 203
ohair@781 204 ################################################################
ohair@781 205
ohair@328 206 # packtest
ohair@328 207
ohair@328 208 # Expect JPRT to set JPRT_PACKTEST_HOME.
ohair@328 209 PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
ohair@328 210 ifdef JPRT_PACKTEST_HOME
ohair@328 211 PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
ohair@328 212 endif
ohair@328 213
ohair@328 214 #EXTRA_PACKTEST_OPTIONS =
ohair@328 215
ohair@328 216 packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
ohair@328 217 ( $(CD) $(PACKTEST_HOME) && \
ohair@328 218 $(PACKTEST_HOME)/ptest \
ohair@328 219 -t "$(PRODUCT_HOME)" \
ohair@328 220 $(PACKTEST_STRESS_OPTION) \
ohair@328 221 $(EXTRA_PACKTEST_OPTIONS) \
ohair@328 222 -W $(ABS_TEST_OUTPUT_DIR) \
ohair@328 223 $(JAVA_OPTIONS:%=-J %) \
ohair@328 224 ) || $(BUNDLE_UP_FAILED)
ohair@328 225 $(BUNDLE_UP)
ohair@328 226
ohair@328 227 packtest_stress: PACKTEST_STRESS_OPTION=-s
ohair@328 228 packtest_stress: packtest
ohair@328 229
ohair@328 230 PHONY_LIST += packtest packtest_stress
ohair@328 231
ohair@328 232 ################################################################
ohair@328 233
ohair@328 234 # Phony targets (e.g. these are not filenames)
ohair@328 235 .PHONY: all clean prep $(PHONY_LIST)
ohair@328 236
ohair@328 237 ################################################################
ohair@328 238