make/RunTestsPrebuilt.gmk
author lmesnik
Wed, 11 Sep 2019 16:25:12 -0700
changeset 58093 50e1d346a126
parent 55098 609dc5c60c06
child 58549 9d9317fad3fe
permissions -rw-r--r--
8230830: No required ResourceMark in src/hotspot/share/prims/jvmtiImpl.cpp:JvmtiSuspendControl::print() Reviewed-by: dholmes, cjplummer, sspitsyn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     1
#
53172
6bc1f8d41f4f 8216021: RunTest.gmk might set concurrency level to 1 on Windows
erikj
parents: 52593
diff changeset
     2
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     4
#
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    10
#
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    15
# accompanied this code).
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    16
#
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    20
#
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    23
# questions.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    24
#
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    25
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    26
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    27
# Initial bootstrapping, copied and stripped down from Makefile and Init.gmk
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    28
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    29
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    30
# In Cygwin, the MAKE variable gets prepended with the current directory if the
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    31
# make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    32
ifneq ($(findstring :, $(MAKE)), )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    33
  export MAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE)))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    34
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    35
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    36
# Locate this Makefile
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    37
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    38
  makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    39
else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    40
  makefile_path := $(lastword $(MAKEFILE_LIST))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    41
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    42
TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    43
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    44
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    45
# Functions
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    46
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    47
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    48
# Setup a required or optional variable, and/or check that it is properly
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    49
# given.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    50
# Note: No spaces are allowed around the arguments.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    51
#
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    52
# $1: The name of the variable
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    53
# $2: The default value, if any, or OPTIONAL (do not provide a default but
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    54
#     do not exit if it is missing)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    55
# $3: If NO_CHECK, disable checking for target file/directory existence
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    56
#     If MKDIR, create the default directory
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    57
define SetupVariable
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    58
  ifeq ($$($1), )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    59
    ifeq ($2, )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    60
      $$(info Error: Prebuilt variable $1 is missing, needed for run-tests-prebuilt)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    61
      $$(error Cannot continue.)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    62
    else ifeq ($2, OPTIONAL)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    63
      ifneq ($$(findstring $$(LOG), info debug trace), )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    64
        $$(info Prebuilt variable $1 is not provided)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    65
      endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    66
    else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    67
      ifneq ($$(findstring $$(LOG), info debug trace), )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    68
        $$(info Prebuilt variable $1=$2 (default value))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    69
      endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    70
      $1:=$2
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    71
    endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    72
  else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    73
    ifneq ($$(findstring $$(LOG), info debug trace), )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    74
      $$(info Prebuilt variable $1=$$($1))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    75
    endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    76
  endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    77
  # If $1 has a value (is not optional), and $3 is not set (to NO_CHECK),
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    78
  # and if wildcard is empty, then complain that the file is missing.
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    79
  ifeq ($3, MKDIR)
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    80
    ifneq ($$(findstring $$(LOG), info debug trace), )
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    81
      $$(info Creating directory for $1)
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    82
    endif
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    83
    $$(shell mkdir -p $$($1))
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    84
  else ifneq ($3, NO_CHECK)
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    85
    ifeq ($$(strip $$(if $$($1), , OPTIONAL) $$(wildcard $$($1))), )
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    86
      $$(info Error: Prebuilt variable $1 points to missing file/directory:)
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    87
      $$(info '$$($1)')
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    88
      $$(error Cannot continue.)
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
    89
    endif
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    90
  endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    91
