make/RunTestsPrebuiltSpec.gmk
author akolarkunnu
Fri, 16 Feb 2018 18:17:34 +0530
changeset 49088 1fc095fa0cd7
parent 48406 26b47ea4c77d
child 50818 e46b9e514479
permissions -rw-r--r--
8197482: Make Jemmy ComponentChooser lambda friendly Reviewed-by: serb

#
# Copyright (c) 2017, 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.
#

################################################################################
# Fake minimalistic spec file for RunTestsPrebuilt.gmk.
################################################################################

define VerifyVariable
  ifeq ($$($1), )
    $$(info Error: Variable $1 is missing, needed by RunTestPrebuiltSpec.gmk)
    $$(error Cannot continue.)
  else
    ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
      $$(info Prebuilt variable $1=$$($1))
    endif
  endif
endef

# It is the responsibility of the file including us to have set these up.
# Verify that this is correct.
$(eval $(call VerifyVariable,SPEC))
$(eval $(call VerifyVariable,TOPDIR))
$(eval $(call VerifyVariable,OUTPUTDIR))
$(eval $(call VerifyVariable,BOOT_JDK))
$(eval $(call VerifyVariable,JT_HOME))
$(eval $(call VerifyVariable,JDK_IMAGE_DIR))
$(eval $(call VerifyVariable,TEST_IMAGE_DIR))
$(eval $(call VerifyVariable,MAKE))
$(eval $(call VerifyVariable,BASH))

################################################################################
# The "human readable" name of this configuration
CONF_NAME := run-test-prebuilt

# Number of parallel jobs to use for compilation
JOBS ?= $(NUM_CORES)
TEST_JOBS ?= 0

# Use hard-coded values for java flags (one size, fits all!)
JAVA_FLAGS := -Duser.language=en -Duser.country=US
JAVA_FLAGS_BIG:= -Xms64M -Xmx1600M -XX:ThreadStackSize=1536
JAVA_FLAGS_SMALL:= -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG)

################################################################################
# Hard-coded values copied from spec.gmk.in.
X:=
SPACE:=$(X) $(X)
COMMA:=,
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
    MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
BASH_ARGS := -o pipefail -e
SHELL := $(BASH) $(BASH_ARGS)

################################################################################
# Set some reasonable defaults for features
DEBUG_LEVEL := release
HOTSPOT_DEBUG_LEVEL := release
BUILD_GTEST := true
BUILD_FAILURE_HANDLER := true

################################################################################
# Alias some paths (that should not really be used) to our JDK image under test.
SUPPORT_OUTPUTDIR := $(OUTPUTDIR)/support
BUILDTOOLS_OUTPUTDIR := $(OUTPUTDIR)/buildtools
HOTSPOT_OUTPUTDIR := $(OUTPUTDIR)/hotspot
JDK_OUTPUTDIR := $(OUTPUTDIR)/jdk
IMAGES_OUTPUTDIR := $(OUTPUTDIR)/images
BUNDLES_OUTPUTDIR := $(OUTPUTDIR)/bundles
TESTMAKE_OUTPUTDIR := $(OUTPUTDIR)/test-make
MAKESUPPORT_OUTPUTDIR := $(OUTPUTDIR)/make-support
BUILDJDK_OUTPUTDIR := $(OUTPUTDIR)/buildjdk

JRE_IMAGE_DIR := $(JDK_IMAGE_DIR)

################################################################################
# Assume build platform is same as target platform
OPENJDK_BUILD_OS := $(OPENJDK_TARGET_OS)
OPENJDK_BUILD_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE)
OPENJDK_BUILD_OS_ENV := $(OPENJDK_TARGET_OS_ENV)

OPENJDK_BUILD_CPU := $(OPENJDK_TARGET_CPU)
OPENJDK_BUILD_CPU_ARCH := $(OPENJDK_TARGET_CPU_ARCH)
OPENJDK_BUILD_CPU_BITS := $(OPENJDK_TARGET_CPU_BITS)
OPENJDK_BUILD_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN)

################################################################################
# Java executable definitions
JAVA_CMD := $(BOOT_JDK)/bin/java
JAVAC_CMD := $(BOOT_JDK)/bin/javac
JAR_CMD := $(BOOT_JDK)/bin/jar
JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
JARSIGNER_CMD := $(BOOT_JDK)/bin/jarsigner

JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVA_JAVAC := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVAC := $(FIXPATH) $(JAVAC_CMD)
JAR := $(FIXPATH) $(JAR_CMD)
JLINK := $(FIXPATH) $(JLINK_CMD)
JMOD := $(FIXPATH) $(JMOD_CMD)
JARSIGNER := $(FIXPATH) $(JARSIGNER_CMD)

BUILD_JAVA := $(JAVA)
################################################################################
# Some common tools. Assume most common name and no path.
AWK := awk
BASENAME := basename
CAT := cat
CD := cd
CHMOD := chmod
CP := cp
CUT := cut
DATE := date
DIFF := diff
DIRNAME := dirname
FIND := find
FIND_DELETE := -delete
ECHO := echo
EGREP := grep -E
FGREP := grep -F
GREP := grep
GZIP := gzip
HEAD := head
LS := ls
LN := ln
MKDIR := mkdir
MV := mv
NAWK := nawk
NICE := nice
PATCH := patch
PRINTF := printf
RM := rm -f
RMDIR := rmdir
SED := sed
SH := sh
SORT := sort
TAR := tar
TAIL := tail
TEE := tee
TR := tr
TOUCH := touch
UNIQ := uniq
WC := wc
XARGS := xargs
ZIPEXE := zip
UNZIP := unzip
EXPR := expr
FILE := file
HG := hg