# # Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. #
################################################################################ # Initial bootstrapping, copied and stripped down from Makefile and Init.gmk ################################################################################
# In Cygwin, the MAKE variable gets prepended with the current directory if the # make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe). ifneq ($(findstring :, $(MAKE)), ) exportMAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE))) endif
# Setup a required or optional variable, and/or check that it is properly # given. # Note: No spaces are allowed around the arguments. # # $1: The name of the variable # $2: The default value, if any, or OPTIONAL (do not provide a default but # do not exit if it is missing) # $3: If NO_CHECK, disable checking for target file/directory existence # If MKDIR, create the default directory define SetupVariable ifeq ($$($1), ) ifeq ($2, )
$$(info Error: Prebuilt variable $1 is missing, needed for run-tests-prebuilt)
$$(error Cannot continue.) elseifeq ($2, OPTIONAL) ifneq ($$(findstring $$(LOG), info debug trace), )
$$(info Prebuilt variable $1 is not provided) endif else ifneq ($$(findstring $$(LOG), info debug trace), )
$$(info Prebuilt variable $1=$2 (default value)) endif
$1:=$2 endif else ifneq ($$(findstring $$(LOG), info debug trace), )
$$(info Prebuilt variable $1=$$($1)) endif endif # If $1 has a value (is not optional), and $3 is not set (to NO_CHECK), # and if wildcard is empty, then complain that the file is missing. ifeq ($3, MKDIR) ifneq ($$(findstring $$(LOG), info debug trace), )
$$(info Creating directory for $1) endif
$$(shell mkdir -p $$($1)) elseifneq ($3, NO_CHECK) ifeq ($$(strip $$(if $$($1), , OPTIONAL) $$(wildcard $$($1))), )
$$(info Error: Prebuilt variable $1 points to missing file/directory:)
$$(info '$$($1)')
$$(error Cannot continue.) endif endif endef
# Create an ephemeral spec file # # $1: The output file name # $2..$N: The lines to output to the file define CreateNewSpec
$(if $(strip $(33)), \
$(error Internal makefile error: \
Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
) \
$(shell $(RM) $1) \
$(foreach i, $(call sequence, 2, 32), \
$(if $(strip $($i)), \
$(call AppendFile, $(strip $($i)), $1) \
) \
) endef
################################################################################ # Check input and setup basic buildsystem support ################################################################################
# Verify that user has given correct additional input.
# These variables are absolutely necessary
$(eval $(call SetupVariable,OUTPUTDIR,$(TOPDIR)/build/run-test-prebuilt,MKDIR))
$(eval $(call SetupVariable,BOOT_JDK))
$(eval $(call SetupVariable,JT_HOME))
# These can have default values based on the ones above
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
# Provide default values for tools that we need
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
$(eval $(call SetupVariable,BASH,bash,NO_CHECK))
# Now that we have verified that we have the required variables available, we # can include the prebuilt spec file ourselves, without an ephemeral spec # wrapper. This is required so we can include MakeBase which is needed for # CreateNewSpec.
HAS_SPEC := include $(TOPDIR)/make/InitSupport.gmk
# Assume little endian unless otherwise specified
OPENJDK_TARGET_CPU_ENDIAN := little
UNAME_CPU := $(shell $(UNAME) -m) ifeq ($(UNAME_CPU), i686)
OPENJDK_TARGET_CPU := x86
OPENJDK_TARGET_CPU_BITS := 32 else # Assume all others are 64-bit. We use the same CPU name as uname for # at least x86_64 and aarch64.
OPENJDK_TARGET_CPU := $(UNAME_CPU)
OPENJDK_TARGET_CPU_BITS := 64 endif
OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_TARGET_CPU) ifeq ($(OPENJDK_TARGET_CPU), x86_64)
OPENJDK_TARGET_CPU_ARCH := x86 endif
################################################################################ # Generate the ephemeral spec file ################################################################################
# Now we can include additional custom support. # This might define CUSTOM_NEW_SPEC_LINE ifneq ($(CUSTOM_MAKE_DIR), ) include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk endif
################################################################################ # The run-test-prebuilt target ################################################################################
SPEC := $(NEW_SPEC)
default: all
test-prebuilt: # Need to make sure the failure logs output dir exists since # ExecuteWithLog is called in RunTests.gmk. The PrepareFailureLogs macro # is unfortunately not available at this point.
$(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs)
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error # The lazy initialization of the cache file in FindTests.gmk does not # always work with RunTests.gmk. To guarantee that the jtreg test groups # are always found and parsed, call FindTests.gmk stand alone once # before calling RunTests.gmk.
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/common/FindTests.gmk \
SPEC=$(SPEC) FINDTESTS_STAND_ALONE=true
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
TEST="$(TEST)"
all: test-prebuilt
.PHONY: default all test-prebuilt
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.