1 # 2 # Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact 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. 24 # 25 26 ################################################################################ 27 # Fake minimalistic spec file for RunTestsPrebuilt.gmk. 28 ################################################################################ 29 30 # Make sure all shell commands are executed with the C locale 31 export LC_ALL := C 32 33 define VerifyVariable 34 ifeq ($$($1), ) 35 $$(info Error: Variable $1 is missing, needed by RunTestPrebuiltSpec.gmk) 36 $$(error Cannot continue.) 37 else 38 ifneq ($$(findstring $$(LOG_LEVEL), debug trace), ) 39 $$(info Prebuilt variable $1=$$($1)) 40 endif 41 endif 42 endef 43 44 # It is the responsibility of the file including us to have set these up. 45 # Verify that this is correct. 46 $(eval $(call VerifyVariable,SPEC)) 47 $(eval $(call VerifyVariable,TOPDIR)) 48 $(eval $(call VerifyVariable,OUTPUTDIR)) 49 $(eval $(call VerifyVariable,BOOT_JDK)) 50 $(eval $(call VerifyVariable,JT_HOME)) 51 $(eval $(call VerifyVariable,JDK_IMAGE_DIR)) 52 $(eval $(call VerifyVariable,TEST_IMAGE_DIR)) 53 $(eval $(call VerifyVariable,MAKE)) 54 $(eval $(call VerifyVariable,BASH)) 55 56 include $(TOPDIR)/make/conf/version-numbers.conf 57 VERSION_FEATURE := $(DEFAULT_VERSION_FEATURE) 58 59 ################################################################################ 60 # The "human readable" name of this configuration 61 CONF_NAME := run-test-prebuilt 62 63 # Number of parallel jobs to use for compilation 64 JOBS ?= $(NUM_CORES) 65 TEST_JOBS ?= 0 66 67 # Use hard-coded values for java flags (one size, fits all!) 68 JAVA_FLAGS := -Duser.language=en -Duser.country=US 69 JAVA_FLAGS_BIG := -Xms64M -Xmx3200M 70 JAVA_FLAGS_SMALL := -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 71 BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 72 BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG) 73 74 ################################################################################ 75 # Hard-coded values copied from spec.gmk.in. 76 X := 77 SPACE := $(X) $(X) 78 COMMA := , 79 MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \ 80 MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL) 81 BASH_ARGS := -o pipefail -e 82 SHELL := $(BASH) $(BASH_ARGS) 83 84 ################################################################################ 85 # Set some reasonable defaults for features 86 DEBUG_LEVEL := release 87 HOTSPOT_DEBUG_LEVEL := release 88 BUILD_FAILURE_HANDLER := true 89 90 ################################################################################ 91 # Alias some paths (that should not really be used) to our JDK image under test. 92 SUPPORT_OUTPUTDIR := $(OUTPUTDIR)/support 93 BUILDTOOLS_OUTPUTDIR := $(OUTPUTDIR)/buildtools 94 HOTSPOT_OUTPUTDIR := $(OUTPUTDIR)/hotspot 95 JDK_OUTPUTDIR := $(OUTPUTDIR)/jdk 96 IMAGES_OUTPUTDIR := $(OUTPUTDIR)/images 97 BUNDLES_OUTPUTDIR := $(OUTPUTDIR)/bundles 98 TESTMAKE_OUTPUTDIR := $(OUTPUTDIR)/test-make 99 MAKESUPPORT_OUTPUTDIR := $(OUTPUTDIR)/make-support 100 BUILDJDK_OUTPUTDIR := $(OUTPUTDIR)/buildjdk 101 102 JRE_IMAGE_DIR := $(JDK_IMAGE_DIR) 103 104 ################################################################################ 105 # Assume build platform is same as target platform 106 OPENJDK_BUILD_OS := $(OPENJDK_TARGET_OS) 107 OPENJDK_BUILD_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE) 108 OPENJDK_BUILD_OS_ENV := $(OPENJDK_TARGET_OS_ENV) 109 110 OPENJDK_BUILD_CPU := $(OPENJDK_TARGET_CPU) 111 OPENJDK_BUILD_CPU_ARCH := $(OPENJDK_TARGET_CPU_ARCH) 112 OPENJDK_BUILD_CPU_BITS := $(OPENJDK_TARGET_CPU_BITS) 113 OPENJDK_BUILD_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN) 114 115 ################################################################################ 116 # Java executable definitions 117 JAVA_CMD := $(BOOT_JDK)/bin/java 118 JAVAC_CMD := $(BOOT_JDK)/bin/javac 119 JAR_CMD := $(BOOT_JDK)/bin/jar 120 JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink 121 JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod 122 123 JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) 124 JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) 125 JAVAC := $(FIXPATH) $(JAVAC_CMD) 126 JAR := $(FIXPATH) $(JAR_CMD) 127 JLINK := $(FIXPATH) $(JLINK_CMD) 128 JMOD := $(FIXPATH) $(JMOD_CMD) 129 130 JTREG_JAVA := $(FIXPATH) $(JTREG_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) 131 132 BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA 133 ################################################################################ 134 # Some common tools. Assume most common name and no path. 135 AWK := awk 136 BASENAME := basename 137 CAT := cat 138 CD := cd 139 CHMOD := chmod 140 CP := cp 141 CUT := cut 142 DATE := date 143 DIFF := diff 144 DIRNAME := dirname 145 FIND := find 146 FIND_DELETE := -delete 147 ECHO := echo 148 EGREP := grep -E 149 FGREP := grep -F 150 GREP := grep 151 GZIP := gzip 152 HEAD := head 153 LS := ls 154 LN := ln 155 MIG := mig 156 MKDIR := mkdir 157 MV := mv 158 NICE := nice 159 PATCH := patch 160 PRINTF := printf 161 RM := rm -f 162 RMDIR := rmdir 163 SED := sed 164 SH := sh 165 SORT := sort 166 TAR := tar 167 TAIL := tail 168 TEE := tee 169 TR := tr 170 TOUCH := touch 171 WC := wc 172 XARGS := xargs 173 ZIPEXE := zip 174 UNZIP := unzip 175 EXPR := expr 176 FILE := file 177 ULIMIT := ulimit 178 179 ifeq ($(OPENJDK_BUILD_OS), windows) 180 PATHTOOL := cygpath 181 endif 182 183 # These settings are needed to run testing with jvmti agent 184 ifeq ($(OPENJDK_BUILD_OS), linux) 185 LIBRARY_PREFIX := lib 186 SHARED_LIBRARY_SUFFIX := .so 187 endif 188 189 ifeq ($(OPENJDK_BUILD_OS), windows) 190 LIBRARY_PREFIX := 191 SHARED_LIBRARY_SUFFIX := .dll 192 endif 193 194 ifeq ($(OPENJDK_BUILD_OS), macosx) 195 LIBRARY_PREFIX := lib 196 SHARED_LIBRARY_SUFFIX := .dylib 197 endif --- EOF ---