endef
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    92
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    93
# Create an ephemeral spec file
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    94
#
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    95
# $1: The output file name
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    96
# $2..$N: The lines to output to the file
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    97
define CreateNewSpec
53526
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
    98
  $(if $(strip $(33)), \
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
    99
    $(error Internal makefile error: \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   100
      Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   101
  ) \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   102
  $(shell $(RM) $1) \
53526
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   103
  $(foreach i, $(call sequence, 2, 32), \
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   104
    $(if $(strip $($i)), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   105
      $(call AppendFile, $(strip $($i)), $1) \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   106
    ) \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   107
  )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   108
endef
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   109
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   110
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   111
# Check input and setup basic buildsystem support
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   112
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   113
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   114
# Verify that user has given correct additional input.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   115
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   116
# These variables are absolutely necessary
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   117
$(eval $(call SetupVariable,OUTPUTDIR,$(TOPDIR)/build/run-test-prebuilt,MKDIR))
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   118
$(eval $(call SetupVariable,BOOT_JDK))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   119
$(eval $(call SetupVariable,JT_HOME))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   120
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   121
# These can have default values based on the ones above
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   122
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   123
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   124
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   125
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   126
# Provide default values for tools that we need
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   127
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   128
$(eval $(call SetupVariable,BASH,bash,NO_CHECK))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   129
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   130
# Check optional variables
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   131
$(eval $(call SetupVariable,JIB_JAR,OPTIONAL))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   132
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   133
# Now that we have verified that we have the required variables available, we
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   134
# can include the prebuilt spec file ourselves, without an ephemeral spec
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   135
# wrapper. This is required so we can include MakeBase which is needed for
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   136
# CreateNewSpec.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   137
HAS_SPEC :=
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   138
include $(TOPDIR)/make/InitSupport.gmk
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   139
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   140
$(eval $(call CheckDeprecatedEnvironment))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   141
$(eval $(call CheckInvalidMakeFlags))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   142
$(eval $(call ParseLogLevel))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   143
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   144
SPEC := $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   145
include $(SPEC)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   146
include $(TOPDIR)/make/common/MakeBase.gmk
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   147
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   148
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   149
# Determine what platform we're running on
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   150
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   151
UNAME := uname
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   152
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   153
# Get OS name from uname (Cygwin inexplicably adds _NT-x.x)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   154
UNAME_OS := $(shell $(UNAME) -s | $(CUT) -f1 -d_)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   155
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   156
ifeq ($(UNAME_OS), CYGWIN)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   157
  OPENJDK_TARGET_OS := windows
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   158
  OPENJDK_TARGET_OS_TYPE := windows
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   159
  OPENJDK_TARGET_OS_ENV := windows.cygwin
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   160
else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   161
  OPENJDK_TARGET_OS_TYPE:=unix
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   162
  ifeq ($(UNAME_OS), Linux)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   163
    OPENJDK_TARGET_OS := linux
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   164
  else ifeq ($(UNAME_OS), Darwin)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   165
    OPENJDK_TARGET_OS := macosx
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   166
  else ifeq ($(UNAME_OS), SunOS)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   167
    OPENJDK_TARGET_OS := solaris
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   168
  else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   169
    OPENJDK_TARGET_OS := $(UNAME_OS)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   170
  endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   171
  OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   172
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   173
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   174
# Assume little endian unless otherwise specified
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   175
OPENJDK_TARGET_CPU_ENDIAN := little
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   176
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   177
ifeq ($(OPENJDK_TARGET_OS), solaris)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   178
  # On solaris, use uname -p
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   179
  UNAME_CPU := $(shell $(UNAME) -p)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   180
  # Assume 64-bit platform
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   181
  OPENJDK_TARGET_CPU_BITS := 64
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   182
  ifeq ($(UNAME_CPU), i386)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   183
    OPENJDK_TARGET_CPU := x86_64
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   184
  else ifeq ($(UNAME_CPU), sparc)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   185
    OPENJDK_TARGET_CPU := sparcv9
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   186
    OPENJDK_TARGET_CPU_ENDIAN := big
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   187
  else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   188
    OPENJDK_TARGET_CPU := $(UNAME_CPU)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   189
  endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   190
else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   191
  # ... all others use uname -m
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   192
  UNAME_CPU := $(shell $(UNAME) -m)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   193
  ifeq ($(UNAME_CPU), i686)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   194
    OPENJDK_TARGET_CPU := x86
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   195
    OPENJDK_TARGET_CPU_BITS := 32
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   196
  else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   197
    # Assume all others are 64-bit. We use the same CPU name as uname for
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   198
    # at least x86_64 and aarch64.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   199
    OPENJDK_TARGET_CPU := $(UNAME_CPU)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   200
    OPENJDK_TARGET_CPU_BITS := 64
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   201
  endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   202
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   203
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   204
OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_TARGET_CPU)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   205
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   206
  OPENJDK_TARGET_CPU_ARCH := x86
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   207
else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   208
  OPENJDK_TARGET_CPU_ARCH := sparc
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   209
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   210
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   211
ifeq ($(OPENJDK_TARGET_OS), windows)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   212
  ifeq ($(wildcard $(TEST_IMAGE_DIR)/bin/fixpath.exe), )
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   213
    $(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)')
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   214
    $(error Cannot continue.)
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   215
  endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   216
  FIXPATH := $(TEST_IMAGE_DIR)/bin/fixpath.exe -c
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   217
  PATH_SEP:=;
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   218
else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   219
  FIXPATH :=
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   220
  PATH_SEP:=:
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   221
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   222
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   223
# Check number of cores and memory in MB
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   224
ifeq ($(OPENJDK_TARGET_OS), linux)
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   225
  NUM_CORES := $(shell $(CAT) /proc/cpuinfo  | $(GREP) -c processor)
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   226
  MEMORY_SIZE := $(shell \
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   227
      $(EXPR) `$(CAT) /proc/meminfo | $(GREP) MemTotal | $(AWK) '{print $$2}'` / 1024 \
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   228
  )
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   229
else ifeq ($(OPENJDK_TARGET_OS), macosx)
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   230
  NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   231
  MEMORY_SIZE := $(shell $(EXPR) `/usr/sbin/sysctl -n hw.memsize` / 1024 / 1024)
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   232
else ifeq ($(OPENJDK_TARGET_OS), solaris)
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   233
  NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | $(GREP) -c on-line)
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   234
  MEMORY_SIZE := $(shell \
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   235
      /usr/sbin/prtconf 2> /dev/null | $(GREP) "^Memory [Ss]ize" | $(AWK) '{print $$3}' \
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   236
  )
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   237
else ifeq ($(OPENJDK_TARGET_OS), windows)
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   238
  NUM_CORES := $(NUMBER_OF_PROCESSORS)
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   239
  MEMORY_SIZE := $(shell \
53172
6bc1f8d41f4f 8216021: RunTest.gmk might set concurrency level to 1 on Windows
erikj
parents: 52593
diff changeset
   240
      $(EXPR) `wmic computersystem get totalphysicalmemory -value \
6bc1f8d41f4f 8216021: RunTest.gmk might set concurrency level to 1 on Windows
erikj
parents: 52593
diff changeset
   241
          | $(GREP) = | $(SED) 's/\\r//g' \
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   242
          | $(CUT) -d "=" -f 2-` / 1024 / 1024 \
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   243
  )
