Populate with latest code from jdk9 sandbox. ihse-testmakefiles-branch
authorihse
Mon, 27 Nov 2017 12:23:47 +0100
branchihse-testmakefiles-branch
changeset 55881 dbf68259f80e
parent 55879 23daacc563d2
child 55882 79c94bfb654e
Populate with latest code from jdk9 sandbox.
make/FakeSpecForLegacyTests.gmk
make/Help.gmk
make/RunTestsLegacy.gmk
make/RunTestsPrebuilt.gmk
make/RunTestsPrebuiltSpec.gmk
make/common/MakeBase.gmk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/FakeSpecForLegacyTests.gmk	Mon Nov 27 12:23:47 2017 +0100
@@ -0,0 +1,156 @@
+#
+# Copyright (c) 2016, 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 RunTestsLegacy.gmk.
+
+# FIXME: HACK.
+TEST_ROOT := $(TOPDIR)/jdk/test
+
+ifdef ALT_OUTPUTDIR
+  LEGACY_OUTPUTDIR := $(ALT_OUTPUTDIR)
+else
+  LEGACY_OUTPUTDIR := $(TEST_ROOT)/..
+endif
+
+# We need a proper PRODUCT_HOME
+ifeq ($(PRODUCT_HOME), )
+  PRODUCT_HOME := $(LEGACY_OUTPUTDIR)/images/jdk
+  ifeq ($(wildcard $(PRODUCT_HOME)/bin/java), )
+    PRODUCT_HOME := $(LEGACY_OUTPUTDIR)
+    ifeq ($(wildcard $(PRODUCT_HOME)/bin/java), )
+      ifeq ($(wildcard $(PRODUCT_HOME)/bin/java), )
+        $(info Error: PRODUCT_HOME must be specified)
+        $(error Cannot continue)
+      endif
+    endif
+  endif
+  $(info Warning: No PRODUCT_HOME given, will use $(PRODUCT_HOME))
+else
+  ifeq ($(wildcard $(PRODUCT_HOME)/bin/java), )
+    $(info Error: Cannot find bin/java at PRODUCT_HOME=$(PRODUCT_HOME))
+    $(error Cannot continue)
+  endif
+endif
+$(info Using PRODUCT_HOME=$(PRODUCT_HOME))
+
+# We need a proper JT_HOME
+
+JDK_IMAGE_DIR := $(PRODUCT_HOME)
+# PRODUCT_HOME
+
+# ???
+BOOT_JDK := /var/tmp/jib-ihse/install/java/re/jdk/8/promoted/latest/bundles/linux-x64/jdk-8-linux-x64.tar.gz/jdk1.8.0
+
+# MUST BE SET
+JT_HOME := /var/tmp/jib-ihse/install/java/re/jtreg/4.2/promoted/all/b04/bundles/jtreg_bin-4.2.zip/jtreg
+
+$(info using JT_HOME $(JT_HOME))
+$(info using BOOT_JDK $(BOOT_JDK))
+$(info using PRODUCT_HOME $(PRODUCT_HOME))
+
+CONF_NAME := linux-x64
+
+OUTPUT_ROOT := $(TOPDIR)/build/$(CONF_NAME)
+
+OPENJDK_TARGET_OS := linux
+OPENJDK_TARGET_OS_TYPE := unix
+OPENJDK_TARGET_OS_ENV := linux
+
+OPENJDK_TARGET_CPU := x86_64
+OPENJDK_TARGET_CPU_ARCH := x86
+OPENJDK_TARGET_CPU_BITS := 64
+OPENJDK_TARGET_CPU_ENDIAN := little
+
+NUM_CORES := 4
+JOBS ?= 3
+TEST_JOBS ?= 0
+
+USE_JTREG_EXECUTABLE := true
+
+# These needs som special handling on Windows to get right
+PATH_SEP := :
+FIXPATH :=
+CYGPATH :=
+
+# Make sure we're using bash as shell with -e and pipefail.
+BASH := bash
+BASH_ARGS := -o pipefail -e
+SHELL := $(BASH) $(BASH_ARGS)
+
+# Set up default names for common tools
+AWK := awk
+BASENAME := basename
+CAT := cat
+CHMOD := chmod
+CP := cp
+CUT := cut
+DATE := date
+DIFF := diff
+DIRNAME := dirname
+ECHO := echo
+EXPR := expr
+FILE := file
+FIND := find
+GREP := grep
+EGREP := grep -E
+FGREP := grep -F
+HEAD := head
+LN := ln
+LS := ls
+MKDIR := mkdir
+MV := mv
+NAWK := nawk
+PRINTF := printf
+PWD := pwd
+RMDIR := rmdir
+RM := rm -f
+SED := sed
+SH := sh
+SORT := sort
+TAIL := tail
+TEE := tee
+TOUCH := touch
+TR := tr
+UNIQ := uniq
+WC := wc
+XARGS := xargs
+
+# Create composite variables from what have been defined above
+SRC_ROOT := $(TOPDIR)
+BUILD_OUTPUT := $(OUTPUT_ROOT)
+IMAGES_OUTPUTDIR := $(OUTPUT_ROOT)/images
+TEST_IMAGE_SUBDIR := test
+TEST_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
+SYMBOLS_IMAGE_SUBDIR := symbols
+SYMBOLS_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
+
+# Assume target platform is same as build platform
+OPENJDK_TARGET_OS := $(OPENJDK_BUILD_OS)
+OPENJDK_TARGET_OS_TYPE := $(OPENJDK_BUILD_OS_TYPE)
+OPENJDK_TARGET_OS_ENV := $(OPENJDK_BUILD_OS_ENV)
+OPENJDK_TARGET_CPU := $(OPENJDK_BUILD_CPU)
+OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_BUILD_CPU_ARCH)
+OPENJDK_TARGET_CPU_BITS := $(OPENJDK_BUILD_CPU_BITS)
+OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_BUILD_CPU_ENDIAN)
--- a/make/Help.gmk	Mon Nov 27 12:01:13 2017 +0100
+++ b/make/Help.gmk	Mon Nov 27 12:23:47 2017 +0100
@@ -115,6 +115,13 @@
         # We need a dummy rule otherwise make will complain
 	@true
 