52125
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   244
endif
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   245
ifeq ($(NUM_CORES), )
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   246
  $(warn Could not find number of CPUs, assuming 1)
28375a1de254 8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents: 49147
diff changeset
   247
  NUM_CORES := 1
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   248
endif
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   249
ifeq ($(MEMORY_SIZE), )
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   250
  $(warn Could not find memory size, assuming 1024 MB)
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   251
  MEMORY_SIZE := 1024
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   252
endif
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   253
52393
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   254
# Setup LD for AOT support
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   255
ifneq ($(DEVKIT_HOME), )
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   256
  ifeq ($(OPENJDK_TARGET_OS), windows)
53460
65c813da7c65 8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents: 53172
diff changeset
   257
    LD_JAOTC := $(DEVKIT_HOME)/VC/bin/x64/link.exe
52393
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   258
    LIBRARY_PREFIX :=
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   259
    SHARED_LIBRARY_SUFFIX := .dll
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   260
  else ifeq ($(OPENJDK_TARGET_OS), linux)
53460
65c813da7c65 8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents: 53172
diff changeset
   261
    LD_JAOTC := $(DEVKIT_HOME)/bin/ld
52393
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   262
    LIBRARY_PREFIX := lib
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   263
    SHARED_LIBRARY_SUFFIX := .so
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   264
  else ifeq ($(OPENJDK_TARGET_OS), macosx)
53460
65c813da7c65 8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents: 53172
diff changeset
   265
    LD_JAOTC := $(DEVKIT_HOME)/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
52393
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   266
    LIBRARY_PREFIX := lib
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   267
    SHARED_LIBRARY_SUFFIX := .dylib
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   268
  else ifeq ($(OPENJDK_TARGET_OS), solaris)
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   269
    # Prefer system linker for AOT on Solaris.
53460
65c813da7c65 8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents: 53172
diff changeset
   270
    LD_JAOTC := ld
52393
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   271
    LIBRARY_PREFIX := lib
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   272
    SHARED_LIBRARY_SUFFIX := .so
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   273
  endif
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   274
else
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   275
  LD := ld
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   276
endif
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   277
53526
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   278
ifneq ($(wildcard $(JDK_IMAGE_DIR)/template.xml), )
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   279
  TEST_OPTS_JCOV := true
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   280
  JCOV_IMAGE_DIR := $(JDK_IMAGE_DIR)
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   281
else
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   282
  TEST_OPTS_JCOV := false
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   283
  JCOV_IMAGE_DIR :=
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   284
endif
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   285
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   286
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   287
# Generate the ephemeral spec file
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   288
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   289
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   290
# Now we can include additional custom support.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   291
# This might define CUSTOM_NEW_SPEC_LINE
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   292
ifneq ($(CUSTOM_MAKE_DIR), )
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   293
  include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   294