-ALL_GLOBAL_TARGETS := help print-configurations
+# This is not really a "help" target, but it is a global target, and those are
+# all contained in this file.
+run-test-prebuilt:
+	@( cd $(topdir) && \
+	    $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
+	    run-test TEST="$(TEST)" )
+
+ALL_GLOBAL_TARGETS := help print-configurations run-test-prebuilt
 
 .PHONY: $(ALL_GLOBAL_TARGETS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/RunTestsLegacy.gmk	Mon Nov 27 12:23:47 2017 +0100
@@ -0,0 +1,122 @@
+#
+# Copyright (c) 2016, 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.
+#
+
+# 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)), )
+  MAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE)))
+endif
+
+# Locate this Makefile
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
+  makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
+else
+  makefile_path := $(lastword $(MAKEFILE_LIST))
+endif
+topdir := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
+
+# Determine if we need a fake spec
+available_specs := $(wildcard $(topdir)/build/*/*.gmk)
+ifeq ($(words $(available_specs)), 1)
+  # We found exactly one spec, assume we should use it
+  spec := $(strip $(patsubst $(topdir)/%, %, $(available_specs)))
+  $(info Using SPEC from configuration located at $(strip $(patsubst %/spec.gmk, %, $(spec))))
+else
+  ifeq ($(available_specs), )
+    $(info No configurations found, using fake spec)
+    spec := make/FakeSpecForLegacyTests.gmk
+  else
+    $(info Warning: Multiple configurations found, using fake spec instead!)
+    $(info Please use top-level Makefile to properly select configuration)
+    spec := make/FakeSpecForLegacyTests.gmk
+  endif
+endif
+
+default: all
+
+# Legacy control variables for jtreg/testing:
+#  SLASH_JAVA
+#  TEST_OUTPUT_DIR
+#  ALT_OUTPUTDIR
+#  PRODUCT_HOME
+#  JAVA_ARGS
+#  JPRT_PRODUCT_ARGS
+#  JPRT_PRODUCT_VM_ARGS
+#  TESTNATIVE_DIR
+#  JPRT_ARCHIVE_BUNDLE
+#  JT_HOME
+#  TESTDIRS # When called from JPRT the TESTDIRS variable is set to the jtreg tests to run (=> sets this in TEST_SELECTION)
+#  CONCURRENCY
+#  EXTRA_JTREG_OPTIONS
+#  JTREG_ASSERT_OPTION
+#  JTREG_VERBOSE
+#  JTREG_IGNORE_OPTION
+#  JTREG_TIMEOUT_OPTION
+#  JTREG_MEMORY_OPTION
+#  JTREG_TESTVM_MEMORY_OPTION
+#  JTREG_KEY_OPTION
+#  TEST_SELECTION
+
+################################################################################
+
+# Langtools used to remove the prefix "langtools_" from their test names.
+
+langtools_% :
+	echo TESTS=$(addprefix langtools/test:, $(subst langtools_,,$@))
+
+jdk_% core_%s svc_%:
+	echo TESTS=$(addprefix jdk/test:, $@)
+
+jaxp_%:
+	echo TESTS=$(addprefix jaxp/test:, $@)
+
+hotspot_%:
+	echo TESTS=$(addprefix hotspot/test:, $@)
+
+runtest:
+	@cd $(topdir) && $(MAKE) -r -R -j 1 -s -I make/common/ \
+	    SPEC=$(spec) TOPDIR=$(topdir) \
+	    -f make/RunTests.gmk runtest TEST="tier1"
+
+# If TEST_SELECTION is given, only use TESTDIRS to determine component.
+# If TEST_SELECTION is not given, use TESTDIRS  to determine component and
+# test in the component.
+# TESTDIRS must begin with ../<component>/test.
+# Specifying only TESTDIRS=../<component>/test (with or without trailing slash)
+# is an error.
+#
+COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS)))
+#ifneq ($(TEST_SELECTION), )
+#  $(addprefix $(COMPONENT)/test:, $(TESTNAMES))
+
+TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS))
+
+jtreg_tests:
+	echo TESTS=$(sort $(TESTDIRS) $(TEST_SELECTION))
+	echo COMPONENT $(COMPONENT) TESTDIRS_TESTS $(TESTDIRS_TESTS)
+
+all: runtest
+
+.PHONY: default all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/RunTestsPrebuilt.gmk	Mon Nov 27 12:23:47 2017 +0100
@@ -0,0 +1,139 @@
+#
+# 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.
+#
+
+# FIXME
+export BASH := bash
+
+# FIXME: hardcoded!
+
+PRODUCT_HOME=/var/tmp/jib-magnusi/install/jdk/10/22/linux-x64.jdk/jdk-10
+JT_JAVA=/var/tmp/jib-magnusi/install/java/re/jdk/8/promoted/latest/bundles/linux-x64/jdk-8-linux-x64.tar.gz/jdk1.8.0
+TEST_IMAGE_DIR=/var/tmp/jib-magnusi/install/jdk/10/22/linux-x64.test
+JT_HOME=/var/tmp/jib-magnusi/install/java/re/jtreg/4.2/promoted/all/b08/bundles/jtreg_bin-4.2.zip/jtreg
+TONGA_HOME=/var/tmp/jib-magnusi/install/jpg/infra/builddeps/tonga/4.0.0_May_12_2014+1.0/tonga-4.0.0_May_12_2014+1.0.zip
+TEST_OUTPUT_DIR=/tmp/ihse/test-out
+
+
+# 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)), )
+  export MAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE)))
+endif
+
+# Locate this Makefile
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
+  makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
+else
+  makefile_path := $(lastword $(MAKEFILE_LIST))
+endif
+topdir := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
+
+################################################################################
+
+export JDK_IMAGE_DIR := $(PRODUCT_HOME)
+export BOOT_JDK := $(JT_JAVA)
+export BUILD_OUTPUT := $(TEST_OUTPUT_DIR)
+export TONGA_JAR := $(TONGA_HOME)/tonga.jar
+
+# keep names, but verify
+export TEST_IMAGE_DIR
+export JT_HOME
+
+export TOPDIR := $(topdir)
+
+LOG_LEVEL:=debug
+SPEC := $(topdir)/make/RunTestsPrebuiltSpec.gmk
+
+# Now transform ourself to somewhat resembling sanity, but still just using the
+# hard-coded spec
+include $(SPEC)
+$(info spec is $(SPEC))
+include $(topdir)/make/common/MakeBase.gmk
+$(info inluced)
+
+NEW_SPEC := $(TEST_OUTPUT_DIR)/spec.gmk
+
+define CreateNewSpec
+  $(if $(strip $(13)), \
+    $(error Internal makefile error: \
+      Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
+  ) \
+  $(shell rm -f $(NEW_SPEC)) \
+  $(foreach i, 1 2 3 4 5 6 7 8 9 10 11 12, \
+    $(if $(strip $($i)), \
+      $(call AppendFile, $(strip $($i)), $(NEW_SPEC)) \
+    ) \
+  )
+endef
+
+define VerifyVariable
+  ifeq ($$($1), )
+    $$(info Error: Variable $1 is missing, needed for run-tests-prebuilt)
+    $$(error Cannot continue.)
+  else
+    ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
+      $$(info Prebuilt variable $1=$$($1))
+    endif
+  endif
+endef
+
+$(eval $(call VerifyVariable,TOPDIR))
+$(eval $(call VerifyVariable,OUTPUT_ROOT))
+$(eval $(call VerifyVariable,BOOT_JDK))
+$(eval $(call VerifyVariable,JDK_IMAGE_DIR))
+$(eval $(call VerifyVariable,TEST_IMAGE_DIR))
+$(eval $(call VerifyVariable,JT_HOME))
+$(eval $(call VerifyVariable,TONGA_JAR))
+
+$(call CreateNewSpec, \
+    # Generated file -- do not edit!, \
+    SPEC := $(NEW_SPEC), \
+    TOPDIR := $(topdir), \
+    OUTPUT_ROOT := $(OUTPUT_ROOT), \
+    BOOT_JDK := $(BOOT_JDK), \
+    JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
+    TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
+    JT_HOME := $(JT_HOME), \
+    TONGA_JAR := $(TONGA_JAR), \
+    include $(topdir)/make/RunTestsPrebuiltSpec.gmk, \
+)
+
+################################################################################
+
+default: all
+
+run-test:
+	@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
+	@cd $(topdir) && $(MAKE) -r -R -j 1 -s -I make/common/ \
+	    SPEC=$(NEW_SPEC) \
+	    -f make/RunTests.gmk run-test TEST="$(TEST)"
+	@if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
+	  exit 1 ; \
+	fi
+
+
+all: run-test
+
+.PHONY: default all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/RunTestsPrebuiltSpec.gmk	Mon Nov 27 12:23:47 2017 +0100
@@ -0,0 +1,227 @@
+#
+# 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 for run-tests-prebuilt)
+    $$(error Cannot continue.)
+  else
+    ifneq ($$(findstring $$(LOG_LEVEL), debug trace), )
+      $$(info Prebuilt variable $1=$$($1))
+    endif
+  endif
+endef
+
+$(eval $(call VerifyVariable,TOPDIR))
+$(eval $(call VerifyVariable,BOOT_JDK))
+$(eval $(call VerifyVariable,OUTPUT_ROOT))
+$(eval $(call VerifyVariable,JDK_IMAGE_DIR))
+$(eval $(call VerifyVariable,TEST_IMAGE_DIR))
+$(eval $(call VerifyVariable,JT_HOME))
+$(eval $(call VerifyVariable,TONGA_JAR))
+
+
+# These are old aliases that have not yet been fully removed
+BUILD_OUTPUT :=  $(OUTPUT_ROOT)
+SRC_ROOT := $(TOPDIR)
+
+# FIXMEs
+
+# verify that we have:
+# MAKE
+# BASH
+
+#SPEC :=
+FIXPATH :=
+CYGPATH := cygpath
+
+
+###FIXME
+# colon or semicolon
+PATH_SEP:=:
+
+
+LOG_LEVEL=info
+#LOG_LEVEL=$(LOG_LEVEL)
+#MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS)
+
+# The built jdk will run in this target system.
+
+OPENJDK_TARGET_OS:=linux
+OPENJDK_TARGET_OS_TYPE:=unix
+OPENJDK_TARGET_OS_ENV:=linux
+
+OPENJDK_TARGET_CPU:=x86_64
+OPENJDK_TARGET_CPU_ARCH:=x86
+OPENJDK_TARGET_CPU_BITS:=64
+OPENJDK_TARGET_CPU_ENDIAN:=little
+
+#DEBUG_LEVEL:=@DEBUG_LEVEL@
+#HOTSPOT_DEBUG_LEVEL:=@HOTSPOT_DEBUG_LEVEL@
+
+#BUILD_GTEST := @BUILD_GTEST@
+
+### FIXME
+BUILD_FAILURE_HANDLER := true
+
+### FIXME
+# Information about the build system
+NUM_CORES:=16
+MEMORY_SIZE:=28130
+
+## FIXME
+# Number of parallel jobs to use for compilation
+JOBS?=16
+TEST_JOBS?=0
+
+#### custom
+TONGA_JAR := @TONGA_JAR@
+
+################################################################################
+
+
+# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
+# some definitions here, and are needed if MakeBase.gmk is not included before
+# this file.
+X:=
+SPACE:=$(X) $(X)
+COMMA:=,
+
+# The default make arguments
+MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
+    MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
+
+# Override the shell with bash
+BASH_ARGS := -o pipefail -e
+SHELL:=$(BASH) $(BASH_ARGS)
+
+# The "human readable" name of this configuration
+CONF_NAME := run-test-prebuilt
+
+# Assume target platform is same as build platform
+OPENJDK_TARGET_OS := $(OPENJDK_BUILD_OS)
+OPENJDK_TARGET_OS_TYPE := $(OPENJDK_BUILD_OS_TYPE)
+OPENJDK_TARGET_OS_ENV := $(OPENJDK_BUILD_OS_ENV)
+
+OPENJDK_TARGET_CPU := $(OPENJDK_BUILD_CPU)
+OPENJDK_TARGET_CPU_ARCH := $(OPENJDK_BUILD_CPU_ARCH)
+OPENJDK_TARGET_CPU_BITS := $(OPENJDK_BUILD_CPU_BITS)
+OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_BUILD_CPU_ENDIAN)
+
+# FIXME: Can we remove this?
+HOTSPOT_TOPDIR:=$(TOPDIR)/hotspot
+
+SUPPORT_OUTPUTDIR := $(OUTPUT_ROOT)/support
+BUILDTOOLS_OUTPUTDIR := $(OUTPUT_ROOT)/buildtools
+
+HOTSPOT_OUTPUTDIR := $(OUTPUT_ROOT)/hotspot
+JDK_OUTPUTDIR := $(OUTPUT_ROOT)/jdk
+IMAGES_OUTPUTDIR := $(OUTPUT_ROOT)/images
+BUNDLES_OUTPUTDIR := $(OUTPUT_ROOT)/bundles
+TESTMAKE_OUTPUTDIR := $(OUTPUT_ROOT)/test-make
+MAKESUPPORT_OUTPUTDIR := $(OUTPUT_ROOT)/make-support
+BUILDJDK_OUTPUTDIR := $(OUTPUT_ROOT)/buildjdk
+
+### FIXME?
+#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
+#JAVA_FLAGS_JAVAC:= -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
+#JAVA_TOOL_FLAGS_SMALL:= -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1
+
+JAVA_CMD:=$(BOOT_JDK)/bin/java
+JAVAC_CMD:=$(BOOT_JDK)/bin/javac
+JAVAH_CMD:=$(BOOT_JDK)/bin/javah
+JAR_CMD:=$(BOOT_JDK)/bin/jar
+JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
+JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
+JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
+
+# These variables are meant to be used. They are defined with = instead of := to make
+# it possible to override only the *_CMD variables.
+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_JAVAC) $(JAVA_FLAGS)
+JAVAC=$(FIXPATH) $(JAVAC_CMD)
+JAVAH=$(FIXPATH) $(JAVAH_CMD)
+JAR=$(FIXPATH) $(JAR_CMD)
+JLINK = $(FIXPATH) $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
+JMOD = $(FIXPATH) $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
+JARSIGNER=$(FIXPATH) $(JARSIGNER_CMD)
+
+# Tools adhering to a minimal and common standard of posix compliance.
+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
+
+####################################################
+#
+# Misc
+#
+
+JRE_IMAGE_DIR := $(JDK_IMAGE_DIR)
--- a/make/common/MakeBase.gmk	Mon Nov 27 12:01:13 2017 +0100
+++ b/make/common/MakeBase.gmk	Mon Nov 27 12:23:47 2017 +0100
@@ -912,6 +912,17 @@
       $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
 endif
 
+# Param 1 - Text to write
+# Param 2 - File to write to
+ifeq ($(HAS_FILE_FUNCTION), true)
+  AppendFile = \
+      $(file >>$2,$(strip $1))
+else
+  # Use printf to get consistent behavior on all platforms.
+  AppendFile = \
+      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
+endif
+
 ################################################################################
 # DependOnVariable
 #