endif
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   295
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   296
NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   297
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   298
$(call CreateNewSpec, $(NEW_SPEC), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   299
    # Generated file -- do not edit!, \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   300
    SPEC := $(NEW_SPEC), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   301
    TOPDIR := $(TOPDIR), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   302
    OUTPUTDIR := $(OUTPUTDIR), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   303
    BOOT_JDK := $(BOOT_JDK), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   304
    JT_HOME := $(JT_HOME), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   305
    JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
53526
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   306
    JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   307
    TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
49147
af37d9997bd6 8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents: 48078
diff changeset
   308
    SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   309
    MAKE := $(MAKE), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   310
    BASH := $(BASH), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   311
    JIB_JAR := $(JIB_JAR), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   312
    FIXPATH := $(FIXPATH), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   313
    PATH_SEP := $(PATH_SEP), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   314
    OPENJDK_TARGET_OS := $(OPENJDK_TARGET_OS), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   315
    OPENJDK_TARGET_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   316
    OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS_ENV), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   317
    OPENJDK_TARGET_CPU := $(OPENJDK_TARGET_CPU), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   318
    OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_TARGET_CPU_ARCH), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   319
    OPENJDK_TARGET_CPU_BITS := $(OPENJDK_TARGET_CPU_BITS), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   320
    OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   321
    NUM_CORES := $(NUM_CORES), \
52593
8c887dcd5d90 8214003: Limit default test jobs based on memory size
erikj
parents: 52393
diff changeset
   322
    MEMORY_SIZE := $(MEMORY_SIZE), \
53460
65c813da7c65 8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents: 53172
diff changeset
   323
    LD_JAOTC := $(LD_JAOTC), \
52393
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   324
    LIBRARY_PREFIX := $(LIBRARY_PREFIX), \
ff10f8f3a583 8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents: 52125
diff changeset
   325
    SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   326
    include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \
53526
688ce88f89cd 8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents: 53460
diff changeset
   327
    TEST_OPTS_JCOV := $(TEST_OPTS_JCOV), \
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   328
    $(CUSTOM_NEW_SPEC_LINE), \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   329
)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   330
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   331
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   332
# The run-test-prebuilt target
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   333
################################################################################
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   334
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   335
SPEC := $(NEW_SPEC)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   336
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   337
default: all
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   338
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   339
run-test-prebuilt:
55098
609dc5c60c06 8224011: Failure handling in ExecuteWithLog fails in run-test-prebuilt
erikj
parents: 54382
diff changeset
   340
        # Need to make sure the failure logs output dir exists since
609dc5c60c06 8224011: Failure handling in ExecuteWithLog fails in run-test-prebuilt
erikj
parents: 54382
diff changeset
   341
        # ExecuteWithLog is called in RunTests.gmk. The PrepareFailureLogs macro
609dc5c60c06 8224011: Failure handling in ExecuteWithLog fails in run-test-prebuilt
erikj
parents: 54382
diff changeset
   342
        # is unfortunately not available at this point.
609dc5c60c06 8224011: Failure handling in ExecuteWithLog fails in run-test-prebuilt
erikj
parents: 54382
diff changeset
   343
	$(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs)
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   344
	@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
54382
61616f509ef8 8221762: Improve Main.gmk/FindTests.gmk bootstrap time
erikj
parents: 53526
diff changeset
   345
        # The lazy initialization of the cache file in FindTests.gmk does not
61616f509ef8 8221762: Improve Main.gmk/FindTests.gmk bootstrap time
erikj
parents: 53526
diff changeset
   346
        # always work with RunTests.gmk. To guarantee that the jtreg test groups
61616f509ef8 8221762: Improve Main.gmk/FindTests.gmk bootstrap time
erikj
parents: 53526
diff changeset
   347
        # are always found and parsed, call FindTests.gmk stand alone once
61616f509ef8 8221762: Improve Main.gmk/FindTests.gmk bootstrap time
erikj
parents: 53526
diff changeset
   348
        # before calling RunTests.gmk.
61616f509ef8 8221762: Improve Main.gmk/FindTests.gmk bootstrap time
erikj
parents: 53526
diff changeset
   349
	@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/common/FindTests.gmk \
61616f509ef8 8221762: Improve Main.gmk/FindTests.gmk bootstrap time
erikj
parents: 53526
diff changeset
   350
	    SPEC=$(SPEC) FINDTESTS_STAND_ALONE=true
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   351
	@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   352
	    TEST="$(TEST)"
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   353
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   354
all: run-test-prebuilt
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   355
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents:
diff changeset
   356
.PHONY: default all