diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 08fd371176c..75fcb5f4de4 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -361,3 +361,4 @@ f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111
6743a8e0cab7b5f6f4a0575f6664892f0ab740af jdk-9+116
e882bcdbdac436523f3d5681611d3118a3804ea7 jdk-9+117
047f95de8f918d8ff5e8cd2636a2abb5c3c8adb8 jdk-9+118
+3463a3f14f0f0e8a68f29ac6405454f2fa2f598a jdk-9+119
diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4
index f295a46d3c4..6a64c47b964 100644
--- a/common/autoconf/basics.m4
+++ b/common/autoconf/basics.m4
@@ -484,6 +484,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
BASIC_REQUIRE_PROGS(FILE, file)
BASIC_REQUIRE_PROGS(FIND, find)
BASIC_REQUIRE_PROGS(HEAD, head)
+ BASIC_REQUIRE_PROGS(GUNZIP, gunzip)
+ BASIC_REQUIRE_PROGS(GZIP, pigz gzip)
BASIC_REQUIRE_PROGS(LN, ln)
BASIC_REQUIRE_PROGS(LS, ls)
BASIC_REQUIRE_PROGS(MKDIR, mkdir)
@@ -496,7 +498,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
BASIC_REQUIRE_PROGS(SH, sh)
BASIC_REQUIRE_PROGS(SORT, sort)
BASIC_REQUIRE_PROGS(TAIL, tail)
- BASIC_REQUIRE_PROGS(TAR, tar)
+ BASIC_REQUIRE_PROGS(TAR, gtar tar)
BASIC_REQUIRE_PROGS(TEE, tee)
BASIC_REQUIRE_PROGS(TOUCH, touch)
BASIC_REQUIRE_PROGS(TR, tr)
@@ -839,8 +841,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
# The spec.gmk file contains all variables for the make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
- # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
- AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
# The bootcycle-spec.gmk file contains support for boot cycle builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
# The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
@@ -1009,11 +1009,36 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
AC_SUBST(FIND_DELETE)
])
+AC_DEFUN([BASIC_CHECK_TAR],
+[
+ # Test which kind of tar was found
+ if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
+ TAR_TYPE="gnu"
+ elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
+ TAR_TYPE="bsd"
+ elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+ TAR_TYPE="solaris"
+ fi
+ AC_MSG_CHECKING([what type of tar was found])
+ AC_MSG_RESULT([$TAR_TYPE])
+
+ if test "x$TAR_TYPE" = "xgnu"; then
+ TAR_INCLUDE_PARAM="T"
+ TAR_SUPPORTS_TRANSFORM="true"
+ else
+ TAR_INCLUDE_PARAM="I"
+ TAR_SUPPORTS_TRANSFORM="false"
+ fi
+ AC_SUBST(TAR_INCLUDE_PARAM)
+ AC_SUBST(TAR_SUPPORTS_TRANSFORM)
+])
+
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
[
BASIC_CHECK_GNU_MAKE
BASIC_CHECK_FIND_DELETE
+ BASIC_CHECK_TAR
# These tools might not be installed by default,
# need hint on how to install them.
diff --git a/common/autoconf/buildjdk-spec.gmk.in b/common/autoconf/buildjdk-spec.gmk.in
index 818f21eed95..c4b7d9051cc 100644
--- a/common/autoconf/buildjdk-spec.gmk.in
+++ b/common/autoconf/buildjdk-spec.gmk.in
@@ -134,8 +134,9 @@ ifeq ($(JVM_INTERPRETER), cpp)
endif
HOTSPOT_MAKE_ARGS := product docs export_product
-# Control wether Hotspot runs Queens test after building
-TEST_IN_BUILD := false
+
+# Control wether Hotspot builds gtest tests
+BUILD_GTEST := false
USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
diff --git a/common/autoconf/compare.sh.in b/common/autoconf/compare.sh.in
index 67a69ff73bd..f7e2003ca32 100644
--- a/common/autoconf/compare.sh.in
+++ b/common/autoconf/compare.sh.in
@@ -48,6 +48,7 @@ export EXPR="@EXPR@"
export FILE="@FILE@"
export FIND="@FIND@"
export GREP="@GREP@"
+export GUNZIP="@GUNZIP@"
export LDD="@LDD@"
export LN="@LN@"
export MKDIR="@MKDIR@"
@@ -63,10 +64,11 @@ export SED="@SED@"
export SORT="@SORT@"
export STAT="@STAT@"
export STRIP="@STRIP@ @STRIPFLAGS@"
+export TAR="@TAR@"
export TEE="@TEE@"
export UNIQ="@UNIQ@"
export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200"
-export UNARCHIVE="@UNZIP@ -q"
+export UNARCHIVE="@UNZIP@ -q -o"
export SRC_ROOT="@TOPDIR@"
export OUTPUT_ROOT="@OUTPUT_ROOT@"
diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac
index 291851f8d10..0079a944dac 100644
--- a/common/autoconf/configure.ac
+++ b/common/autoconf/configure.ac
@@ -207,6 +207,7 @@ JDKOPT_SETUP_CODE_COVERAGE
# Need toolchain to setup dtrace
HOTSPOT_SETUP_DTRACE
HOTSPOT_SETUP_JVM_FEATURES
+HOTSPOT_ENABLE_DISABLE_GTEST
###############################################################################
#
@@ -226,7 +227,6 @@ LIB_SETUP_LIBRARIES
#
###############################################################################
-HOTSPOT_SETUP_LEGACY_BUILD
JDKOPT_DETECT_INTREE_EC
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index f40198f8da3..ef4a2674e9f 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -652,21 +652,7 @@ MEMORY_SIZE
NUM_CORES
BUILD_FAILURE_HANDLER
ENABLE_INTREE_EC
-JVM_VARIANT_CORE
-JVM_VARIANT_ZEROSHARK
-JVM_VARIANT_ZERO
-JVM_VARIANT_HOTSPOT
-JVM_VARIANT_MINIMAL1
-JVM_VARIANT_CLIENT
-JVM_VARIANT_SERVER
-JVM_VARIANTS_COMMA
-TEST_IN_BUILD
-HOTSPOT_MAKE_ARGS
-MACOSX_UNIVERSAL
-DEBUG_CLASSFILES
-FASTDEBUG
-VARIANT
-USE_NEW_HOTSPOT_BUILD
+STLPORT_LIB
LIBZIP_CAN_USE_MMAP
LIBDL
LIBM
@@ -702,6 +688,7 @@ LIBCXX
STATIC_CXX_SETTING
FIXPATH_DETACH_FLAG
FIXPATH
+BUILD_GTEST
VALID_JVM_FEATURES
JVM_FEATURES_custom
JVM_FEATURES_zeroshark
@@ -963,6 +950,8 @@ OTOOL
LDD
ZIP
UNZIP
+TAR_SUPPORTS_TRANSFORM
+TAR_INCLUDE_PARAM
FIND_DELETE
OUTPUT_SYNC
OUTPUT_SYNC_SUPPORTED
@@ -995,6 +984,9 @@ HOTSPOT_BUILD_CPU_ARCH
HOTSPOT_BUILD_CPU
HOTSPOT_BUILD_OS_TYPE
HOTSPOT_BUILD_OS
+OPENJDK_BUILD_BUNDLE_PLATFORM
+OPENJDK_BUILD_CPU_BUNDLE
+OPENJDK_BUILD_OS_BUNDLE
OPENJDK_BUILD_OS_EXPORT_DIR
OPENJDK_BUILD_CPU_JLI_CFLAGS
OPENJDK_BUILD_CPU_OSARCH
@@ -1009,6 +1001,9 @@ HOTSPOT_TARGET_OS_TYPE
HOTSPOT_TARGET_OS
DEFINE_CROSS_COMPILE_ARCH
LP64
+OPENJDK_TARGET_BUNDLE_PLATFORM
+OPENJDK_TARGET_CPU_BUNDLE
+OPENJDK_TARGET_OS_BUNDLE
OPENJDK_TARGET_OS_EXPORT_DIR
OPENJDK_TARGET_CPU_JLI_CFLAGS
OPENJDK_TARGET_CPU_OSARCH
@@ -1078,6 +1073,8 @@ MKTEMP
MKDIR
LS
LN
+GZIP
+GUNZIP
HEAD
FIND
FILE
@@ -1202,6 +1199,7 @@ enable_native_coverage
enable_dtrace
with_jvm_features
with_jvm_interpreter
+enable_hotspot_gtest
with_stdc__lib
with_msvcr_dll
with_msvcp_dll
@@ -1227,8 +1225,6 @@ with_lcms
with_dxsdk
with_dxsdk_lib
with_dxsdk_include
-enable_new_hotspot_build
-enable_hotspot_test_in_build
enable_jtreg_failure_handler
with_num_cores
with_memory_size
@@ -1262,6 +1258,8 @@ EXPR
FILE
FIND
HEAD
+GUNZIP
+GZIP
LN
LS
MKDIR
@@ -1996,15 +1994,11 @@ Optional Features:
--enable-dtrace[=yes/no/auto]
enable dtrace. Default is auto, where dtrace is
enabled if all dependencies are present.
+ --disable-hotspot-gtest Disables building of the Hotspot unit tests
--disable-freetype-bundling
disable bundling of the freetype library with the
build result [enabled on Windows or when using
--with-freetype, disabled otherwise]
- --disable-new-hotspot-build
- disable the new hotspot build system (use the old)
- [enabled]
- --enable-hotspot-test-in-build
- run the Queens test after Hotspot build [disabled]
--enable-jtreg-failure-handler
forces build of the jtreg failure handler to be
enabled, missing dependencies become fatal errors.
@@ -2205,6 +2199,8 @@ Some influential environment variables:
FILE Override default value for FILE
FIND Override default value for FIND
HEAD Override default value for HEAD
+ GUNZIP Override default value for GUNZIP
+ GZIP Override default value for GZIP
LN Override default value for LN
LS Override default value for LS
MKDIR Override default value for MKDIR
@@ -3707,6 +3703,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
# Check if build directory is on local disk. If not possible to determine,
# we prefer to claim it's local.
# Argument 1: directory to test
@@ -4303,9 +4301,8 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
#
-###############################################################################
-# Support for old hotspot build. Remove once new hotspot build has proven
-# to work satisfactory.
+################################################################################
+# Check if gtest should be built
#
@@ -4732,6 +4729,13 @@ VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
################################################################################
+################################################################################
+# libstlport.so.1 is needed for running gtest on Solaris. Find it to
+# redistribute it in the test image.
+################################################################################
+
+
+
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5076,7 +5080,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1462970869
+DATE_WHEN_GENERATED=1463732692
###############################################################################
#
@@ -8401,6 +8405,414 @@ $as_echo "$tool_specified" >&6; }
+ # Publish this variable in the help.
+
+
+ if [ -z "${GUNZIP+x}" ]; then
+ # The variable is not set by user, try to locate tool using the code snippet
+ for ac_prog in gunzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GUNZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GUNZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GUNZIP=$ac_cv_path_GUNZIP
+if test -n "$GUNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
+$as_echo "$GUNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$GUNZIP" && break
+done
+
+ else
+ # The variable is set, but is it from the command line or the environment?
+
+ # Try to remove the string !GUNZIP! from our list.
+ try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
+ if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+ # If it failed, the variable was not from the command line. Ignore it,
+ # but warn the user (except for BASH, which is always set by the calling BASH).
+ if test "xGUNZIP" != xBASH; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
+ fi
+ # Try to locate tool using the code snippet
+ for ac_prog in gunzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GUNZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GUNZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GUNZIP=$ac_cv_path_GUNZIP
+if test -n "$GUNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
+$as_echo "$GUNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$GUNZIP" && break
+done
+
+ else
+ # If it succeeded, then it was overridden by the user. We will use it
+ # for the tool.
+
+ # First remove it from the list of overridden variables, so we can test
+ # for unknown variables in the end.
+ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+ # Check if we try to supply an empty value
+ if test "x$GUNZIP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
+$as_echo_n "checking for GUNZIP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$GUNZIP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GUNZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GUNZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GUNZIP=$ac_cv_path_GUNZIP
+if test -n "$GUNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
+$as_echo "$GUNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$GUNZIP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
+$as_echo_n "checking for GUNZIP... " >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+
+ fi
+
+
+
+ if test "x$GUNZIP" = x; then
+ as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
+ fi
+
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${GZIP+x}" ]; then
+ # The variable is not set by user, try to locate tool using the code snippet
+ for ac_prog in pigz gzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$GZIP" && break
+done
+
+ else
+ # The variable is set, but is it from the command line or the environment?
+
+ # Try to remove the string !GZIP! from our list.
+ try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
+ if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+ # If it failed, the variable was not from the command line. Ignore it,
+ # but warn the user (except for BASH, which is always set by the calling BASH).
+ if test "xGZIP" != xBASH; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
+ fi
+ # Try to locate tool using the code snippet
+ for ac_prog in pigz gzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$GZIP" && break
+done
+
+ else
+ # If it succeeded, then it was overridden by the user. We will use it
+ # for the tool.
+
+ # First remove it from the list of overridden variables, so we can test
+ # for unknown variables in the end.
+ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+ # Check if we try to supply an empty value
+ if test "x$GZIP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
+$as_echo_n "checking for GZIP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$GZIP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+if test -n "$GZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
+$as_echo "$GZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$GZIP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
+$as_echo_n "checking for GZIP... " >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+
+ fi
+
+
+
+ if test "x$GZIP" = x; then
+ as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
+ fi
+
+
+
+
+
# Publish this variable in the help.
@@ -10854,7 +11266,7 @@ $as_echo "$tool_specified" >&6; }
if [ -z "${TAR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
- for ac_prog in tar
+ for ac_prog in gtar tar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -10912,7 +11324,7 @@ done
$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
- for ac_prog in tar
+ for ac_prog in gtar tar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -15428,6 +15840,23 @@ $as_echo "$COMPILE_TYPE" >&6; }
fi
+ # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
+ # Macosx is osx and x86_64 is x64
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ OPENJDK_TARGET_OS_BUNDLE="osx"
+ else
+ OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
+ fi
+ if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ OPENJDK_TARGET_CPU_BUNDLE="x64"
+ else
+ OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
+ fi
+ OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
+
+
+
+
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
A_LP64="LP64:="
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
@@ -15584,6 +16013,23 @@ $as_echo "$COMPILE_TYPE" >&6; }
fi
+ # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
+ # Macosx is osx and x86_64 is x64
+ if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ OPENJDK_BUILD_OS_BUNDLE="osx"
+ else
+ OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
+ fi
+ if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
+ OPENJDK_BUILD_CPU_BUNDLE="x64"
+ else
+ OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
+ fi
+ OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
+
+
+
+
if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
A_LP64="LP64:="
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
@@ -16297,7 +16743,10 @@ $as_echo "$JVM_VARIANTS" >&6; }
# Check that the selected variants are valid
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
- INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+ # Notice that the original variant failes on SLES 10 and 11
+ NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
+ STACK=${JVM_VARIANTS// /$'\n'}
+ INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
if test "x$INVALID_VARIANTS" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
@@ -16306,7 +16755,9 @@ $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
# All "special" variants share the same output directory ("server")
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
- INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+ NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
+ STACK=${JVM_VARIANTS// /$'\n'}
+ INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
fi
@@ -17016,9 +17467,6 @@ $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is inval
# The spec.gmk file contains all variables for the make system.
ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
- # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
- ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
-
# The bootcycle-spec.gmk file contains support for boot cycle builds.
ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
@@ -20699,6 +21147,30 @@ $as_echo "yes" >&6; }
+ # Test which kind of tar was found
+ if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
+ TAR_TYPE="gnu"
+ elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
+ TAR_TYPE="bsd"
+ elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+ TAR_TYPE="solaris"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
+$as_echo_n "checking what type of tar was found... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
+$as_echo "$TAR_TYPE" >&6; }
+
+ if test "x$TAR_TYPE" = "xgnu"; then
+ TAR_INCLUDE_PARAM="T"
+ TAR_SUPPORTS_TRANSFORM="true"
+ else
+ TAR_INCLUDE_PARAM="I"
+ TAR_SUPPORTS_TRANSFORM="false"
+ fi
+
+
+
+
# These tools might not be installed by default,
# need hint on how to install them.
@@ -23790,9 +24262,6 @@ fi
if test "x$OPENJDK_TARGET_OS" = xaix ; then
INCLUDE_SA=false
fi
- if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
- INCLUDE_SA=false
- fi
# Compress jars
@@ -52948,6 +53417,49 @@ fi
+ # Check whether --enable-hotspot-gtest was given.
+if test "${enable_hotspot_gtest+set}" = set; then :
+ enableval=$enable_hotspot_gtest;
+fi
+
+
+ if test -e "$HOTSPOT_TOPDIR/test/native"; then
+ GTEST_DIR_EXISTS="true"
+ else
+ GTEST_DIR_EXISTS="false"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
+$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
+ if test "x$enable_hotspot_gtest" = "xyes"; then
+ if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
+$as_echo "yes, forced" >&6; }
+ BUILD_GTEST="true"
+ else
+ as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
+ fi
+ elif test "x$enable_hotspot_gtest" = "xno"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
+$as_echo "no, forced" >&6; }
+ BUILD_GTEST="false"
+ elif test "x$enable_hotspot_gtest" = "x"; then
+ if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ BUILD_GTEST="true"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ BUILD_GTEST="false"
+ fi
+ else
+ as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
+ fi
+
+
+
+
###############################################################################
#
# Check dependencies for external and internal libraries.
@@ -64076,6 +64588,157 @@ fi
+ if test "$OPENJDK_TARGET_OS" = "solaris"; then
+ # Find the root of the Solaris Studio installation from the compiler path
+ SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
+ STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
+$as_echo_n "checking for libstlport.so.1... " >&6; }
+ if test -f "$STLPORT_LIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
+$as_echo "yes, $STLPORT_LIB" >&6; }
+
+ # Only process if variable expands to non-empty
+
+ if test "x$STLPORT_LIB" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$STLPORT_LIB"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ STLPORT_LIB="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$STLPORT_LIB"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ STLPORT_LIB="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$STLPORT_LIB"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ if test -d "$path"; then
+ STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
+ else
+ dir="`$DIRNAME "$path"`"
+ base="`$BASENAME "$path"`"
+ STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
+ fi
+ fi
+ fi
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
+$as_echo "no, not found at $STLPORT_LIB" >&6; }
+ as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
+ fi
+
+ fi
+
+
+
@@ -64094,144 +64757,6 @@ fi
###############################################################################
- # Check whether --enable-new-hotspot-build was given.
-if test "${enable_new_hotspot_build+set}" = set; then :
- enableval=$enable_new_hotspot_build;
-fi
-
-
- if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
- USE_NEW_HOTSPOT_BUILD=true
- else
- USE_NEW_HOTSPOT_BUILD=false
- fi
-
-
- case $HOTSPOT_DEBUG_LEVEL in
- product )
- VARIANT="OPT"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="false"
- ;;
- fastdebug )
- VARIANT="DBG"
- FASTDEBUG="true"
- DEBUG_CLASSFILES="true"
- ;;
- debug )
- VARIANT="DBG"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="true"
- ;;
- optimized )
- VARIANT="OPT"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="false"
- ;;
- esac
-
-
-
-
- if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
- MACOSX_UNIVERSAL="true"
- fi
-
-
-
- # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
- JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
-
- JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
- JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
- JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
- JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
- JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
- JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
- JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
-
- #####
- # Generate the legacy makefile targets for hotspot.
- HOTSPOT_TARGET=""
-
- if test "x$JVM_VARIANT_SERVER" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
- fi
-
- if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
- fi
-
- if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
- fi
-
- if test "x$JVM_VARIANT_ZERO" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
- fi
-
- if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
- fi
-
- if test "x$JVM_VARIANT_CORE" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
- fi
-
- HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
-
- # On Macosx universal binaries are produced, but they only contain
- # 64 bit intel. This invalidates control of which jvms are built
- # from configure, but only server is valid anyway. Fix this
- # when hotspot makefiles are rewritten.
- if test "x$MACOSX_UNIVERSAL" = xtrue; then
- HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
- fi
-
- HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
-
-
- # Control wether Hotspot runs Queens test after build.
- # Check whether --enable-hotspot-test-in-build was given.
-if test "${enable_hotspot_test_in_build+set}" = set; then :
- enableval=$enable_hotspot_test_in_build;
-else
- enable_hotspot_test_in_build=no
-fi
-
- if test "x$enable_hotspot_test_in_build" = "xyes"; then
- TEST_IN_BUILD=true
- else
- TEST_IN_BUILD=false
- fi
-
-
- if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
- if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
- fi
- fi
- if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
- fi
- fi
- if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
- as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
- fi
- fi
-
-
-
-
-
-
-
-
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
@@ -65977,7 +66502,9 @@ $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
JVM_FEATURES_TO_TEST=${!features_var_name}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
- INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
+ NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
+ STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
+ INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
if test "x$INVALID_FEATURES" != x; then
as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
fi
@@ -66697,7 +67224,6 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
- "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
"$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
"$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
"$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in
deleted file mode 100644
index 50d790876a6..00000000000
--- a/common/autoconf/hotspot-spec.gmk.in
+++ /dev/null
@@ -1,158 +0,0 @@
-#
-# Copyright (c) 2011, 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.
-#
-
-
-# Chaining of spec files
-HOTSPOT_SPEC:=$(dir $(SPEC))hotspot-spec.gmk
-override SPEC=$(HOTSPOT_SPEC)
-# Now include the base spec.gmk file
-include $(BASE_SPEC)
-
-# Additional legacy variables defined for Hotspot
-
-@SET_OPENJDK@
-@HOTSPOT_SET_WARNINGS_AS_ERRORS@
-
-# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
-@BUILD_HEADLESS@
-
-JVM_VARIANTS:=@JVM_VARIANTS_COMMA@
-
-JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
-JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
-JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
-JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
-JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
-JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
-JVM_VARIANT_CUSTOM:=@JVM_VARIANT_HOTSPOT@
-
-# Legacy setting: OPT or DBG
-VARIANT:=@VARIANT@
-# Legacy setting: true or false
-FASTDEBUG:=@FASTDEBUG@
-# Legacy setting: debugging the class files?
-DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
-
-ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
-
-# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
-# compiler that produces code that can be run on the build platform.
-HOSTCC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
-HOSTCXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
-
-####################################################
-#
-# Legacy Hotspot support
-
-# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here.
-@DEFINE_CROSS_COMPILE_ARCH@
-
-# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
-PLATFORM=$(OPENJDK_TARGET_OS)
-# 32 or 64 bit
-ARCH_DATA_MODEL=$(OPENJDK_TARGET_CPU_BITS)
-
-ALT_BOOTDIR=$(BOOT_JDK)
-# Can be /sparcv9 or /amd64 on Solaris
-ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR)
-# Yet another name for arch used for an extra subdir below the jvm lib.
-# Uses i386 and amd64, instead of x86 and x86_64.
-LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
-# Set the cpu architecture
-ARCH=$(OPENJDK_TARGET_CPU_ARCH)
-# Legacy setting for building for a 64 bit machine.
-# If yes then this expands to _LP64:=1
-@LP64@
-
-# Legacy settings for zero
-ZERO_ENDIANNESS=$(OPENJDK_TARGET_CPU_ENDIAN)
-ZERO_LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
-ZERO_ARCHDEF=@ZERO_ARCHDEF@
-ZERO_ARCHFLAG=@ZERO_ARCHFLAG@
-LIBFFI_CFLAGS=@LIBFFI_CFLAGS@
-LIBFFI_LIBS=@LIBFFI_LIBS@
-
-# Legacy settings for zeroshark
-LLVM_CFLAGS=@LLVM_CFLAGS@
-LLVM_LIBS=@LLVM_LIBS@
-LLVM_LDFLAGS=@LLVM_LDFLAGS@
-
-ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
-ALT_EXPORT_PATH=$(HOTSPOT_DIST)
-
-ifeq ($(HOTSPOT_TARGET_CPU), zero)
- CC_INTERP=true
-endif
-
-HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@
-# Control wether Hotspot runs Queens test after building
-TEST_IN_BUILD=@TEST_IN_BUILD@
-
-USE_CLANG := @USE_CLANG@
-
-# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
-# Hotspot has its own handling on the Windows path situation.
-CXX:=@CCACHE@ @ICECC@ @HOTSPOT_CXX@
-LD:=@HOTSPOT_LD@
-MT:=@HOTSPOT_MT@
-RC:=@HOTSPOT_RC@
-
-EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE) $(NO_NULL_POINTER_CHECK_FLAG) \
- $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
-EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE)
-EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
-
-USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
-
-# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
-# creation.
-ifeq ($(COPY_DEBUG_SYMBOLS), true)
- FULL_DEBUG_SYMBOLS=1
- # Ensure hotspot uses the objcopy that configure located
- ALT_OBJCOPY:=$(OBJCOPY)
-else
- FULL_DEBUG_SYMBOLS=0
-endif
-
-# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
-ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
- ZIP_DEBUGINFO_FILES:=1
-else
- ZIP_DEBUGINFO_FILES:=0
-endif
-
-DEBUG_BINARIES := @DEBUG_BINARIES@
-STRIP_POLICY := @STRIP_POLICY@
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
- # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
- # environment variables (in Windows path style).
- export INCLUDE:=@VS_INCLUDE@
- export LIB:=@VS_LIB@
-endif
-
-# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
-# This is needed to get the LOG setting to work properly.
-include $(SRC_ROOT)/make/common/MakeBase.gmk
diff --git a/common/autoconf/hotspot.m4 b/common/autoconf/hotspot.m4
index 4fffa86983d..18b6ec0aa21 100644
--- a/common/autoconf/hotspot.m4
+++ b/common/autoconf/hotspot.m4
@@ -93,7 +93,10 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
# Check that the selected variants are valid
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
- INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+ # Notice that the original variant failes on SLES 10 and 11
+ NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
+ STACK=${JVM_VARIANTS// /$'\n'}
+ INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
if test "x$INVALID_VARIANTS" != x; then
AC_MSG_NOTICE([Unknown variant(s) specified: $INVALID_VARIANTS])
AC_MSG_ERROR([The available JVM variants are: $VALID_JVM_VARIANTS])
@@ -101,7 +104,9 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
# All "special" variants share the same output directory ("server")
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
- INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
+ NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
+ STACK=${JVM_VARIANTS// /$'\n'}
+ INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.])
fi
@@ -293,146 +298,51 @@ AC_DEFUN_ONCE([HOTSPOT_VALIDATE_JVM_FEATURES],
features_var_name=JVM_FEATURES_$variant
JVM_FEATURES_TO_TEST=${!features_var_name}
AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
- INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
+ NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
+ STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
+ INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
if test "x$INVALID_FEATURES" != x; then
AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
fi
done
])
-###############################################################################
-# Support for old hotspot build. Remove once new hotspot build has proven
-# to work satisfactory.
+################################################################################
+# Check if gtest should be built
#
-AC_DEFUN_ONCE([HOTSPOT_SETUP_LEGACY_BUILD],
+AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
[
- AC_ARG_ENABLE(new-hotspot-build, [AS_HELP_STRING([--disable-new-hotspot-build],
- [disable the new hotspot build system (use the old) @<:@enabled@:>@])])
+ AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest],
+ [Disables building of the Hotspot unit tests])])
- if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
- USE_NEW_HOTSPOT_BUILD=true
- else
- USE_NEW_HOTSPOT_BUILD=false
- fi
- AC_SUBST(USE_NEW_HOTSPOT_BUILD)
-
- case $HOTSPOT_DEBUG_LEVEL in
- product )
- VARIANT="OPT"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="false"
- ;;
- fastdebug )
- VARIANT="DBG"
- FASTDEBUG="true"
- DEBUG_CLASSFILES="true"
- ;;
- debug )
- VARIANT="DBG"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="true"
- ;;
- optimized )
- VARIANT="OPT"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="false"
- ;;
- esac
- AC_SUBST(VARIANT)
- AC_SUBST(FASTDEBUG)
- AC_SUBST(DEBUG_CLASSFILES)
-
- if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
- MACOSX_UNIVERSAL="true"
- fi
-
- AC_SUBST(MACOSX_UNIVERSAL)
-
- # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
- JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
-
- JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
- JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
- JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
- JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
- JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
- JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
- JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
-
- #####
- # Generate the legacy makefile targets for hotspot.
- HOTSPOT_TARGET=""
-
- if test "x$JVM_VARIANT_SERVER" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
- fi
-
- if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
- fi
-
- if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
- fi
-
- if test "x$JVM_VARIANT_ZERO" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
- fi
-
- if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
- fi
-
- if test "x$JVM_VARIANT_CORE" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
- fi
-
- HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
-
- # On Macosx universal binaries are produced, but they only contain
- # 64 bit intel. This invalidates control of which jvms are built
- # from configure, but only server is valid anyway. Fix this
- # when hotspot makefiles are rewritten.
- if test "x$MACOSX_UNIVERSAL" = xtrue; then
- HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
- fi
-
- HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
- AC_SUBST(HOTSPOT_MAKE_ARGS)
-
- # Control wether Hotspot runs Queens test after build.
- AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
- [run the Queens test after Hotspot build @<:@disabled@:>@])],,
- [enable_hotspot_test_in_build=no])
- if test "x$enable_hotspot_test_in_build" = "xyes"; then
- TEST_IN_BUILD=true
+ if test -e "$HOTSPOT_TOPDIR/test/native"; then
+ GTEST_DIR_EXISTS="true"
else
- TEST_IN_BUILD=false
- fi
- AC_SUBST(TEST_IN_BUILD)
-
- if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
- if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
- fi
- fi
- if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
- fi
- fi
- if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
- AC_MSG_ERROR([You cannot build a custom JVM using the old hotspot build system.])
- fi
+ GTEST_DIR_EXISTS="false"
fi
- AC_SUBST(JVM_VARIANTS_COMMA)
- AC_SUBST(JVM_VARIANT_SERVER)
- AC_SUBST(JVM_VARIANT_CLIENT)
- AC_SUBST(JVM_VARIANT_MINIMAL1)
- AC_SUBST(JVM_VARIANT_HOTSPOT)
- AC_SUBST(JVM_VARIANT_ZERO)
- AC_SUBST(JVM_VARIANT_ZEROSHARK)
- AC_SUBST(JVM_VARIANT_CORE)
+ AC_MSG_CHECKING([if Hotspot gtest unit tests should be built])
+ if test "x$enable_hotspot_gtest" = "xyes"; then
+ if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
+ AC_MSG_RESULT([yes, forced])
+ BUILD_GTEST="true"
+ else
+ AC_MSG_ERROR([Cannot build gtest without the test source])
+ fi
+ elif test "x$enable_hotspot_gtest" = "xno"; then
+ AC_MSG_RESULT([no, forced])
+ BUILD_GTEST="false"
+ elif test "x$enable_hotspot_gtest" = "x"; then
+ if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
+ AC_MSG_RESULT([yes])
+ BUILD_GTEST="true"
+ else
+ AC_MSG_RESULT([no])
+ BUILD_GTEST="false"
+ fi
+ else
+ AC_MSG_ERROR([--enable-gtest must be either yes or no])
+ fi
+
+ AC_SUBST(BUILD_GTEST)
])
diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
index e34e4d927dd..076b6cfaa09 100644
--- a/common/autoconf/jdk-options.m4
+++ b/common/autoconf/jdk-options.m4
@@ -209,9 +209,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
if test "x$OPENJDK_TARGET_OS" = xaix ; then
INCLUDE_SA=false
fi
- if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
- INCLUDE_SA=false
- fi
AC_SUBST(INCLUDE_SA)
# Compress jars
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
index e1e91d678d6..4238a17fe82 100644
--- a/common/autoconf/libraries.m4
+++ b/common/autoconf/libraries.m4
@@ -95,6 +95,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
LIB_SETUP_LLVM
LIB_SETUP_BUNDLED_LIBS
LIB_SETUP_MISC_LIBS
+ LIB_SETUP_SOLARIS_STLPORT
])
################################################################################
@@ -189,3 +190,26 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
LIBZIP_CAN_USE_MMAP=true
AC_SUBST(LIBZIP_CAN_USE_MMAP)
])
+
+################################################################################
+# libstlport.so.1 is needed for running gtest on Solaris. Find it to
+# redistribute it in the test image.
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
+[
+ if test "$OPENJDK_TARGET_OS" = "solaris"; then
+ # Find the root of the Solaris Studio installation from the compiler path
+ SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
+ STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
+ AC_MSG_CHECKING([for libstlport.so.1])
+ if test -f "$STLPORT_LIB"; then
+ AC_MSG_RESULT([yes, $STLPORT_LIB])
+ BASIC_FIXUP_PATH([STLPORT_LIB])
+ else
+ AC_MSG_RESULT([no, not found at $STLPORT_LIB])
+ AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests])
+ fi
+ AC_SUBST(STLPORT_LIB)
+ fi
+])
+
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
index 2e99c452694..2fbac1d0dd3 100644
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -366,6 +366,23 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
fi
AC_SUBST(OPENJDK_$1_OS_EXPORT_DIR)
+ # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
+ # Macosx is osx and x86_64 is x64
+ if test "x$OPENJDK_$1_OS" = xmacosx; then
+ OPENJDK_$1_OS_BUNDLE="osx"
+ else
+ OPENJDK_$1_OS_BUNDLE="$OPENJDK_TARGET_OS"
+ fi
+ if test "x$OPENJDK_$1_CPU" = xx86_64; then
+ OPENJDK_$1_CPU_BUNDLE="x64"
+ else
+ OPENJDK_$1_CPU_BUNDLE="$OPENJDK_$1_CPU"
+ fi
+ OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}"
+ AC_SUBST(OPENJDK_$1_OS_BUNDLE)
+ AC_SUBST(OPENJDK_$1_CPU_BUNDLE)
+ AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM)
+
if test "x$OPENJDK_$1_CPU_BITS" = x64; then
A_LP64="LP64:="
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
index 467cc304b20..cace1439818 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -89,6 +89,10 @@ HOTSPOT_TARGET_CPU := @HOTSPOT_TARGET_CPU@
HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_TARGET_CPU_ARCH@
HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_TARGET_CPU_DEFINE@
+OPENJDK_TARGET_CPU_BUNDLE:=@OPENJDK_TARGET_CPU_BUNDLE@
+OPENJDK_TARGET_OS_BUNDLE:=@OPENJDK_TARGET_OS_BUNDLE@
+OPENJDK_TARGET_BUNDLE_PLATFORM:=@OPENJDK_TARGET_BUNDLE_PLATFORM@
+
# We are building on this build system.
# When not cross-compiling, it is the same as the target.
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
@@ -232,6 +236,9 @@ JVM_FEATURES_custom := @JVM_FEATURES_custom@
VALID_JVM_FEATURES := @VALID_JVM_FEATURES@
VALID_JVM_VARIANTS := @VALID_JVM_VARIANTS@
+# Control wether Hotspot builds gtest tests
+BUILD_GTEST := @BUILD_GTEST@
+
# Control use of precompiled header in hotspot libjvm build
USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
@@ -265,6 +272,7 @@ BUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools
HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
+BUNDLES_OUTPUTDIR=$(BUILD_OUTPUT)/bundles
TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
# This does not get overridden in a bootcycle build
@@ -629,6 +637,7 @@ ECHO:=@ECHO@
EGREP:=@EGREP@
FGREP:=@FGREP@
GREP:=@GREP@
+GZIP:=@GZIP@
HEAD:=@HEAD@
LS:=@LS@
LN:=@LN@
@@ -676,6 +685,9 @@ XCODEBUILD=@XCODEBUILD@
DTRACE := @DTRACE@
FIXPATH:=@FIXPATH@
+TAR_INCLUDE_PARAM:=@TAR_INCLUDE_PARAM@
+TAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@
+
# Build setup
ENABLE_JFR=@ENABLE_JFR@
ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
@@ -685,6 +697,7 @@ USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
MSVCR_DLL:=@MSVCR_DLL@
MSVCP_DLL:=@MSVCP_DLL@
+STLPORT_LIB:=@STLPORT_LIB@
####################################################
#
@@ -781,11 +794,46 @@ SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
# Interim image
INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image
+# Docs image
+DOCS_IMAGE_SUBDIR := docs
+DOCS_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR)
+
# Macosx bundles directory definitions
-JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents
-JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents
+JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle
+JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle
JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
+JDK_MACOSX_CONTENTS_SUBDIR=jdk-$(VERSION_NUMBER).jdk/Contents
+JRE_MACOSX_CONTENTS_SUBDIR=jre-$(VERSION_NUMBER).jre/Contents
+JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
+JRE_MACOSX_CONTENTS_DIR=$(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
+
+# Bundle names
+BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
+ifeq ($(DEBUG_LEVEL), fastdebug)
+ DEBUG_PART := -debug
+else ifneq ($(DEBUG_LEVEL), release)
+ DEBUG_PART := -$(DEBUG_LEVEL)
+endif
+JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).tar.gz
+JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).tar.gz
+JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
+JRE_SYMBOLS_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).zip
+else
+ DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_demo$(DEBUG_PART).tar.gz
+endif
+TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
+DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
+
+JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
+JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
+JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
+JRE_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_SYMBOLS_BUNDLE_NAME)
+DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DEMOS_BUNDLE_NAME)
+TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
+DOCS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
# This macro is called to allow inclusion of closed source counterparts.
# Unless overridden in closed sources, it expands to nothing.
diff --git a/common/bin/compare.sh b/common/bin/compare.sh
index db73426481d..0126b9c23ce 100644
--- a/common/bin/compare.sh
+++ b/common/bin/compare.sh
@@ -274,14 +274,19 @@ compare_file_types() {
$MKDIR -p $WORK_DIR
+ FILE_TYPES_FILTER="$SED \
+ -e 's/BuildID[^,]*//' \
+ -e 's/last modified: .*//' \
+ "
+
echo -n File types...
found=""
for f in `cd $OTHER_DIR && $FIND . ! -type d`
do
if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
- OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
- TF=`cd ${THIS_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
+ OF=$(cd ${OTHER_DIR} && $FILE -h $f | eval $FILE_TYPES_FILTER)
+ TF=$(cd ${THIS_DIR} && $FILE -h $f | eval $FILE_TYPES_FILTER)
if [ "$OF" != "$TF" ]
then
if [ "`echo $OF | $GREP -c 'Zip archive data'`" -gt 0 ] \
@@ -320,7 +325,7 @@ compare_general_files() {
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
! -name "jspawnhelper" ! -name "JavawsLauncher" ! -name "*.a" \
- ! -name "finish_installation" ! -name "Sparkle" \
+ ! -name "finish_installation" ! -name "Sparkle" ! -name "*.tar.gz" \
| $GREP -v "./bin/" | $SORT | $FILTER)
echo Other files with binary differences...
@@ -423,6 +428,10 @@ compare_zip_file() {
then
(cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
(cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
+ elif [ "$TYPE" = "gz" ]
+ then
+ (cd $THIS_UNZIPDIR && $GUNZIP -c $THIS_ZIP | $TAR xf -)
+ (cd $OTHER_UNZIPDIR && $GUNZIP -c $OTHER_ZIP | $TAR xf -)
else
(cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP)
(cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP)
@@ -526,10 +535,11 @@ compare_all_zip_files() {
OTHER_DIR=$2
WORK_DIR=$3
- ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER )
+ ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" -o -name "*.tar.gz" \
+ | $SORT | $FILTER )
if [ -n "$ZIPS" ]; then
- echo Zip files...
+ echo Zip/tar.gz files...
return_value=0
for f in $ZIPS; do
@@ -913,7 +923,7 @@ compare_bin_file() {
FULLDUMP_MSG=" "
DIFF_FULLDUMP=
if [[ "$KNOWN_FULLDUMP_DIFF $ACCEPTED_FULLDUMP_DIFF" = *"$BIN_FILE"* ]]; then
- FULLDUMP_MSG=" ! "
+ FULLDUMP_MSG=" ! "
fi
fi
fi
diff --git a/common/bin/idea.sh b/common/bin/idea.sh
index 911d309c070..2cd6f92bbb9 100644
--- a/common/bin/idea.sh
+++ b/common/bin/idea.sh
@@ -155,6 +155,14 @@ addBuildDir() {
printf "%s\n" "$mn" >> $IDEA_ANT
}
+JTREG_HOME=" "
+
+addJtregHome() {
+ DIR=`dirname $SPEC`
+ mn="`echo "$JTREG_HOME" | sed -e s@"\(.*\)####\(.*\)"@"\1$JT_HOME\2"@`"
+ printf "%s\n" "$mn" >> $IDEA_ANT
+}
+
### Generate ant.xml
rm -f $IDEA_ANT
@@ -162,6 +170,8 @@ while IFS= read -r line
do
if echo "$line" | egrep "^ .* /dev/null ; then
addModuleName
+ elif echo "$line" | egrep "^ .* /dev/null ; then
+ addJtregHome
elif echo "$line" | egrep "^ .* /dev/null ; then
addBuildDir
else
diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js
index 2b7164741b1..2d752fd1074 100644
--- a/common/conf/jib-profiles.js
+++ b/common/conf/jib-profiles.js
@@ -215,11 +215,11 @@ var getJibProfilesCommon = function (input) {
var common = {};
common.dependencies = ["boot_jdk", "gnumake", "jtreg"],
- common.default_make_targets = ["product-images", "test-image"],
+ common.default_make_targets = ["product-bundles", "test-bundles"],
common.default_make_targets_debug = common.default_make_targets;
common.default_make_targets_slowdebug = common.default_make_targets;
common.configure_args = ["--enable-jtreg-failure-handler"],
- common.configure_args_32bit = ["--with-target-bits=32", "--with-jvm-variants=client,server"],
+ common.configure_args_32bit = ["--with-target-bits=32"],
common.configure_args_debug = ["--enable-debug"],
common.configure_args_slowdebug = ["--with-debug-level=slowdebug"],
common.organization = "jpg.infra.builddeps"
@@ -245,7 +245,7 @@ var getJibProfilesProfiles = function (input, common) {
target_cpu: "x64",
dependencies: concat(common.dependencies, "devkit"),
configure_args: concat(common.configure_args, "--with-zlib=system"),
- default_make_targets: concat(common.default_make_targets, "docs-image")
+ default_make_targets: concat(common.default_make_targets, "docs-bundles")
},
"linux-x86": {
@@ -254,7 +254,7 @@ var getJibProfilesProfiles = function (input, common) {
build_cpu: "x64",
dependencies: concat(common.dependencies, "devkit"),
configure_args: concat(common.configure_args, common.configure_args_32bit,
- "--with-zlib=system"),
+ "--with-jvm-variants=minimal,client,server", "--with-zlib=system"),
default_make_targets: common.default_make_targets
},
@@ -295,7 +295,8 @@ var getJibProfilesProfiles = function (input, common) {
target_cpu: "x86",
build_cpu: "x64",
dependencies: concat(common.dependencies, "devkit", "freetype"),
- configure_args: concat(common.configure_args, common.configure_args_32bit),
+ configure_args: concat(common.configure_args,
+ "--with-jvm-variants=client,server", common.configure_args_32bit),
default_make_targets: common.default_make_targets
}
};
diff --git a/make/Bundles.gmk b/make/Bundles.gmk
new file mode 100644
index 00000000000..140f31afcf2
--- /dev/null
+++ b/make/Bundles.gmk
@@ -0,0 +1,300 @@
+#
+# 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.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+PRODUCT_TARGETS :=
+TEST_TARGETS :=
+DOCS_TARGETS :=
+
+# On Windows tar frequently complains that "file changed as we read it" for
+# some random source files. This seems to be cause by anti virus scanners and
+# is most likely safe to ignore. When it happens, tar returns '1'.
+ifeq ($(OPENJDK_BUILD_OS), windows)
+ TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
+endif
+
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, , Bundles-pre.gmk))
+################################################################################
+# BUNDLE : Name of bundle to create
+# FILES : Files in BASE_DIR to add to bundle
+# SPECIAL_INCLUDES : List of directories inside BASE_DIR to look for additional
+# files in. These files will not get proper dependency handling. Use when
+# files or directories may contain spaces.
+# BASE_DIR : Base directory for the root dir in the bundle.
+# SUBDIR : Optional name of root dir in bundle.
+SetupBundleFile = $(NamedParamsMacroTemplate)
+define SetupBundleFileBody
+
+ $1_RELATIVE_FILES := $$(patsubst $$($1_BASE_DIR)/%, ./%, $$($1_FILES))
+
+ ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
+ $1_TYPE := tar.gz
+ else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
+ $1_TYPE := zip
+ else
+ $$(error Unknown bundle type $$($1_BUNDLE_NAME))
+ endif
+
+ $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
+
+ $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
+ $$(eval $$(call ListPathsSafely, \
+ $1_RELATIVE_FILES, \
+ $(SUPPORT_OUTPUTDIR)/bundles/_$1_files))
+ $$(call MakeDir, $$(@D))
+ ifneq ($$($1_SPECIAL_INCLUDES), )
+ $$(foreach i, $$($1_SPECIAL_INCLUDES), \
+ ($(CD) $$($1_BASE_DIR) && $(FIND) ./$$i \
+ >> $(SUPPORT_OUTPUTDIR)/bundles/_$1_files ) ; )
+ endif
+ ifneq ($$($1_SUBDIR), )
+ ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO), tar.gz-true-false)
+ $(CD) $$($1_BASE_DIR) \
+ && ( $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \
+ --transform 's|^|$$($1_SUBDIR)/|' $(TAR_IGNORE_EXIT_VALUE) ) \
+ | $(GZIP) > $$@
+ else
+ # If a subdir has been specified, copy all files into a temporary
+ # location with this subdir before creating the tar file
+ $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
+ $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
+ ( $(CD) $$($1_BASE_DIR) \
+ && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \
+ $(TAR_IGNORE_EXIT_VALUE) ) \
+ | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )
+ # Unzip any zipped debuginfo files
+ ifeq ($$($1_UNZIP_DEBUGINFO), true)
+ for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
+ $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
+ done
+ endif
+ ifeq ($$($1_TYPE), tar.gz)
+ $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
+ ( $(TAR) cf - $$($1_SUBDIR) $(TAR_IGNORE_EXIT_VALUE) ) | $(GZIP) > $$@
+ else ifeq ($$($1_TYPE), zip)
+ $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIP) -qr $$@ .
+ endif
+ endif
+ else
+ ifeq ($$($1_TYPE), tar.gz)
+ $(CD) $$($1_BASE_DIR) \
+ && ( $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \
+ $(TAR_IGNORE_EXIT_VALUE) ) \
+ | $(GZIP) > $$@
+ else ifeq ($$($1_TYPE), zip)
+ $(CD) $$($1_BASE_DIR) \
+ && $(ZIP) -qr $$@ . -i@$(SUPPORT_OUTPUTDIR)/bundles/_$1_files
+ endif
+ endif
+
+ $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
+
+endef
+
+################################################################################
+
+# On Macosx, we bundle up the macosx specific images which already have the
+# correct base directories.
+ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
+ JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
+ JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
+ JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
+ JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
+ JDK_BUNDLE_SUBDIR :=
+ JRE_BUNDLE_SUBDIR :=
+else
+ JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
+ JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
+ JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
+ JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
+ ifneq ($(DEBUG_LEVEL), release)
+ JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
+ JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
+ endif
+endif
+
+################################################################################
+
+ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
+ $(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))
+
+ SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
+
+ ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR))
+
+ # Create special filter rules when dealing with unzipped .dSYM directories on
+ # macosx
+ ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(ZIP_DEBUGINFO_FILES), false)
+ JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
+ $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
+ endif
+ endif
+
+ JDK_BUNDLE_FILES := \
+ $(filter-out \
+ $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
+ $(JDK_EXTRA_EXCLUDES) \
+ $(SYMBOLS_EXCLUDE_PATTERN) \
+ $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \
+ , \
+ $(ALL_JDK_FILES) \
+ )
+ DEMOS_BUNDLE_FILES := \
+ $(filter-out \
+ $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
+ $(SYMBOLS_EXCLUDE_PATTERN) \
+ , \
+ $(filter \
+ $(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \
+ $(JDK_IMAGE_HOMEDIR)/release \
+ , \
+ $(ALL_JDK_FILES) \
+ ) \
+ )
+ JDK_SYMBOLS_BUNDLE_FILES := \
+ $(filter \
+ $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
+ $(SYMBOLS_EXCLUDE_PATTERN) \
+ , \
+ $(ALL_JDK_FILES) \
+ ) \
+ $(call CacheFind, $(SYMBOLS_IMAGE_DIR))
+
+ ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))
+
+ # Create special filter rules when dealing with unzipped .dSYM directories on
+ # macosx
+ ifeq ($(OPENJDK_TARGET_OS), macosx)
+ ifeq ($(ZIP_DEBUGINFO_FILES), false)
+ JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
+ $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
+ endif
+ endif
+
+ JRE_BUNDLE_FILES := $(filter-out \
+ $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
+ $(SYMBOLS_EXCLUDE_PATTERN), \
+ $(ALL_JRE_FILES))
+ JRE_SYMBOLS_BUNDLE_FILES := $(filter \
+ $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
+ $(SYMBOLS_EXCLUDE_PATTERN), \
+ $(ALL_JRE_FILES))
+
+ $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
+ BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
+ FILES := $(JDK_BUNDLE_FILES), \
+ SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
+ BASE_DIR := $(JDK_IMAGE_DIR), \
+ SUBDIR := $(JDK_BUNDLE_SUBDIR), \
+ ))
+
+ PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
+
+ $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
+ BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
+ FILES := $(JRE_BUNDLE_FILES), \
+ BASE_DIR := $(JRE_IMAGE_DIR), \
+ SUBDIR := $(JRE_BUNDLE_SUBDIR), \
+ ))
+
+ PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE)
+
+ $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
+ BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
+ FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
+ BASE_DIR := $(JDK_IMAGE_DIR), \
+ SUBDIR := $(JDK_BUNDLE_SUBDIR), \
+ UNZIP_DEBUGINFO := true, \
+ ))
+
+ PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
+
+ $(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \
+ BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \
+ FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \
+ BASE_DIR := $(JRE_IMAGE_DIR), \
+ SUBDIR := $(JRE_BUNDLE_SUBDIR), \
+ UNZIP_DEBUGINFO := true, \
+ ))
+
+ PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE)
+
+ $(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \
+ BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \
+ FILES := $(call DoubleDollar, $(DEMOS_BUNDLE_FILES)), \
+ BASE_DIR := $(JDK_IMAGE_DIR), \
+ SUBDIR := $(JDK_BUNDLE_SUBDIR), \
+ ))
+
+ PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE)
+endif
+
+################################################################################
+
+ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
+ TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
+
+ $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
+ BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
+ FILES := $(call DoubleDollar, $(TEST_BUNDLE_FILES)), \
+ BASE_DIR := $(TEST_IMAGE_DIR), \
+ ))
+
+ TEST_TARGETS += $(BUILD_TEST_BUNDLE)
+endif
+
+################################################################################
+
+ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
+ DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
+
+ $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
+ BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
+ FILES := $(DOCS_BUNDLE_FILES), \
+ BASE_DIR := $(DOCS_IMAGE_DIR), \
+ SUBDIR := docs, \
+ ))
+
+ DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
+endif
+
+################################################################################
+
+# Hook to include the corresponding custom file, if present.
+$(eval $(call IncludeCustomExtension, , Bundles.gmk))
+
+################################################################################
+
+product-bundles: $(PRODUCT_TARGETS)
+test-bundles: $(TEST_TARGETS)
+docs-bundles: $(DOCS_TARGETS)
+
+.PHONY: all default product-bundles test-bundles docs-bundles
diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk
index 394888c4970..40900ff91a9 100644
--- a/make/CreateJmods.gmk
+++ b/make/CreateJmods.gmk
@@ -69,21 +69,13 @@ endif
# Add dependencies on other jmod files. Only java.base needs access to other
# jmods.
ifeq ($(MODULE), java.base)
+ ALL_UPGRADEABLE_MODULES = $(call FindAllUpgradeableModules)
# When creating a BUILDJDK, we don't need to add hashes to java.base
ifneq ($(CREATING_BUILDJDK), true)
DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \
- $(filter-out java.base, $(call FindAllModules)))
+ $(filter-out java.base $(ALL_UPGRADEABLE_MODULES), $(call FindAllModules)))
- # TODO: find modules that directly and indirectly depend on upgradeable
- # modules
- EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \
- java.se.ee \
- jdk.rmic \
- jdk.xml.bind \
- jdk.xml.ws \
- #
-
- EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES))))
+ EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(ALL_UPGRADEABLE_MODULES))))
JMOD_FLAGS += --modulepath $(JMODS_DIR) \
--hash-modules '^(?!$(EXCLUDE_PATTERN))'
diff --git a/make/GensrcModuleInfo.gmk b/make/GensrcModuleInfo.gmk
index 2fbcdc6ab24..f3487b4339d 100644
--- a/make/GensrcModuleInfo.gmk
+++ b/make/GensrcModuleInfo.gmk
@@ -85,21 +85,41 @@ ifneq ($(MOD_FILES), )
MODS_REST := $(filter-out $(MODS_QUALIFIED_EXPORTS), $(MOD_FILE_CONTENTS))
# Filter the contents for modules that are actually being built
- MODULES_FILTER := $(addprefix %/, $(addsuffix ;, $(ALL_MODULES)))
- MODIFICATIONS := $(filter $(MODULES_FILTER), $(MODS_QUALIFIED_EXPORTS)) \
+ ALL_MODULES_FILTER := $(addprefix %/, $(addsuffix ;, $(ALL_MODULES)))
+ MODIFICATIONS := $(filter $(ALL_MODULES_FILTER), $(MODS_QUALIFIED_EXPORTS)) \
$(MODS_REST)
+ # Returns non empty if the package exists in the current module
+ # Param 1 - Name of package with dots
+ PackageExists = \
+ $(strip $(wildcard $(addsuffix $(subst .,/,/$(strip $1)), \
+ $(MODULE_CLASSES_DIRS) \
+ $(addsuffix /$(MODULE), $(IMPORT_MODULES_CLASSES)) \
+ )))
+
# Convert the modification lines into arguments for the modification tool.
# Filter out modifications for non existing to-modules.
$(foreach line, $(MODIFICATIONS), \
$(eval split_line := $(subst /,$(SPACE),$(line))) \
$(eval command := $(word 1, $(split_line))) \
- $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \
- $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \
- $(if $(to_module), \
- $(eval ARGS += -$(command) $(package)/$(to_module)) \
+ $(if $(filter $(command), exports), \
+ $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \
+ $(if $(call PackageExists, $(package)), \
+ $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \
+ $(if $(to_module), \
+ $(eval ARGS += -$(command) $(package)/$(to_module)) \
+ , \
+ $(eval ARGS += -$(command) $(package)) \
+ ) \
+ ) \
, \
- $(eval ARGS += -$(command) $(package)) \
+ $(if $(filter $(command), provides), \
+ $(eval provider := $(patsubst %;,%,$(word 2, $(split_line)))) \
+ $(eval class := $(patsubst %;,%,$(word 4, $(split_line)))) \
+ $(eval ARGS += -$(command) $(provider)/$(class)) \
+ , \
+ $(error A module-info.extra in $(MODULE) contains invalid command $(command)) \
+ ) \
) \
)
diff --git a/make/HotspotWrapper.gmk b/make/HotspotWrapper.gmk
deleted file mode 100644
index 663215525a3..00000000000
--- a/make/HotspotWrapper.gmk
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 2011, 2012, 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.
-#
-
-# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk)
-BASE_SPEC:=$(SPEC)
-# Assign to HOTSPOT_SPEC so that the variable HOTSPOT_SPEC can be
-# overridden when building the buildjdk.
-HOTSPOT_SPEC := $(dir $(SPEC))hotspot-spec.gmk
-include $(HOTSPOT_SPEC)
-include MakeBase.gmk
-
-# Inclusion of this pseudo-target will cause make to execute this file
-# serially, regardless of -j. Recursively called makefiles will not be
-# affected, however. This is required for correct dependency management.
-.NOTPARALLEL:
-
-default: all
-
-# Get all files in src, make or agent subdirs in hotspot directory and
-# filter out .hg. This skips the test directory.
-HOTSPOT_FILES := $(shell $(FIND) -L \
- $(HOTSPOT_TOPDIR)/src $(HOTSPOT_TOPDIR)/make \
- -name ".hg" -prune -o -print)
-
-# The old build creates hotspot output dir before calling hotspot and
-# not doing it breaks builds on msys.
-$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
- @$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
- ($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(HOTSPOT_MAKE_ARGS) \
- LOG_LEVEL=$(LOG_LEVEL) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
- $(TOUCH) $@
-
-hotspot: $(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp
-
-all: hotspot
-
-.PHONY: default all hotspot
diff --git a/make/Images.gmk b/make/Images.gmk
index 564f2b27ddb..92adf3013db 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -43,8 +43,9 @@ ALL_MODULES := $(call FindAllModules)
$(eval $(call ReadImportMetaData))
-JRE_MODULES += $(filter-out $(MODULES_FILTER), $(BOOT_MODULES) $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
-JDK_MODULES += $(filter-out $(MODULES_FILTER), $(ALL_MODULES))
+JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
+ $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
+JDK_MODULES += $(ALL_MODULES)
# Compact builds have additional modules
COMPACT1_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk
index d1e85b4b746..d27caaf85f1 100644
--- a/make/Javadoc.gmk
+++ b/make/Javadoc.gmk
@@ -44,7 +44,7 @@ include NON_CORE_PKGS.gmk
# Definitions for directories
#
-DOCSDIR := $(IMAGES_OUTPUTDIR)/docs
+DOCSDIR := $(DOCS_IMAGE_DIR)
DOCSTMPDIR = $(SUPPORT_OUTPUTDIR)/docs
HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
@@ -1437,7 +1437,6 @@ $(DYNALINKAPI_OPTIONS_FILE):
$(call OptionPair,-windowtitle,$(DYNALINKAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(DYNALINKAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(DYNALINKAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
- $(call OptionTrip,-group,$(DYNALINKAPI_GROUPNAME),$(DYNALINKAPI_REGEXP)); \
$(call OptionTrip,-linkoffline,$(DYNALINKAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
) >> $@
@@ -1634,9 +1633,7 @@ JLINK_PLUGIN_DOCTITLE := JLink Plugin API - EXPERIMENTAL
JLINK_PLUGIN_WINDOWTITLE := JLink Plugin API - EXPERIMENTAL
JLINK_PLUGIN_HEADER := JLink Plugin API - EXPERIMENTAL
JLINK_PLUGIN_BOTTOM := $(call CommonBottom,$(JLINK_PLUGIN_FIRST_COPYRIGHT_YEAR))
-JLINK_PLUGIN_PKGS = jdk.tools.jlink \
- jdk.tools.jlink.builder \
- jdk.tools.jlink.plugin
+JLINK_PLUGIN_PKGS = jdk.tools.jlink.plugin
JLINK_PLUGIN_INDEX_HTML = $(JLINK_PLUGIN_DOCDIR)/index.html
JLINK_PLUGIN_OPTIONS_FILE = $(DOCSTMPDIR)/jlinkplugins.options
diff --git a/make/Jprt.gmk b/make/Jprt.gmk
index e82b84d5e11..09d6dc7ef7b 100644
--- a/make/Jprt.gmk
+++ b/make/Jprt.gmk
@@ -32,14 +32,6 @@ ifneq ($(CYGPATH), )
ifdef JPRT_ARCHIVE_BUNDLE
override JPRT_ARCHIVE_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_BUNDLE))
endif
- ifdef JPRT_ARCHIVE_INSTALL_BUNDLE
- override JPRT_ARCHIVE_INSTALL_BUNDLE := \
- $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE))
- endif
- ifdef JPRT_ARCHIVE_MODULES_BUNDLE
- override JPRT_ARCHIVE_MODULES_BUNDLE := \
- $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_MODULES_BUNDLE))
- endif
ifdef JPRT_ARCHIVE_TEST_BUNDLE
override JPRT_ARCHIVE_TEST_BUNDLE := \
$(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
@@ -55,12 +47,6 @@ endif
ifndef JPRT_ARCHIVE_BUNDLE
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
endif
-ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
- JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
-endif
-ifndef JPRT_ARCHIVE_MODULES_BUNDLE
- JPRT_ARCHIVE_MODULES_BUNDLE=/tmp/jprt_bundles/modules.zip
-endif
ifndef JPRT_ARCHIVE_TEST_BUNDLE
JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
endif
@@ -72,94 +58,51 @@ ifeq ($(SKIP_BOOT_CYCLE), false)
jprt_bundle: bootcycle-images
endif
-# This target must be called in the context of a SPEC file
-jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_TEST_BUNDLE) \
- $(JPRT_ARCHIVE_MODULES_BUNDLE)
+################################################################################
+# JPRT specific bundling targets
+JPRT_TARGET ?= $(DEFAULT_MAKE_TARGET)
+ifeq ($(JPRT_TARGET), $(DEFAULT_MAKE_TARGET))
+ jprt_bundle: $(DEFAULT_MAKE_TARGET) $(JPRT_ARCHIVE_BUNDLE) \
+ $(JPRT_ARCHIVE_TEST_BUNDLE)
-ifeq ($(GCOV_ENABLED), true)
- jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
-endif
+ SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
+ SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
-# This target must be called in the context of a SPEC file
-$(JPRT_ARCHIVE_BUNDLE): bundles
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
+ # This target must be called in the context of a SPEC file
+ $(JPRT_ARCHIVE_BUNDLE): product-images
+ $(call MakeDir, $(@D))
+ $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
-$(JPRT_ARCHIVE_MODULES_BUNDLE): bundles
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(CP) $(BUILD_OUTPUT)/bundles/modules.zip $@
+ $(JPRT_ARCHIVE_TEST_BUNDLE): test-image
+ $(call MakeDir, $(@D))
+ $(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
-$(JPRT_ARCHIVE_TEST_BUNDLE): bundles
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(CP) $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip $@
+ ##############################################################################
+ # Optional symbols bundle
+ ifeq ($(GCOV_ENABLED), true)
+ jprt_bundle: $(JPRT_ARCHIVE_SYMBOLS_BUNDLE)
+ zip-bundles: $(SYMBOLS_ZIP_BUNDLE)
-$(JPRT_ARCHIVE_SYMBOLS_BUNDLE): bundles
- $(MKDIR) -p $(@D)
- $(RM) $@
- $(CP) $(BUILD_OUTPUT)/bundles/$(SYMBOLS_IMAGE_SUBDIR).zip $@
+ $(JPRT_ARCHIVE_SYMBOLS_BUNDLE): product-images
+ $(call MakeDir, $(@D))
+ $(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r $@ .
-SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
-SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
-SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
-SRC_JDK_MACOSX_BUNDLE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
-SRC_JRE_MACOSX_BUNDLE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
+ endif
+
+ ##############################################################################
-# Bundle up the images
-JPRT_TARGET ?= default
-ifeq ($(JPRT_TARGET), default)
- bundles: $(JPRT_TARGET)
- @$(call TargetEnter)
- $(MKDIR) -p $(BUILD_OUTPUT)/bundles
- $(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
- $(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
- $(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip .
- $(CD) $(IMAGES_OUTPUTDIR)/jmods && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/modules.zip .
- if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
- $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r \
- $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
- fi
- if [ -d $(SYMBOLS_IMAGE_DIR) ] ; then \
- $(CD) $(SYMBOLS_IMAGE_DIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(SYMBOLS_IMAGE_SUBDIR).zip . ; \
- fi
- @$(call TargetExit)
else
- # Just fake the bundles
- bundles: $(JPRT_TARGET)
+ # Just fake the main bundle to satisfy JPRT
+ jprt_bundle: $(JPRT_TARGET)
@$(call TargetEnter)
$(MKDIR) -p $(BUILD_OUTPUT)/bundles
- $(CD) $(TOPDIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip README
- $(CD) $(TOPDIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip README
- $(CD) $(TOPDIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip README
- $(CD) $(TOPDIR) && $(ZIP) -y -q -r \
- $(BUILD_OUTPUT)/bundles/modules.zip README
+ $(CD) $(TOPDIR) && $(TAR) cf - README | $(GZIP) > \
+ $(JPRT_ARCHIVE_BUNDLE)
@$(call TargetExit)
endif
-# Copy images to one unified location regardless of platform etc.
-final-images: $(JPRT_TARGET)
- @$(call TargetEnter)
- $(RM) -r $(BUILD_OUTPUT)/final-images
- $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)
- $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
- $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
- $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
- ifeq ($(OPENJDK_TARGET_OS),macosx)
- $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)
- $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)
- $(CP) -R -P $(SRC_JDK_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_MACOSX_BUNDLE_SUBDIR)/
- $(CP) -R -P $(SRC_JRE_MACOSX_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_MACOSX_BUNDLE_SUBDIR)/
- endif
- @$(call TargetExit)
+ALL_TARGETS += jprt_bundle
-ALL_TARGETS += jprt_bundle bundles final-images
+################################################################################
+
+$(eval $(call IncludeCustomExtension, , Jprt.gmk))
diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk
index ea8913eded5..f860e5e074a 100644
--- a/make/MacBundles.gmk
+++ b/make/MacBundles.gmk
@@ -34,7 +34,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
bundles: jre-bundle jdk-bundle
- # JDK_MACOSX_BUNDLE_DIR and JRE_MACOSX_BUNDLE_DIR are defined in SPEC.
+ # JDK_MACOSX_CONTENTS_DIR and JRE_MACOSX_CONTENTS_DIR are defined in SPEC.
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/data/bundle
@@ -52,27 +52,27 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
JDK_FILE_LIST := $(shell $(FIND) $(JDK_IMAGE_DIR))
JRE_FILE_LIST := $(shell $(FIND) $(JRE_IMAGE_DIR))
- JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_BUNDLE_DIR)/Home/,$(JDK_FILE_LIST))
- JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_BUNDLE_DIR)/Home/,$(JRE_FILE_LIST))
+ JDK_TARGET_LIST := $(subst $(JDK_IMAGE_DIR)/,$(JDK_MACOSX_CONTENTS_DIR)/Home/,$(JDK_FILE_LIST))
+ JRE_TARGET_LIST := $(subst $(JRE_IMAGE_DIR)/,$(JRE_MACOSX_CONTENTS_DIR)/Home/,$(JRE_FILE_LIST))
# Copy empty directories (jre/lib/applet).
- $(JDK_MACOSX_BUNDLE_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
+ $(JDK_MACOSX_CONTENTS_DIR)/Home/%: $(JDK_IMAGE_DIR)/%
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
$(MKDIR) -p $(@D)
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
- $(JRE_MACOSX_BUNDLE_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
+ $(JRE_MACOSX_CONTENTS_DIR)/Home/%: $(JRE_IMAGE_DIR)/%
$(call LogInfo, Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@))
$(MKDIR) -p $(@D)
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) -f -R -P '$<' '$@'; fi
- $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
+ $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
$(call LogInfo, Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@))
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s ../Home/lib/jli/libjli.dylib $@
- $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib:
+ $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
$(call LogInfo, Creating link $(patsubst $(OUTPUT_ROOT)/%,%,$@))
$(MKDIR) -p $(@D)
$(RM) $@
@@ -80,7 +80,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
- OUTPUT_FILE := $(JDK_MACOSX_BUNDLE_DIR)/Info.plist, \
+ OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
@@ID@@ => $(BUNDLE_ID).jdk ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@ -92,7 +92,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
- OUTPUT_FILE := $(JRE_MACOSX_BUNDLE_DIR)/Info.plist, \
+ OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
@@ID@@ => $(BUNDLE_ID).jre ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@ -102,13 +102,13 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
))
- jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \
+ jdk-bundle: $(JDK_TARGET_LIST) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
$(BUILD_JDK_PLIST)
- $(SETFILE) -a B $(dir $(JDK_MACOSX_BUNDLE_DIR))
+ $(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
- jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_BUNDLE_DIR)/MacOS/libjli.dylib \
+ jre-bundle: $(JRE_TARGET_LIST) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
$(BUILD_JRE_PLIST)
- $(SETFILE) -a B $(dir $(JRE_MACOSX_BUNDLE_DIR))
+ $(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
else # Not macosx
diff --git a/make/Main.gmk b/make/Main.gmk
index b1700f367ea..cbde81f552c 100644
--- a/make/Main.gmk
+++ b/make/Main.gmk
@@ -228,16 +228,12 @@ ALL_TARGETS += $(LAUNCHER_TARGETS)
# Build hotspot target
ifeq ($(BUILD_HOTSPOT),true)
- hotspot:
- ifeq ($(USE_NEW_HOTSPOT_BUILD), true)
- +($(CD) $(HOTSPOT_TOPDIR)/makefiles && $(MAKE) $(MAKE_ARGS) -f BuildHotspot.gmk)
- else
- +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
- endif
+hotspot:
+ +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildHotspot.gmk)
endif
hotspot-ide-project:
- +($(CD) $(HOTSPOT_TOPDIR)/makefiles && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
+ +($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ide/CreateVSProject.gmk)
ALL_TARGETS += hotspot hotspot-ide-project
@@ -306,9 +302,13 @@ $(SUPPORT_OUTPUTDIR)/source_tips: FRC
BOOTCYCLE_TARGET := product-images
bootcycle-images:
- @$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
- +$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
- JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
+ ifneq ($(COMPILE_TYPE), cross)
+ $(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
+ +$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
+ JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
+ else
+ $(call LogWarn, Boot cycle build disabled when cross compiling)
+ endif
zip-security:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
@@ -402,6 +402,11 @@ test-image-jdk-jtreg-native:
+($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
test-image-jdk-jtreg-native)
+ifeq ($(BUILD_GTEST), true)
+ test-image-hotspot-gtest:
+ +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
+endif
+
build-test-lib:
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
@@ -425,32 +430,49 @@ endif
ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
- test-failure-handler test-image-failure-handler
+ test-failure-handler test-image-failure-handler test-image-hotspot-gtest
################################################################################
# Run tests
# Run tests specified by $(TEST), or the default test set.
test:
- $(call RunTests, $(TEST))
+ $(call RunTests, $(TEST), $(JDK_IMAGE_DIR))
test-hotspot-jtreg:
- $(call RunTests, "hotspot_all")
+ $(call RunTests, "hotspot_all", $(JDK_IMAGE_DIR))
test-hotspot-jtreg-native:
- $(call RunTests, "hotspot_native_sanity")
+ $(call RunTests, "hotspot_native_sanity", $(JDK_IMAGE_DIR))
test-hotspot-internal:
- $(call RunTests, "hotspot_internal")
+ $(call RunTests, "hotspot_internal", $(JDK_OUTPUTDIR))
+
+test-hotspot-gtest:
+ $(call RunTests, "hotspot_gtest", $(JDK_OUTPUTDIR))
test-jdk-jtreg-native:
- $(call RunTests, "jdk_native_sanity")
+ $(call RunTests, "jdk_native_sanity", $(JDK_IMAGE_DIR))
test-make:
($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \
- test-hotspot-internal test-jdk-jtreg-native test-make
+ test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make
+
+################################################################################
+# Bundles
+
+product-bundles:
+ +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
+
+test-bundles:
+ +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles)
+
+docs-bundles:
+ +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
+
+ALL_TARGETS += product-bundles test-bundles docs-bundles
################################################################################
# Install targets
@@ -578,7 +600,8 @@ else
# When creating a BUILDJDK, we don't need to add hashes to java.base, thus
# we don't need to depend on all other jmods
ifneq ($(CREATING_BUILDJDK), true)
- java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS))
+ java.base-jmod: $(filter-out java.base-jmod \
+ $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS))
endif
# Declare dependencies from -jmod to all other module targets
@@ -669,12 +692,22 @@ else
test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
+ test-image-hotspot-gtest: hotspot
+
test-hotspot-internal: exploded-image
test-hotspot-jtreg: jimages test-image
+ test-hotspot-gtest: exploded-image test-image-hotspot-gtest
+
install: product-images
+ product-bundles: product-images
+
+ test-bundles: test-image
+
+ docs-bundles: docs-image
+
generate-summary: jmods
endif
@@ -753,14 +786,18 @@ docs-image: docs-javadoc docs-jvmtidoc
# This target builds the test image
test-image: prepare-test-image test-image-hotspot-jtreg-native \
- test-image-jdk-jtreg-native test-image-failure-handler
+ test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest
-# all-images is the top-most target, it builds all our deliverables ("images").
+# all-images builds all our deliverables as images.
all-images: product-images test-image docs-image
+# all-bundles packages all our deliverables as tar.gz bundles.
+all-bundles: product-bundles test-bundles docs-bundles
+
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
- create-buildjdk mac-bundles product-images docs-image test-image all-images
+ create-buildjdk mac-bundles product-images docs-image test-image all-images \
+ all-bundles
################################################################################
@@ -771,9 +808,10 @@ default: $(DEFAULT_MAKE_TARGET)
jdk: exploded-image
images: product-images
docs: docs-image
+bundles: all-bundles
all: all-images
-ALL_TARGETS += default jdk images docs all
+ALL_TARGETS += default jdk images docs bundles all
################################################################################
################################################################################
diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk
index d09331a0962..7683cfeb2af 100644
--- a/make/MainSupport.gmk
+++ b/make/MainSupport.gmk
@@ -30,10 +30,10 @@
ifndef _MAINSUPPORT_GMK
_MAINSUPPORT_GMK := 1
-# Run the tests specified by $1.
+# Run the tests specified by $1, with PRODUCT_HOME specified by $2
define RunTests
($(CD) $(SRC_ROOT)/test && $(MAKE) $(MAKE_ARGS) -j1 -k MAKEFLAGS= \
- JT_HOME=$(JT_HOME) PRODUCT_HOME=$(JDK_IMAGE_DIR) \
+ JT_HOME=$(JT_HOME) PRODUCT_HOME=$(strip $2) \
TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) \
ALT_OUTPUTDIR=$(OUTPUT_ROOT) TEST_JOBS=$(TEST_JOBS) \
JOBS=$(JOBS) $1) || true
diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
index 1a33d69f3bb..3665297d036 100644
--- a/make/common/MakeBase.gmk
+++ b/make/common/MakeBase.gmk
@@ -145,7 +145,7 @@ ifeq ($(HAS_FILE_FUNCTION), true)
$$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
endef
-else # HAS_FILE_FUNCTION
+else # HAS_FILE_FUNCTION = false
$(eval compress_paths = \
$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl)))
@@ -172,8 +172,8 @@ else # HAS_FILE_FUNCTION
# Param 2 - File to print to
# Param 3 - Set to true to append to file instead of overwriting
define ListPathsSafely
- ifneq (,$$(word 10001,$$($1)))
- $$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
+ ifneq (,$$(word 30001,$$($$(strip $1))))
+ $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
endif
$$(call MakeDir, $$(dir $2))
ifneq ($$(strip $3), true)
@@ -229,6 +229,106 @@ else # HAS_FILE_FUNCTION
$$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
$$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
$$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
endef
endif # HAS_FILE_FUNCTION
@@ -420,8 +520,12 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx)
# set. Some files get their write permissions removed after being copied to the
# output dir. When these are copied again to images, xattr would fail. By only clearing
# attributes when they are present, failing on this is avoided.
+ #
+ # If copying a soft link to a directory, need to delete the target first to avoid
+ # weird errors.
define install-file
$(MKDIR) -p '$(@D)'
+ $(RM) '$@'
$(CP) -fRP '$<' '$@'
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
endef
diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk
index ba1f82e5d5b..90469d073fd 100644
--- a/make/common/Modules.gmk
+++ b/make/common/Modules.gmk
@@ -72,7 +72,6 @@ BOOT_MODULES += \
# to be deprivileged
BOOT_MODULES += \
- java.scripting \
java.sql.rowset \
java.smartcardio \
jdk.naming.rmi \
@@ -87,6 +86,10 @@ UPGRADEABLE_MODULES += \
java.xml.ws \
#
+# Modules explicitly declared as not being upgradeable even though they require
+# an upgradeable module.
+NON_UPGRADEABLE_MODULES +=
+
AGGREGATOR_MODULES += \
java.compact1 \
java.compact2 \
@@ -102,6 +105,7 @@ PLATFORM_MODULES += \
PLATFORM_MODULES += \
java.compiler \
+ java.scripting \
jdk.accessibility \
jdk.charsets \
jdk.crypto.ec \
@@ -245,6 +249,19 @@ FindTransitiveDepsForModule = \
$(foreach n, $(call FindDepsForModule, $m), \
$(call FindDepsForModule, $n))))
+# Upgradeable modules are those that are either defined as upgradeable or that
+# require an upradeable module.
+FindAllUpgradeableModules = \
+ $(filter-out $(MODULES_FILTER) $(NON_UPGRADEABLE_MODULES), \
+ $(sort $(UPGRADEABLE_MODULES) $(foreach m, \
+ $(filter-out $(UPGRADEABLE_MODULES), $(call FindAllModules)), \
+ $(if $(filter $(UPGRADEABLE_MODULES), \
+ $(call FindTransitiveDepsForModule, $m)), \
+ $m \
+ ) \
+ )) \
+ )
+
################################################################################
# Param 1 - Name of module
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index db09eb5bbf3..cb2f96e0ddf 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -372,6 +372,9 @@ endef
# toolchain when compiling C++ code
# STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it
# DEBUG_SYMBOLS Set to false to disable generation of debug symbols
+# COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
+# ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol
+# zipping
# CFLAGS_DEBUG_SYMBOLS Overrides the default cflags for enabling debug symbols
# CXXFLAGS_DEBUG_SYMBOLS Overrides the default cxxflags for enabling debug symbols
# STRIPFLAGS Optionally change the flags given to the strip command
@@ -814,7 +817,15 @@ define SetupNativeCompilationBody
# Need to make sure TARGET is first on list
$1 := $$($1_TARGET)
- ifeq ($(COPY_DEBUG_SYMBOLS), true)
+ ifneq ($$($1_COPY_DEBUG_SYMBOLS), false)
+ $1_COPY_DEBUG_SYMBOLS := $(COPY_DEBUG_SYMBOLS)
+ endif
+
+ ifneq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
+ $1_ZIP_EXTERNAL_DEBUG_SYMBOLS := $(ZIP_EXTERNAL_DEBUG_SYMBOLS)
+ endif
+
+ ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
ifneq ($$($1_DEBUG_SYMBOLS), false)
# Only copy debug symbols for dynamic libraries and programs.
ifeq ($$($1_STATIC_LIBRARY), )
@@ -861,7 +872,7 @@ define SetupNativeCompilationBody
$$($1_TARGET): $$($1_DEBUGINFO_FILES)
$$($1_DEBUGINFO_FILES): $$($1_ALL_OBJS)
- ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
+ ifeq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
$1_DEBUGINFO_ZIP := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).diz
$1 += $$(subst $$($1_OBJECT_DIR),$$($1_OUTPUT_DIR),$$($1_DEBUGINFO_ZIP))
diff --git a/make/idea/idea.gmk b/make/idea/idea.gmk
index 329c01cd5ea..299ffe805bc 100644
--- a/make/idea/idea.gmk
+++ b/make/idea/idea.gmk
@@ -35,5 +35,6 @@ else #with SPEC
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
$(ECHO) "CYGPATH=\"$(CYGPATH)\"" >> $(OUT)
$(ECHO) "SPEC=\"$(SPEC)\"" >> $(OUT)
+ $(ECHO) "JT_HOME=\"$(JT_HOME)\"" >> $(OUT)
endif
diff --git a/make/idea/template/ant.xml b/make/idea/template/ant.xml
index 6e72e478cbc..f5274deb5bb 100644
--- a/make/idea/template/ant.xml
+++ b/make/idea/template/ant.xml
@@ -5,9 +5,8 @@
-
+
-
diff --git a/make/idea/template/build.xml b/make/idea/template/build.xml
index ed62f296726..b10490f77f1 100644
--- a/make/idea/template/build.xml
+++ b/make/idea/template/build.xml
@@ -16,6 +16,10 @@
+
+
+
+
@@ -29,26 +33,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/make/idea/template/src/idea/JdkIdeaAntLogger.java b/make/idea/template/src/idea/JdkIdeaAntLogger.java
index 9913499e7a0..22d42a93805 100644
--- a/make/idea/template/src/idea/JdkIdeaAntLogger.java
+++ b/make/idea/template/src/idea/JdkIdeaAntLogger.java
@@ -99,7 +99,9 @@ public final class JdkIdeaAntLogger extends DefaultLogger {
/** jtreg test failure */
JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "),
/** jtreg test error */
- JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: ");
+ JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: "),
+ /** jtreg report */
+ JTREG_TEST_REPORT(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Report written");
StringBinaryPredicate sbp;
int priority;
@@ -132,7 +134,7 @@ public final class JdkIdeaAntLogger extends DefaultLogger {
MAKE("exec", MessageKind.MAKE_ERROR, MessageKind.MAKE_WARNING, MessageKind.MAKE_NOTE,
MessageKind.MAKE_OTHER, MessageKind.JAVAC_CRASH),
/** jtreg task - invoked during test execution */
- JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR),
+ JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR, MessageKind.JTREG_TEST_REPORT),
/** initial synthetic task when the logger is created */
ROOT("") {
@Override
diff --git a/make/idea/template/workspace.xml b/make/idea/template/workspace.xml
index 2423c3d41fb..e6377dd53a2 100644
--- a/make/idea/template/workspace.xml
+++ b/make/idea/template/workspace.xml
@@ -8,6 +8,14 @@
+
+
+
+
+
+
+
+
diff --git a/make/jprt.properties b/make/jprt.properties
index 40a75b1140f..93ccd1eb560 100644
--- a/make/jprt.properties
+++ b/make/jprt.properties
@@ -194,14 +194,15 @@ jprt.build.configure.args= \
my.build.flavors.default=fastdebug,product
# Standard list of jprt build targets for this source tree
-my.build.targets.default= \
- solaris_sparcv9_5.11-{product|fastdebug}, \
- solaris_x64_5.11-{product|fastdebug}, \
- linux_i586_3.8-{product|fastdebug}, \
- linux_x64_3.8-{product|fastdebug}, \
- macosx_x64_10.9-{product|fastdebug}, \
- windows_i586_6.3-{product|fastdebug}, \
- windows_x64_6.3-{product|fastdebug}
+my.build.targets.default= \
+ solaris_sparcv9_5.11-{product|fastdebug}, \
+ solaris_x64_5.11-{product|fastdebug}, \
+ linux_i586_3.8-{product|fastdebug}, \
+ linux_x64_3.8-{product|fastdebug}, \
+ macosx_x64_10.9-{product|fastdebug}, \
+ windows_i586_6.3-{product|fastdebug}, \
+ windows_x64_6.3-{product|fastdebug}, \
+ ${my.additional.build.targets.default}
# Test target list (no fastdebug & limited c2 testing)
my.test.target.set= \
@@ -438,6 +439,16 @@ my.make.rule.test.targets.hotspot.basicvmtests= \
windows_i586_6.3-*-default-hotspot_basicvmtest, \
windows_x64_6.3-*-default-hotspot_basicvmtest
+my.make.rule.test.targets.hotspot.gtest= \
+ linux_i586_3.8-*-default-hotspot_gtest, \
+ linux_x64_3.8-*-default-hotspot_gtest, \
+ macosx_x64_10.9-*-default-hotspot_gtest, \
+ solaris_sparcv9_5.11-*-default-hotspot_gtest, \
+ solaris_x64_5.11-*-default-hotspot_gtest, \
+ windows_i586_6.3-*-default-hotspot_gtest, \
+ windows_x64_6.3-*-default-hotspot_gtest, \
+ ${my.additional.make.rule.test.targets.hotspot.gtest}
+
my.make.rule.test.targets.hotspot.reg.group= \
solaris_sparcv9_5.11-fastdebug-c2-GROUP, \
solaris_x64_5.11-fastdebug-c2-GROUP, \
@@ -465,6 +476,7 @@ my.make.rule.test.targets.hotspot.reg= \
# Other Makefile based Hotspot tests
my.make.rule.test.targets.hotspot.other= \
${my.make.rule.test.targets.hotspot.basicvmtests}, \
+ ${my.make.rule.test.targets.hotspot.gtest}, \
${my.additional.make.rule.test.targets.hotspot.other}
# All the makefile based tests to run
@@ -474,7 +486,9 @@ my.make.rule.test.targets.hotspot= \
# Install the test bundle for the testset hotspot jtreg tests
# (but not for the other Makefile based tests)
-my.jprt.test.bundle.targets.hotspot=${my.make.rule.test.targets.hotspot.reg}
+my.jprt.test.bundle.targets.hotspot= \
+ ${my.make.rule.test.targets.hotspot.reg}, \
+ ${my.make.rule.test.targets.hotspot.gtest}
# Native jdk and hotspot test targets (testset=nativesanity)
my.make.rule.test.targets.nativesanity= \
diff --git a/test/fmw/gtest/CHANGES b/test/fmw/gtest/CHANGES
new file mode 100644
index 00000000000..05521324212
--- /dev/null
+++ b/test/fmw/gtest/CHANGES
@@ -0,0 +1,157 @@
+Changes for 1.7.0:
+
+* New feature: death tests are supported on OpenBSD and in iOS
+ simulator now.
+* New feature: Google Test now implements a protocol to allow
+ a test runner to detect that a test program has exited
+ prematurely and report it as a failure (before it would be
+ falsely reported as a success if the exit code is 0).
+* New feature: Test::RecordProperty() can now be used outside of the
+ lifespan of a test method, in which case it will be attributed to
+ the current test case or the test program in the XML report.
+* New feature (potentially breaking): --gtest_list_tests now prints
+ the type parameters and value parameters for each test.
+* Improvement: char pointers and char arrays are now escaped properly
+ in failure messages.
+* Improvement: failure summary in XML reports now includes file and
+ line information.
+* Improvement: the XML element now has a timestamp attribute.
+* Improvement: When --gtest_filter is specified, XML report now doesn't
+ contain information about tests that are filtered out.
+* Fixed the bug where long --gtest_filter flag values are truncated in
+ death tests.
+* Potentially breaking change: RUN_ALL_TESTS() is now implemented as a
+ function instead of a macro in order to work better with Clang.
+* Compatibility fixes with C++ 11 and various platforms.
+* Bug/warning fixes.
+
+Changes for 1.6.0:
+
+* New feature: ADD_FAILURE_AT() for reporting a test failure at the
+ given source location -- useful for writing testing utilities.
+* New feature: the universal value printer is moved from Google Mock
+ to Google Test.
+* New feature: type parameters and value parameters are reported in
+ the XML report now.
+* A gtest_disable_pthreads CMake option.
+* Colored output works in GNU Screen sessions now.
+* Parameters of value-parameterized tests are now printed in the
+ textual output.
+* Failures from ad hoc test assertions run before RUN_ALL_TESTS() are
+ now correctly reported.
+* Arguments of ASSERT_XY and EXPECT_XY no longer need to support << to
+ ostream.
+* More complete handling of exceptions.
+* GTEST_ASSERT_XY can be used instead of ASSERT_XY in case the latter
+ name is already used by another library.
+* --gtest_catch_exceptions is now true by default, allowing a test
+ program to continue after an exception is thrown.
+* Value-parameterized test fixtures can now derive from Test and
+ WithParamInterface separately, easing conversion of legacy tests.
+* Death test messages are clearly marked to make them more
+ distinguishable from other messages.
+* Compatibility fixes for Android, Google Native Client, MinGW, HP UX,
+ PowerPC, Lucid autotools, libCStd, Sun C++, Borland C++ Builder (Code Gear),
+ IBM XL C++ (Visual Age C++), and C++0x.
+* Bug fixes and implementation clean-ups.
+* Potentially incompatible changes: disables the harmful 'make install'
+ command in autotools.
+
+Changes for 1.5.0:
+
+ * New feature: assertions can be safely called in multiple threads
+ where the pthreads library is available.
+ * New feature: predicates used inside EXPECT_TRUE() and friends
+ can now generate custom failure messages.
+ * New feature: Google Test can now be compiled as a DLL.
+ * New feature: fused source files are included.
+ * New feature: prints help when encountering unrecognized Google Test flags.
+ * Experimental feature: CMake build script (requires CMake 2.6.4+).
+ * Experimental feature: the Pump script for meta programming.
+ * double values streamed to an assertion are printed with enough precision
+ to differentiate any two different values.
+ * Google Test now works on Solaris and AIX.
+ * Build and test script improvements.
+ * Bug fixes and implementation clean-ups.
+
+ Potentially breaking changes:
+
+ * Stopped supporting VC++ 7.1 with exceptions disabled.
+ * Dropped support for 'make install'.
+
+Changes for 1.4.0:
+
+ * New feature: the event listener API
+ * New feature: test shuffling
+ * New feature: the XML report format is closer to junitreport and can
+ be parsed by Hudson now.
+ * New feature: when a test runs under Visual Studio, its failures are
+ integrated in the IDE.
+ * New feature: /MD(d) versions of VC++ projects.
+ * New feature: elapsed time for the tests is printed by default.
+ * New feature: comes with a TR1 tuple implementation such that Boost
+ is no longer needed for Combine().
+ * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
+ * New feature: the Xcode project can now produce static gtest
+ libraries in addition to a framework.
+ * Compatibility fixes for Solaris, Cygwin, minGW, Windows Mobile,
+ Symbian, gcc, and C++Builder.
+ * Bug fixes and implementation clean-ups.
+
+Changes for 1.3.0:
+
+ * New feature: death tests on Windows, Cygwin, and Mac.
+ * New feature: ability to use Google Test assertions in other testing
+ frameworks.
+ * New feature: ability to run disabled test via
+ --gtest_also_run_disabled_tests.
+ * New feature: the --help flag for printing the usage.
+ * New feature: access to Google Test flag values in user code.
+ * New feature: a script that packs Google Test into one .h and one
+ .cc file for easy deployment.
+ * New feature: support for distributing test functions to multiple
+ machines (requires support from the test runner).
+ * Bug fixes and implementation clean-ups.
+
+Changes for 1.2.1:
+
+ * Compatibility fixes for Linux IA-64 and IBM z/OS.
+ * Added support for using Boost and other TR1 implementations.
+ * Changes to the build scripts to support upcoming release of Google C++
+ Mocking Framework.
+ * Added Makefile to the distribution package.
+ * Improved build instructions in README.
+
+Changes for 1.2.0:
+
+ * New feature: value-parameterized tests.
+ * New feature: the ASSERT/EXPECT_(NON)FATAL_FAILURE(_ON_ALL_THREADS)
+ macros.
+ * Changed the XML report format to match JUnit/Ant's.
+ * Added tests to the Xcode project.
+ * Added scons/SConscript for building with SCons.
+ * Added src/gtest-all.cc for building Google Test from a single file.
+ * Fixed compatibility with Solaris and z/OS.
+ * Enabled running Python tests on systems with python 2.3 installed,
+ e.g. Mac OS X 10.4.
+ * Bug fixes.
+
+Changes for 1.1.0:
+
+ * New feature: type-parameterized tests.
+ * New feature: exception assertions.
+ * New feature: printing elapsed time of tests.
+ * Improved the robustness of death tests.
+ * Added an Xcode project and samples.
+ * Adjusted the output format on Windows to be understandable by Visual Studio.
+ * Minor bug fixes.
+
+Changes for 1.0.1:
+
+ * Added project files for Visual Studio 7.1.
+ * Fixed issues with compiling on Mac OS X.
+ * Fixed issues with compiling on Cygwin.
+
+Changes for 1.0.0:
+
+ * Initial Open Source release of Google Test
diff --git a/test/fmw/gtest/LICENSE b/test/fmw/gtest/LICENSE
new file mode 100644
index 00000000000..1941a11f8ce
--- /dev/null
+++ b/test/fmw/gtest/LICENSE
@@ -0,0 +1,28 @@
+Copyright 2008, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/test/fmw/gtest/README b/test/fmw/gtest/README
new file mode 100644
index 00000000000..26f35a84794
--- /dev/null
+++ b/test/fmw/gtest/README
@@ -0,0 +1,435 @@
+Google C++ Testing Framework
+============================
+
+http://code.google.com/p/googletest/
+
+Overview
+--------
+
+Google's framework for writing C++ tests on a variety of platforms
+(Linux, Mac OS X, Windows, Windows CE, Symbian, etc). Based on the
+xUnit architecture. Supports automatic test discovery, a rich set of
+assertions, user-defined assertions, death tests, fatal and non-fatal
+failures, various options for running the tests, and XML test report
+generation.
+
+Please see the project page above for more information as well as the
+mailing list for questions, discussions, and development. There is
+also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
+join us!
+
+Requirements for End Users
+--------------------------
+
+Google Test is designed to have fairly minimal requirements to build
+and use with your projects, but there are some. Currently, we support
+Linux, Windows, Mac OS X, and Cygwin. We will also make our best
+effort to support other platforms (e.g. Solaris, AIX, and z/OS).
+However, since core members of the Google Test project have no access
+to these platforms, Google Test may have outstanding issues there. If
+you notice any problems on your platform, please notify
+googletestframework@googlegroups.com. Patches for fixing them are
+even more welcome!
+
+### Linux Requirements ###
+
+These are the base requirements to build and use Google Test from a source
+package (as described below):
+ * GNU-compatible Make or gmake
+ * POSIX-standard shell
+ * POSIX(-2) Regular Expressions (regex.h)
+ * A C++98-standard-compliant compiler
+
+### Windows Requirements ###
+
+ * Microsoft Visual C++ 7.1 or newer
+
+### Cygwin Requirements ###
+
+ * Cygwin 1.5.25-14 or newer
+
+### Mac OS X Requirements ###
+
+ * Mac OS X 10.4 Tiger or newer
+ * Developer Tools Installed
+
+Also, you'll need CMake 2.6.4 or higher if you want to build the
+samples using the provided CMake script, regardless of the platform.
+
+Requirements for Contributors
+-----------------------------
+
+We welcome patches. If you plan to contribute a patch, you need to
+build Google Test and its own tests from an SVN checkout (described
+below), which has further requirements:
+
+ * Python version 2.3 or newer (for running some of the tests and
+ re-generating certain source files from templates)
+ * CMake 2.6.4 or newer
+
+Getting the Source
+------------------
+
+There are two primary ways of getting Google Test's source code: you
+can download a stable source release in your preferred archive format,
+or directly check out the source from our Subversion (SVN) repositary.
+The SVN checkout requires a few extra steps and some extra software
+packages on your system, but lets you track the latest development and
+make patches much more easily, so we highly encourage it.
+
+### Source Package ###
+
+Google Test is released in versioned source packages which can be
+downloaded from the download page [1]. Several different archive
+formats are provided, but the only difference is the tools used to
+manipulate them, and the size of the resulting file. Download
+whichever you are most comfortable with.
+
+ [1] http://code.google.com/p/googletest/downloads/list
+
+Once the package is downloaded, expand it using whichever tools you
+prefer for that type. This will result in a new directory with the
+name "gtest-X.Y.Z" which contains all of the source code. Here are
+some examples on Linux:
+
+ tar -xvzf gtest-X.Y.Z.tar.gz
+ tar -xvjf gtest-X.Y.Z.tar.bz2
+ unzip gtest-X.Y.Z.zip
+
+### SVN Checkout ###
+
+To check out the main branch (also known as the "trunk") of Google
+Test, run the following Subversion command:
+
+ svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
+
+Setting up the Build
+--------------------
+
+To build Google Test and your tests that use it, you need to tell your
+build system where to find its headers and source files. The exact
+way to do it depends on which build system you use, and is usually
+straightforward.
+
+### Generic Build Instructions ###
+
+Suppose you put Google Test in directory ${GTEST_DIR}. To build it,
+create a library build target (or a project as called by Visual Studio
+and Xcode) to compile
+
+ ${GTEST_DIR}/src/gtest-all.cc
+
+with ${GTEST_DIR}/include in the system header search path and ${GTEST_DIR}
+in the normal header search path. Assuming a Linux-like system and gcc,
+something like the following will do:
+
+ g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
+ -pthread -c ${GTEST_DIR}/src/gtest-all.cc
+ ar -rv libgtest.a gtest-all.o
+
+(We need -pthread as Google Test uses threads.)
+
+Next, you should compile your test source file with
+${GTEST_DIR}/include in the system header search path, and link it
+with gtest and any other necessary libraries:
+
+ g++ -isystem ${GTEST_DIR}/include -pthread path/to/your_test.cc libgtest.a \
+ -o your_test
+
+As an example, the make/ directory contains a Makefile that you can
+use to build Google Test on systems where GNU make is available
+(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
+Test's own tests. Instead, it just builds the Google Test library and
+a sample test. You can use it as a starting point for your own build
+script.
+
+If the default settings are correct for your environment, the
+following commands should succeed:
+
+ cd ${GTEST_DIR}/make
+ make
+ ./sample1_unittest
+
+If you see errors, try to tweak the contents of make/Makefile to make
+them go away. There are instructions in make/Makefile on how to do
+it.
+
+### Using CMake ###
+
+Google Test comes with a CMake build script (CMakeLists.txt) that can
+be used on a wide range of platforms ("C" stands for cross-platofrm.).
+If you don't have CMake installed already, you can download it for
+free from http://www.cmake.org/.
+
+CMake works by generating native makefiles or build projects that can
+be used in the compiler environment of your choice. The typical
+workflow starts with:
+
+ mkdir mybuild # Create a directory to hold the build output.
+ cd mybuild
+ cmake ${GTEST_DIR} # Generate native build scripts.
+
+If you want to build Google Test's samples, you should replace the
+last command with
+
+ cmake -Dgtest_build_samples=ON ${GTEST_DIR}
+
+If you are on a *nix system, you should now see a Makefile in the
+current directory. Just type 'make' to build gtest.
+
+If you use Windows and have Vistual Studio installed, a gtest.sln file
+and several .vcproj files will be created. You can then build them
+using Visual Studio.
+
+On Mac OS X with Xcode installed, a .xcodeproj file will be generated.
+
+### Legacy Build Scripts ###
+
+Before settling on CMake, we have been providing hand-maintained build
+projects/scripts for Visual Studio, Xcode, and Autotools. While we
+continue to provide them for convenience, they are not actively
+maintained any more. We highly recommend that you follow the
+instructions in the previous two sections to integrate Google Test
+with your existing build system.
+
+If you still need to use the legacy build scripts, here's how:
+
+The msvc\ folder contains two solutions with Visual C++ projects.
+Open the gtest.sln or gtest-md.sln file using Visual Studio, and you
+are ready to build Google Test the same way you build any Visual
+Studio project. Files that have names ending with -md use DLL
+versions of Microsoft runtime libraries (the /MD or the /MDd compiler
+option). Files without that suffix use static versions of the runtime
+libraries (the /MT or the /MTd option). Please note that one must use
+the same option to compile both gtest and the test code. If you use
+Visual Studio 2005 or above, we recommend the -md version as /MD is
+the default for new projects in these versions of Visual Studio.
+
+On Mac OS X, open the gtest.xcodeproj in the xcode/ folder using
+Xcode. Build the "gtest" target. The universal binary framework will
+end up in your selected build directory (selected in the Xcode
+"Preferences..." -> "Building" pane and defaults to xcode/build).
+Alternatively, at the command line, enter:
+
+ xcodebuild
+
+This will build the "Release" configuration of gtest.framework in your
+default build location. See the "xcodebuild" man page for more
+information about building different configurations and building in
+different locations.
+
+If you wish to use the Google Test Xcode project with Xcode 4.x and
+above, you need to either:
+ * update the SDK configuration options in xcode/Config/General.xconfig.
+ Comment options SDKROOT, MACOS_DEPLOYMENT_TARGET, and GCC_VERSION. If
+ you choose this route you lose the ability to target earlier versions
+ of MacOS X.
+ * Install an SDK for an earlier version. This doesn't appear to be
+ supported by Apple, but has been reported to work
+ (http://stackoverflow.com/questions/5378518).
+
+Tweaking Google Test
+--------------------
+
+Google Test can be used in diverse environments. The default
+configuration may not work (or may not work well) out of the box in
+some environments. However, you can easily tweak Google Test by
+defining control macros on the compiler command line. Generally,
+these macros are named like GTEST_XYZ and you define them to either 1
+or 0 to enable or disable a certain feature.
+
+We list the most frequently used macros below. For a complete list,
+see file include/gtest/internal/gtest-port.h.
+
+### Choosing a TR1 Tuple Library ###
+
+Some Google Test features require the C++ Technical Report 1 (TR1)
+tuple library, which is not yet available with all compilers. The
+good news is that Google Test implements a subset of TR1 tuple that's
+enough for its own need, and will automatically use this when the
+compiler doesn't provide TR1 tuple.
+
+Usually you don't need to care about which tuple library Google Test
+uses. However, if your project already uses TR1 tuple, you need to
+tell Google Test to use the same TR1 tuple library the rest of your
+project uses, or the two tuple implementations will clash. To do
+that, add
+
+ -DGTEST_USE_OWN_TR1_TUPLE=0
+
+to the compiler flags while compiling Google Test and your tests. If
+you want to force Google Test to use its own tuple library, just add
+
+ -DGTEST_USE_OWN_TR1_TUPLE=1
+
+to the compiler flags instead.
+
+If you don't want Google Test to use tuple at all, add
+
+ -DGTEST_HAS_TR1_TUPLE=0
+
+and all features using tuple will be disabled.
+
+### Multi-threaded Tests ###
+
+Google Test is thread-safe where the pthread library is available.
+After #include "gtest/gtest.h", you can check the GTEST_IS_THREADSAFE
+macro to see whether this is the case (yes if the macro is #defined to
+1, no if it's undefined.).
+
+If Google Test doesn't correctly detect whether pthread is available
+in your environment, you can force it with
+
+ -DGTEST_HAS_PTHREAD=1
+
+or
+
+ -DGTEST_HAS_PTHREAD=0
+
+When Google Test uses pthread, you may need to add flags to your
+compiler and/or linker to select the pthread library, or you'll get
+link errors. If you use the CMake script or the deprecated Autotools
+script, this is taken care of for you. If you use your own build
+script, you'll need to read your compiler and linker's manual to
+figure out what flags to add.
+
+### As a Shared Library (DLL) ###
+
+Google Test is compact, so most users can build and link it as a
+static library for the simplicity. You can choose to use Google Test
+as a shared library (known as a DLL on Windows) if you prefer.
+
+To compile *gtest* as a shared library, add
+
+ -DGTEST_CREATE_SHARED_LIBRARY=1
+
+to the compiler flags. You'll also need to tell the linker to produce
+a shared library instead - consult your linker's manual for how to do
+it.
+
+To compile your *tests* that use the gtest shared library, add
+
+ -DGTEST_LINKED_AS_SHARED_LIBRARY=1
+
+to the compiler flags.
+
+Note: while the above steps aren't technically necessary today when
+using some compilers (e.g. GCC), they may become necessary in the
+future, if we decide to improve the speed of loading the library (see
+http://gcc.gnu.org/wiki/Visibility for details). Therefore you are
+recommended to always add the above flags when using Google Test as a
+shared library. Otherwise a future release of Google Test may break
+your build script.
+
+### Avoiding Macro Name Clashes ###
+
+In C++, macros don't obey namespaces. Therefore two libraries that
+both define a macro of the same name will clash if you #include both
+definitions. In case a Google Test macro clashes with another
+library, you can force Google Test to rename its macro to avoid the
+conflict.
+
+Specifically, if both Google Test and some other code define macro
+FOO, you can add
+
+ -DGTEST_DONT_DEFINE_FOO=1
+
+to the compiler flags to tell Google Test to change the macro's name
+from FOO to GTEST_FOO. Currently FOO can be FAIL, SUCCEED, or TEST.
+For example, with -DGTEST_DONT_DEFINE_TEST=1, you'll need to write
+
+ GTEST_TEST(SomeTest, DoesThis) { ... }
+
+instead of
+
+ TEST(SomeTest, DoesThis) { ... }
+
+in order to define a test.
+
+Upgrating from an Earlier Version
+---------------------------------
+
+We strive to keep Google Test releases backward compatible.
+Sometimes, though, we have to make some breaking changes for the
+users' long-term benefits. This section describes what you'll need to
+do if you are upgrading from an earlier version of Google Test.
+
+### Upgrading from 1.3.0 or Earlier ###
+
+You may need to explicitly enable or disable Google Test's own TR1
+tuple library. See the instructions in section "Choosing a TR1 Tuple
+Library".
+
+### Upgrading from 1.4.0 or Earlier ###
+
+The Autotools build script (configure + make) is no longer officially
+supportted. You are encouraged to migrate to your own build system or
+use CMake. If you still need to use Autotools, you can find
+instructions in the README file from Google Test 1.4.0.
+
+On platforms where the pthread library is available, Google Test uses
+it in order to be thread-safe. See the "Multi-threaded Tests" section
+for what this means to your build script.
+
+If you use Microsoft Visual C++ 7.1 with exceptions disabled, Google
+Test will no longer compile. This should affect very few people, as a
+large portion of STL (including ) doesn't compile in this mode
+anyway. We decided to stop supporting it in order to greatly simplify
+Google Test's implementation.
+
+Developing Google Test
+----------------------
+
+This section discusses how to make your own changes to Google Test.
+
+### Testing Google Test Itself ###
+
+To make sure your changes work as intended and don't break existing
+functionality, you'll want to compile and run Google Test's own tests.
+For that you can use CMake:
+
+ mkdir mybuild
+ cd mybuild
+ cmake -Dgtest_build_tests=ON ${GTEST_DIR}
+
+Make sure you have Python installed, as some of Google Test's tests
+are written in Python. If the cmake command complains about not being
+able to find Python ("Could NOT find PythonInterp (missing:
+PYTHON_EXECUTABLE)"), try telling it explicitly where your Python
+executable can be found:
+
+ cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
+
+Next, you can build Google Test and all of its own tests. On *nix,
+this is usually done by 'make'. To run the tests, do
+
+ make test
+
+All tests should pass.
+
+### Regenerating Source Files ###
+
+Some of Google Test's source files are generated from templates (not
+in the C++ sense) using a script. A template file is named FOO.pump,
+where FOO is the name of the file it will generate. For example, the
+file include/gtest/internal/gtest-type-util.h.pump is used to generate
+gtest-type-util.h in the same directory.
+
+Normally you don't need to worry about regenerating the source files,
+unless you need to modify them. In that case, you should modify the
+corresponding .pump files instead and run the pump.py Python script to
+regenerate them. You can find pump.py in the scripts/ directory.
+Read the Pump manual [2] for how to use it.
+
+ [2] http://code.google.com/p/googletest/wiki/PumpManual
+
+### Contributing a Patch ###
+
+We welcome patches. Please read the Google Test developer's guide [3]
+for how you can contribute. In particular, make sure you have signed
+the Contributor License Agreement, or we won't be able to accept the
+patch.
+
+ [3] http://code.google.com/p/googletest/wiki/GoogleTestDevGuide
+
+Happy testing!
diff --git a/test/fmw/gtest/include/gtest/gtest-death-test.h b/test/fmw/gtest/include/gtest/gtest-death-test.h
new file mode 100644
index 00000000000..957a69c6a9e
--- /dev/null
+++ b/test/fmw/gtest/include/gtest/gtest-death-test.h
@@ -0,0 +1,294 @@
+// Copyright 2005, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: wan@google.com (Zhanyong Wan)
+//
+// The Google C++ Testing Framework (Google Test)
+//
+// This header file defines the public API for death tests. It is
+// #included by gtest.h so a user doesn't need to include this
+// directly.
+
+#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
+#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
+
+#include "gtest/internal/gtest-death-test-internal.h"
+
+namespace testing {
+
+// This flag controls the style of death tests. Valid values are "threadsafe",
+// meaning that the death test child process will re-execute the test binary
+// from the start, running only a single death test, or "fast",
+// meaning that the child process will execute the test logic immediately
+// after forking.
+GTEST_DECLARE_string_(death_test_style);
+
+#if GTEST_HAS_DEATH_TEST
+
+namespace internal {
+
+// Returns a Boolean value indicating whether the caller is currently
+// executing in the context of the death test child process. Tools such as
+// Valgrind heap checkers may need this to modify their behavior in death
+// tests. IMPORTANT: This is an internal utility. Using it may break the
+// implementation of death tests. User code MUST NOT use it.
+GTEST_API_ bool InDeathTestChild();
+
+} // namespace internal
+
+// The following macros are useful for writing death tests.
+
+// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
+// executed:
+//
+// 1. It generates a warning if there is more than one active
+// thread. This is because it's safe to fork() or clone() only
+// when there is a single thread.
+//
+// 2. The parent process clone()s a sub-process and runs the death
+// test in it; the sub-process exits with code 0 at the end of the
+// death test, if it hasn't exited already.
+//
+// 3. The parent process waits for the sub-process to terminate.
+//
+// 4. The parent process checks the exit code and error message of
+// the sub-process.
+//
+// Examples:
+//
+// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
+// for (int i = 0; i < 5; i++) {
+// EXPECT_DEATH(server.ProcessRequest(i),
+// "Invalid request .* in ProcessRequest()")
+// << "Failed to die on request " << i;
+// }
+//
+// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
+//
+// bool KilledBySIGHUP(int exit_code) {
+// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
+// }
+//
+// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
+//
+// On the regular expressions used in death tests:
+//
+// On POSIX-compliant systems (*nix), we use the library,
+// which uses the POSIX extended regex syntax.
+//
+// On other platforms (e.g. Windows), we only support a simple regex
+// syntax implemented as part of Google Test. This limited
+// implementation should be enough most of the time when writing
+// death tests; though it lacks many features you can find in PCRE
+// or POSIX extended regex syntax. For example, we don't support
+// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
+// repetition count ("x{5,7}"), among others.
+//
+// Below is the syntax that we do support. We chose it to be a
+// subset of both PCRE and POSIX extended regex, so it's easy to
+// learn wherever you come from. In the following: 'A' denotes a
+// literal character, period (.), or a single \\ escape sequence;
+// 'x' and 'y' denote regular expressions; 'm' and 'n' are for
+// natural numbers.
+//
+// c matches any literal character c
+// \\d matches any decimal digit
+// \\D matches any character that's not a decimal digit
+// \\f matches \f
+// \\n matches \n
+// \\r matches \r
+// \\s matches any ASCII whitespace, including \n
+// \\S matches any character that's not a whitespace
+// \\t matches \t
+// \\v matches \v
+// \\w matches any letter, _, or decimal digit
+// \\W matches any character that \\w doesn't match
+// \\c matches any literal character c, which must be a punctuation
+// . matches any single character except \n
+// A? matches 0 or 1 occurrences of A
+// A* matches 0 or many occurrences of A
+// A+ matches 1 or many occurrences of A
+// ^ matches the beginning of a string (not that of each line)
+// $ matches the end of a string (not that of each line)
+// xy matches x followed by y
+//
+// If you accidentally use PCRE or POSIX extended regex features
+// not implemented by us, you will get a run-time failure. In that
+// case, please try to rewrite your regular expression within the
+// above syntax.
+//
+// This implementation is *not* meant to be as highly tuned or robust
+// as a compiled regex library, but should perform well enough for a
+// death test, which already incurs significant overhead by launching
+// a child process.
+//
+// Known caveats:
+//
+// A "threadsafe" style death test obtains the path to the test
+// program from argv[0] and re-executes it in the sub-process. For
+// simplicity, the current implementation doesn't search the PATH
+// when launching the sub-process. This means that the user must
+// invoke the test program via a path that contains at least one
+// path separator (e.g. path/to/foo_test and
+// /absolute/path/to/bar_test are fine, but foo_test is not). This
+// is rarely a problem as people usually don't put the test binary
+// directory in PATH.
+//
+// TODO(wan@google.com): make thread-safe death tests search the PATH.
+
+// Asserts that a given statement causes the program to exit, with an
+// integer exit status that satisfies predicate, and emitting error output
+// that matches regex.
+# define ASSERT_EXIT(statement, predicate, regex) \
+ GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
+
+// Like ASSERT_EXIT, but continues on to successive tests in the
+// test case, if any:
+# define EXPECT_EXIT(statement, predicate, regex) \
+ GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
+
+// Asserts that a given statement causes the program to exit, either by
+// explicitly exiting with a nonzero exit code or being killed by a
+// signal, and emitting error output that matches regex.
+# define ASSERT_DEATH(statement, regex) \
+ ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
+
+// Like ASSERT_DEATH, but continues on to successive tests in the
+// test case, if any:
+# define EXPECT_DEATH(statement, regex) \
+ EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
+
+// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
+
+// Tests that an exit code describes a normal exit with a given exit code.
+class GTEST_API_ ExitedWithCode {
+ public:
+ explicit ExitedWithCode(int exit_code);
+ bool operator()(int exit_status) const;
+ private:
+ // No implementation - assignment is unsupported.
+ void operator=(const ExitedWithCode& other);
+
+ const int exit_code_;
+};
+
+# if !GTEST_OS_WINDOWS
+// Tests that an exit code describes an exit due to termination by a
+// given signal.
+class GTEST_API_ KilledBySignal {
+ public:
+ explicit KilledBySignal(int signum);
+ bool operator()(int exit_status) const;
+ private:
+ const int signum_;
+};
+# endif // !GTEST_OS_WINDOWS
+
+// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
+// The death testing framework causes this to have interesting semantics,
+// since the sideeffects of the call are only visible in opt mode, and not
+// in debug mode.
+//
+// In practice, this can be used to test functions that utilize the
+// LOG(DFATAL) macro using the following style:
+//
+// int DieInDebugOr12(int* sideeffect) {
+// if (sideeffect) {
+// *sideeffect = 12;
+// }
+// LOG(DFATAL) << "death";
+// return 12;
+// }
+//
+// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
+// int sideeffect = 0;
+// // Only asserts in dbg.
+// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
+//
+// #ifdef NDEBUG
+// // opt-mode has sideeffect visible.
+// EXPECT_EQ(12, sideeffect);
+// #else
+// // dbg-mode no visible sideeffect.
+// EXPECT_EQ(0, sideeffect);
+// #endif
+// }
+//
+// This will assert that DieInDebugReturn12InOpt() crashes in debug
+// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
+// appropriate fallback value (12 in this case) in opt mode. If you
+// need to test that a function has appropriate side-effects in opt
+// mode, include assertions against the side-effects. A general
+// pattern for this is:
+//
+// EXPECT_DEBUG_DEATH({
+// // Side-effects here will have an effect after this statement in
+// // opt mode, but none in debug mode.
+// EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
+// }, "death");
+//
+# ifdef NDEBUG
+
+# define EXPECT_DEBUG_DEATH(statement, regex) \
+ GTEST_EXECUTE_STATEMENT_(statement, regex)
+
+# define ASSERT_DEBUG_DEATH(statement, regex) \
+ GTEST_EXECUTE_STATEMENT_(statement, regex)
+
+# else
+
+# define EXPECT_DEBUG_DEATH(statement, regex) \
+ EXPECT_DEATH(statement, regex)
+
+# define ASSERT_DEBUG_DEATH(statement, regex) \
+ ASSERT_DEATH(statement, regex)
+
+# endif // NDEBUG for EXPECT_DEBUG_DEATH
+#endif // GTEST_HAS_DEATH_TEST
+
+// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
+// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
+// death tests are supported; otherwise they just issue a warning. This is
+// useful when you are combining death test assertions with normal test
+// assertions in one test.
+#if GTEST_HAS_DEATH_TEST
+# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
+ EXPECT_DEATH(statement, regex)
+# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
+ ASSERT_DEATH(statement, regex)
+#else
+# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
+ GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
+# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
+ GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
+#endif
+
+} // namespace testing
+
+#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
diff --git a/test/fmw/gtest/include/gtest/gtest-message.h b/test/fmw/gtest/include/gtest/gtest-message.h
new file mode 100644
index 00000000000..fe879bca792
--- /dev/null
+++ b/test/fmw/gtest/include/gtest/gtest-message.h
@@ -0,0 +1,250 @@
+// Copyright 2005, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: wan@google.com (Zhanyong Wan)
+//
+// The Google C++ Testing Framework (Google Test)
+//
+// This header file defines the Message class.
+//
+// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
+// leave some internal implementation details in this header file.
+// They are clearly marked by comments like this:
+//
+// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
+//
+// Such code is NOT meant to be used by a user directly, and is subject
+// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
+// program!
+
+#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
+#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
+
+#include
+
+#include "gtest/internal/gtest-port.h"
+
+// Ensures that there is at least one operator<< in the global namespace.
+// See Message& operator<<(...) below for why.
+void operator<<(const testing::internal::Secret&, int);
+
+namespace testing {
+
+// The Message class works like an ostream repeater.
+//
+// Typical usage:
+//
+// 1. You stream a bunch of values to a Message object.
+// It will remember the text in a stringstream.
+// 2. Then you stream the Message object to an ostream.
+// This causes the text in the Message to be streamed
+// to the ostream.
+//
+// For example;
+//
+// testing::Message foo;
+// foo << 1 << " != " << 2;
+// std::cout << foo;
+//
+// will print "1 != 2".
+//
+// Message is not intended to be inherited from. In particular, its
+// destructor is not virtual.
+//
+// Note that stringstream behaves differently in gcc and in MSVC. You
+// can stream a NULL char pointer to it in the former, but not in the
+// latter (it causes an access violation if you do). The Message
+// class hides this difference by treating a NULL char pointer as
+// "(null)".
+class GTEST_API_ Message {
+ private:
+ // The type of basic IO manipulators (endl, ends, and flush) for
+ // narrow streams.
+ typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
+
+ public:
+ // Constructs an empty Message.
+ Message();
+
+ // Copy constructor.
+ Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
+ *ss_ << msg.GetString();
+ }
+
+ // Constructs a Message from a C-string.
+ explicit Message(const char* str) : ss_(new ::std::stringstream) {
+ *ss_ << str;
+ }
+
+#if GTEST_OS_SYMBIAN
+ // Streams a value (either a pointer or not) to this object.
+ template
+ inline Message& operator <<(const T& value) {
+ StreamHelper(typename internal::is_pointer::type(), value);
+ return *this;
+ }
+#else
+ // Streams a non-pointer value to this object.
+ template
+ inline Message& operator <<(const T& val) {
+ // Some libraries overload << for STL containers. These
+ // overloads are defined in the global namespace instead of ::std.
+ //
+ // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
+ // overloads are visible in either the std namespace or the global
+ // namespace, but not other namespaces, including the testing
+ // namespace which Google Test's Message class is in.
+ //
+ // To allow STL containers (and other types that has a << operator
+ // defined in the global namespace) to be used in Google Test
+ // assertions, testing::Message must access the custom << operator
+ // from the global namespace. With this using declaration,
+ // overloads of << defined in the global namespace and those
+ // visible via Koenig lookup are both exposed in this function.
+ using ::operator <<;
+ *ss_ << val;
+ return *this;
+ }
+
+ // Streams a pointer value to this object.
+ //
+ // This function is an overload of the previous one. When you
+ // stream a pointer to a Message, this definition will be used as it
+ // is more specialized. (The C++ Standard, section
+ // [temp.func.order].) If you stream a non-pointer, then the
+ // previous definition will be used.
+ //
+ // The reason for this overload is that streaming a NULL pointer to
+ // ostream is undefined behavior. Depending on the compiler, you
+ // may get "0", "(nil)", "(null)", or an access violation. To
+ // ensure consistent result across compilers, we always treat NULL
+ // as "(null)".
+ template
+ inline Message& operator <<(T* const& pointer) { // NOLINT
+ if (pointer == NULL) {
+ *ss_ << "(null)";
+ } else {
+ *ss_ << pointer;
+ }
+ return *this;
+ }
+#endif // GTEST_OS_SYMBIAN
+
+ // Since the basic IO manipulators are overloaded for both narrow
+ // and wide streams, we have to provide this specialized definition
+ // of operator <<, even though its body is the same as the
+ // templatized version above. Without this definition, streaming
+ // endl or other basic IO manipulators to Message will confuse the
+ // compiler.
+ Message& operator <<(BasicNarrowIoManip val) {
+ *ss_ << val;
+ return *this;
+ }
+
+ // Instead of 1/0, we want to see true/false for bool values.
+ Message& operator <<(bool b) {
+ return *this << (b ? "true" : "false");
+ }
+
+ // These two overloads allow streaming a wide C string to a Message
+ // using the UTF-8 encoding.
+ Message& operator <<(const wchar_t* wide_c_str);
+ Message& operator <<(wchar_t* wide_c_str);
+
+#if GTEST_HAS_STD_WSTRING
+ // Converts the given wide string to a narrow string using the UTF-8
+ // encoding, and streams the result to this Message object.
+ Message& operator <<(const ::std::wstring& wstr);
+#endif // GTEST_HAS_STD_WSTRING
+
+#if GTEST_HAS_GLOBAL_WSTRING
+ // Converts the given wide string to a narrow string using the UTF-8
+ // encoding, and streams the result to this Message object.
+ Message& operator <<(const ::wstring& wstr);
+#endif // GTEST_HAS_GLOBAL_WSTRING
+
+ // Gets the text streamed to this object so far as an std::string.
+ // Each '\0' character in the buffer is replaced with "\\0".
+ //
+ // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
+ std::string GetString() const;
+
+ private:
+
+#if GTEST_OS_SYMBIAN
+ // These are needed as the Nokia Symbian Compiler cannot decide between
+ // const T& and const T* in a function template. The Nokia compiler _can_
+ // decide between class template specializations for T and T*, so a
+ // tr1::type_traits-like is_pointer works, and we can overload on that.
+ template
+ inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) {
+ if (pointer == NULL) {
+ *ss_ << "(null)";
+ } else {
+ *ss_ << pointer;
+ }
+ }
+ template
+ inline void StreamHelper(internal::false_type /*is_pointer*/,
+ const T& value) {
+ // See the comments in Message& operator <<(const T&) above for why
+ // we need this using statement.
+ using ::operator <<;
+ *ss_ << value;
+ }
+#endif // GTEST_OS_SYMBIAN
+
+ // We'll hold the text streamed to this object here.
+ const internal::scoped_ptr< ::std::stringstream> ss_;
+
+ // We declare (but don't implement) this to prevent the compiler
+ // from implementing the assignment operator.
+ void operator=(const Message&);
+};
+
+// Streams a Message to an ostream.
+inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
+ return os << sb.GetString();
+}
+
+namespace internal {
+
+// Converts a streamable value to an std::string. A NULL pointer is
+// converted to "(null)". When the input value is a ::string,
+// ::std::string, ::wstring, or ::std::wstring object, each NUL
+// character in it is replaced with "\\0".
+template
+std::string StreamableToString(const T& streamable) {
+ return (Message() << streamable).GetString();
+}
+
+} // namespace internal
+} // namespace testing
+
+#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
diff --git a/test/fmw/gtest/include/gtest/gtest-param-test.h b/test/fmw/gtest/include/gtest/gtest-param-test.h
new file mode 100644
index 00000000000..d6702c8f162
--- /dev/null
+++ b/test/fmw/gtest/include/gtest/gtest-param-test.h
@@ -0,0 +1,1421 @@
+// This file was GENERATED by command:
+// pump.py gtest-param-test.h.pump
+// DO NOT EDIT BY HAND!!!
+
+// Copyright 2008, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Authors: vladl@google.com (Vlad Losev)
+//
+// Macros and functions for implementing parameterized tests
+// in Google C++ Testing Framework (Google Test)
+//
+// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
+//
+#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
+#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
+
+
+// Value-parameterized tests allow you to test your code with different
+// parameters without writing multiple copies of the same test.
+//
+// Here is how you use value-parameterized tests:
+
+#if 0
+
+// To write value-parameterized tests, first you should define a fixture
+// class. It is usually derived from testing::TestWithParam (see below for
+// another inheritance scheme that's sometimes useful in more complicated
+// class hierarchies), where the type of your parameter values.
+// TestWithParam is itself derived from testing::Test. T can be any
+// copyable type. If it's a raw pointer, you are responsible for managing the
+// lifespan of the pointed values.
+
+class FooTest : public ::testing::TestWithParam {
+ // You can implement all the usual class fixture members here.
+};
+
+// Then, use the TEST_P macro to define as many parameterized tests
+// for this fixture as you want. The _P suffix is for "parameterized"
+// or "pattern", whichever you prefer to think.
+
+TEST_P(FooTest, DoesBlah) {
+ // Inside a test, access the test parameter with the GetParam() method
+ // of the TestWithParam class:
+ EXPECT_TRUE(foo.Blah(GetParam()));
+ ...
+}
+
+TEST_P(FooTest, HasBlahBlah) {
+ ...
+}
+
+// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
+// case with any set of parameters you want. Google Test defines a number
+// of functions for generating test parameters. They return what we call
+// (surprise!) parameter generators. Here is a summary of them, which
+// are all in the testing namespace:
+//
+//
+// Range(begin, end [, step]) - Yields values {begin, begin+step,
+// begin+step+step, ...}. The values do not
+// include end. step defaults to 1.
+// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
+// ValuesIn(container) - Yields values from a C-style array, an STL
+// ValuesIn(begin,end) container, or an iterator range [begin, end).
+// Bool() - Yields sequence {false, true}.
+// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
+// for the math savvy) of the values generated
+// by the N generators.
+//
+// For more details, see comments at the definitions of these functions below
+// in this file.
+//
+// The following statement will instantiate tests from the FooTest test case
+// each with parameter values "meeny", "miny", and "moe".
+
+INSTANTIATE_TEST_CASE_P(InstantiationName,
+ FooTest,
+ Values("meeny", "miny", "moe"));
+
+// To distinguish different instances of the pattern, (yes, you
+// can instantiate it more then once) the first argument to the
+// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
+// actual test case name. Remember to pick unique prefixes for different
+// instantiations. The tests from the instantiation above will have
+// these names:
+//
+// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
+// * InstantiationName/FooTest.DoesBlah/1 for "miny"
+// * InstantiationName/FooTest.DoesBlah/2 for "moe"
+// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
+// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
+// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
+//
+// You can use these names in --gtest_filter.
+//
+// This statement will instantiate all tests from FooTest again, each
+// with parameter values "cat" and "dog":
+
+const char* pets[] = {"cat", "dog"};
+INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
+
+// The tests from the instantiation above will have these names:
+//
+// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
+// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
+// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
+// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
+//
+// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
+// in the given test case, whether their definitions come before or
+// AFTER the INSTANTIATE_TEST_CASE_P statement.
+//
+// Please also note that generator expressions (including parameters to the
+// generators) are evaluated in InitGoogleTest(), after main() has started.
+// This allows the user on one hand, to adjust generator parameters in order
+// to dynamically determine a set of tests to run and on the other hand,
+// give the user a chance to inspect the generated tests with Google Test
+// reflection API before RUN_ALL_TESTS() is executed.
+//
+// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
+// for more examples.
+//
+// In the future, we plan to publish the API for defining new parameter
+// generators. But for now this interface remains part of the internal
+// implementation and is subject to change.
+//
+//
+// A parameterized test fixture must be derived from testing::Test and from
+// testing::WithParamInterface, where T is the type of the parameter
+// values. Inheriting from TestWithParam satisfies that requirement because
+// TestWithParam inherits from both Test and WithParamInterface. In more
+// complicated hierarchies, however, it is occasionally useful to inherit
+// separately from Test and WithParamInterface. For example:
+
+class BaseTest : public ::testing::Test {
+ // You can inherit all the usual members for a non-parameterized test
+ // fixture here.
+};
+
+class DerivedTest : public BaseTest, public ::testing::WithParamInterface {
+ // The usual test fixture members go here too.
+};
+
+TEST_F(BaseTest, HasFoo) {
+ // This is an ordinary non-parameterized test.
+}
+
+TEST_P(DerivedTest, DoesBlah) {
+ // GetParam works just the same here as if you inherit from TestWithParam.
+ EXPECT_TRUE(foo.Blah(GetParam()));
+}
+
+#endif // 0
+
+#include "gtest/internal/gtest-port.h"
+
+#if !GTEST_OS_SYMBIAN
+# include
+#endif
+
+// scripts/fuse_gtest.py depends on gtest's own header being #included
+// *unconditionally*. Therefore these #includes cannot be moved
+// inside #if GTEST_HAS_PARAM_TEST.
+#include "gtest/internal/gtest-internal.h"
+#include "gtest/internal/gtest-param-util.h"
+#include "gtest/internal/gtest-param-util-generated.h"
+
+#if GTEST_HAS_PARAM_TEST
+
+namespace testing {
+
+// Functions producing parameter generators.
+//
+// Google Test uses these generators to produce parameters for value-
+// parameterized tests. When a parameterized test case is instantiated
+// with a particular generator, Google Test creates and runs tests
+// for each element in the sequence produced by the generator.
+//
+// In the following sample, tests from test case FooTest are instantiated
+// each three times with parameter values 3, 5, and 8:
+//
+// class FooTest : public TestWithParam { ... };
+//
+// TEST_P(FooTest, TestThis) {
+// }
+// TEST_P(FooTest, TestThat) {
+// }
+// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
+//
+
+// Range() returns generators providing sequences of values in a range.
+//
+// Synopsis:
+// Range(start, end)
+// - returns a generator producing a sequence of values {start, start+1,
+// start+2, ..., }.
+// Range(start, end, step)
+// - returns a generator producing a sequence of values {start, start+step,
+// start+step+step, ..., }.
+// Notes:
+// * The generated sequences never include end. For example, Range(1, 5)
+// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
+// returns a generator producing {1, 3, 5, 7}.
+// * start and end must have the same type. That type may be any integral or
+// floating-point type or a user defined type satisfying these conditions:
+// * It must be assignable (have operator=() defined).
+// * It must have operator+() (operator+(int-compatible type) for
+// two-operand version).
+// * It must have operator<() defined.
+// Elements in the resulting sequences will also have that type.
+// * Condition start < end must be satisfied in order for resulting sequences
+// to contain any elements.
+//
+template
+internal::ParamGenerator Range(T start, T end, IncrementT step) {
+ return internal::ParamGenerator(
+ new internal::RangeGenerator(start, end, step));
+}
+
+template
+internal::ParamGenerator Range(T start, T end) {
+ return Range(start, end, 1);
+}
+
+// ValuesIn() function allows generation of tests with parameters coming from
+// a container.
+//
+// Synopsis:
+// ValuesIn(const T (&array)[N])
+// - returns a generator producing sequences with elements from
+// a C-style array.
+// ValuesIn(const Container& container)
+// - returns a generator producing sequences with elements from
+// an STL-style container.
+// ValuesIn(Iterator begin, Iterator end)
+// - returns a generator producing sequences with elements from
+// a range [begin, end) defined by a pair of STL-style iterators. These
+// iterators can also be plain C pointers.
+//
+// Please note that ValuesIn copies the values from the containers
+// passed in and keeps them to generate tests in RUN_ALL_TESTS().
+//
+// Examples:
+//
+// This instantiates tests from test case StringTest
+// each with C-string values of "foo", "bar", and "baz":
+//
+// const char* strings[] = {"foo", "bar", "baz"};
+// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
+//
+// This instantiates tests from test case StlStringTest
+// each with STL strings with values "a" and "b":
+//
+// ::std::vector< ::std::string> GetParameterStrings() {
+// ::std::vector< ::std::string> v;
+// v.push_back("a");
+// v.push_back("b");
+// return v;
+// }
+//
+// INSTANTIATE_TEST_CASE_P(CharSequence,
+// StlStringTest,
+// ValuesIn(GetParameterStrings()));
+//
+//
+// This will also instantiate tests from CharTest
+// each with parameter values 'a' and 'b':
+//
+// ::std::list GetParameterChars() {
+// ::std::list list;
+// list.push_back('a');
+// list.push_back('b');
+// return list;
+// }
+// ::std::list l = GetParameterChars();
+// INSTANTIATE_TEST_CASE_P(CharSequence2,
+// CharTest,
+// ValuesIn(l.begin(), l.end()));
+//
+template
+internal::ParamGenerator<
+ typename ::testing::internal::IteratorTraits::value_type>
+ValuesIn(ForwardIterator begin, ForwardIterator end) {
+ typedef typename ::testing::internal::IteratorTraits
+ ::value_type ParamType;
+ return internal::ParamGenerator(
+ new internal::ValuesInIteratorRangeGenerator(begin, end));
+}
+
+template
+internal::ParamGenerator ValuesIn(const T (&array)[N]) {
+ return ValuesIn(array, array + N);
+}
+
+template
+internal::ParamGenerator ValuesIn(
+ const Container& container) {
+ return ValuesIn(container.begin(), container.end());
+}
+
+// Values() allows generating tests from explicitly specified list of
+// parameters.
+//
+// Synopsis:
+// Values(T v1, T v2, ..., T vN)
+// - returns a generator producing sequences with elements v1, v2, ..., vN.
+//
+// For example, this instantiates tests from test case BarTest each
+// with values "one", "two", and "three":
+//
+// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
+//
+// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
+// The exact type of values will depend on the type of parameter in BazTest.
+//
+// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
+//
+// Currently, Values() supports from 1 to 50 parameters.
+//
+template
+internal::ValueArray1 Values(T1 v1) {
+ return internal::ValueArray1(v1);
+}
+
+template
+internal::ValueArray2 Values(T1 v1, T2 v2) {
+ return internal::ValueArray2(v1, v2);
+}
+
+template
+internal::ValueArray3 Values(T1 v1, T2 v2, T3 v3) {
+ return internal::ValueArray3(v1, v2, v3);
+}
+
+template
+internal::ValueArray4 Values(T1 v1, T2 v2, T3 v3, T4 v4) {
+ return internal::ValueArray4(v1, v2, v3, v4);
+}
+
+template
+internal::ValueArray5 Values(T1 v1, T2 v2, T3 v3, T4 v4,
+ T5 v5) {
+ return internal::ValueArray5(v1, v2, v3, v4, v5);
+}
+
+template
+internal::ValueArray6 Values(T1 v1, T2 v2, T3 v3,
+ T4 v4, T5 v5, T6 v6) {
+ return internal::ValueArray6(v1, v2, v3, v4, v5, v6);
+}
+
+template
+internal::ValueArray7 Values(T1 v1, T2 v2, T3 v3,
+ T4 v4, T5 v5, T6 v6, T7 v7) {
+ return internal::ValueArray7(v1, v2, v3, v4, v5,
+ v6, v7);
+}
+
+template
+internal::ValueArray8 Values(T1 v1, T2 v2,
+ T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
+ return internal::ValueArray8(v1, v2, v3, v4,
+ v5, v6, v7, v8);
+}
+
+template
+internal::ValueArray9 Values(T1 v1, T2 v2,
+ T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
+ return internal::ValueArray9(v1, v2, v3,
+ v4, v5, v6, v7, v8, v9);
+}
+
+template
+internal::ValueArray10 Values(T1 v1,
+ T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
+ return internal::ValueArray10(v1,
+ v2, v3, v4, v5, v6, v7, v8, v9, v10);
+}
+
+template
+internal::ValueArray11 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11) {
+ return internal::ValueArray11(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
+}
+
+template
+internal::ValueArray12 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12) {
+ return internal::ValueArray12(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
+}
+
+template
+internal::ValueArray13 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13) {
+ return internal::ValueArray13(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
+}
+
+template
+internal::ValueArray14 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
+ return internal::ValueArray14(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
+ v14);
+}
+
+template
+internal::ValueArray15 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
+ T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
+ return internal::ValueArray15(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
+ v13, v14, v15);
+}
+
+template
+internal::ValueArray16 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
+ T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16) {
+ return internal::ValueArray16(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
+ v12, v13, v14, v15, v16);
+}
+
+template
+internal::ValueArray17 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
+ T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17) {
+ return internal::ValueArray17(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
+ v11, v12, v13, v14, v15, v16, v17);
+}
+
+template
+internal::ValueArray18 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
+ T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18) {
+ return internal::ValueArray18(v1, v2, v3, v4, v5, v6, v7, v8, v9,
+ v10, v11, v12, v13, v14, v15, v16, v17, v18);
+}
+
+template
+internal::ValueArray19 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
+ T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
+ T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
+ return internal::ValueArray19(v1, v2, v3, v4, v5, v6, v7, v8,
+ v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
+}
+
+template
+internal::ValueArray20 Values(T1 v1, T2 v2, T3 v3, T4 v4,
+ T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
+ T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
+ return internal::ValueArray20(v1, v2, v3, v4, v5, v6, v7,
+ v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
+}
+
+template
+internal::ValueArray21 Values(T1 v1, T2 v2, T3 v3, T4 v4,
+ T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
+ T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
+ return internal::ValueArray21(v1, v2, v3, v4, v5, v6,
+ v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
+}
+
+template
+internal::ValueArray22 Values(T1 v1, T2 v2, T3 v3,
+ T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
+ T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
+ T21 v21, T22 v22) {
+ return internal::ValueArray22(v1, v2, v3, v4,
+ v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
+ v20, v21, v22);
+}
+
+template
+internal::ValueArray23 Values(T1 v1, T2 v2,
+ T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
+ T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
+ T21 v21, T22 v22, T23 v23) {
+ return internal::ValueArray23(v1, v2, v3,
+ v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
+ v20, v21, v22, v23);
+}
+
+template
+internal::ValueArray24 Values(T1 v1, T2 v2,
+ T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
+ T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
+ T21 v21, T22 v22, T23 v23, T24 v24) {
+ return internal::ValueArray24(v1, v2,
+ v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
+ v19, v20, v21, v22, v23, v24);
+}
+
+template
+internal::ValueArray25 Values(T1 v1,
+ T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
+ T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
+ T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
+ return internal::ValueArray25(v1,
+ v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
+ v18, v19, v20, v21, v22, v23, v24, v25);
+}
+
+template
+internal::ValueArray26 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26) {
+ return internal::ValueArray26(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
+ v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
+}
+
+template
+internal::ValueArray27 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27) {
+ return internal::ValueArray27(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
+ v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
+}
+
+template
+internal::ValueArray28 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27, T28 v28) {
+ return internal::ValueArray28(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
+ v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
+ v28);
+}
+
+template
+internal::ValueArray29 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27, T28 v28, T29 v29) {
+ return internal::ValueArray29(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
+ v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
+ v27, v28, v29);
+}
+
+template
+internal::ValueArray30 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
+ T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
+ T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
+ T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
+ return internal::ValueArray30(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
+ v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
+ v26, v27, v28, v29, v30);
+}
+
+template
+internal::ValueArray31 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
+ T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
+ T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
+ return internal::ValueArray31(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
+ v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
+ v25, v26, v27, v28, v29, v30, v31);
+}
+
+template
+internal::ValueArray32 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
+ T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
+ T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
+ T32 v32) {
+ return internal::ValueArray32(v1, v2, v3, v4, v5, v6, v7, v8, v9,
+ v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
+ v24, v25, v26, v27, v28, v29, v30, v31, v32);
+}
+
+template
+internal::ValueArray33 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
+ T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
+ T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
+ T32 v32, T33 v33) {
+ return internal::ValueArray33(v1, v2, v3, v4, v5, v6, v7, v8,
+ v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
+ v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
+}
+
+template
+internal::ValueArray34 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
+ T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
+ T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
+ T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
+ T31 v31, T32 v32, T33 v33, T34 v34) {
+ return internal::ValueArray34(v1, v2, v3, v4, v5, v6, v7,
+ v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
+ v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
+}
+
+template
+internal::ValueArray35 Values(T1 v1, T2 v2, T3 v3, T4 v4,
+ T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
+ T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
+ T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
+ T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
+ return internal::ValueArray35(v1, v2, v3, v4, v5, v6,
+ v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
+ v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
+}
+
+template
+internal::ValueArray36 Values(T1 v1, T2 v2, T3 v3, T4 v4,
+ T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
+ T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
+ T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
+ T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
+ return internal::ValueArray36(v1, v2, v3, v4,
+ v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
+ v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
+ v34, v35, v36);
+}
+
+template
+internal::ValueArray37 Values(T1 v1, T2 v2, T3 v3,
+ T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
+ T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
+ T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
+ T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
+ T37 v37) {
+ return internal::ValueArray37(v1, v2, v3,
+ v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
+ v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
+ v34, v35, v36, v37);
+}
+
+template
+internal::ValueArray38 Values(T1 v1, T2 v2,
+ T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
+ T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
+ T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
+ T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
+ T37 v37, T38 v38) {
+ return internal::ValueArray38(v1, v2,
+ v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
+ v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
+ v33, v34, v35, v36, v37, v38);
+}
+
+template
+internal::ValueArray39 Values(T1 v1, T2 v2,
+ T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
+ T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
+ T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
+ T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
+ T37 v37, T38 v38, T39 v39) {
+ return internal::ValueArray39(v1,
+ v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
+ v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
+ v32, v33, v34, v35, v36, v37, v38, v39);
+}
+
+template
+internal::ValueArray40 Values(T1 v1,
+ T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
+ T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
+ T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
+ T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
+ T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
+ return internal::ValueArray40(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
+ v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
+ v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
+}
+
+template
+internal::ValueArray41 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
+ T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
+ return internal::ValueArray41(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
+ v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
+ v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
+}
+
+template
+internal::ValueArray42 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
+ T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
+ T42 v42) {
+ return internal::ValueArray42(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
+ v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
+ v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
+ v42);
+}
+
+template
+internal::ValueArray43 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
+ T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
+ T42 v42, T43 v43) {
+ return internal::ValueArray43(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
+ v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
+ v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
+ v41, v42, v43);
+}
+
+template
+internal::ValueArray44 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
+ T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
+ T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
+ T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
+ T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
+ T42 v42, T43 v43, T44 v44) {
+ return internal::ValueArray44(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
+ v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
+ v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
+ v40, v41, v42, v43, v44);
+}
+
+template
+internal::ValueArray45 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
+ T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
+ T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
+ T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
+ T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
+ T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
+ return internal::ValueArray45(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
+ v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
+ v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
+ v39, v40, v41, v42, v43, v44, v45);
+}
+
+template
+internal::ValueArray46 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
+ T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
+ T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
+ T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
+ T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
+ return internal::ValueArray46(v1, v2, v3, v4, v5, v6, v7, v8, v9,
+ v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
+ v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
+ v38, v39, v40, v41, v42, v43, v44, v45, v46);
+}
+
+template
+internal::ValueArray47 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
+ T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
+ T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
+ T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
+ T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
+ return internal::ValueArray47(v1, v2, v3, v4, v5, v6, v7, v8,
+ v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
+ v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
+ v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
+}
+
+template
+internal::ValueArray48 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
+ T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
+ T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
+ T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
+ T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
+ T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
+ T48 v48) {
+ return internal::ValueArray48(v1, v2, v3, v4, v5, v6, v7,
+ v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
+ v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
+ v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
+}
+
+template
+internal::ValueArray49 Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
+ T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
+ T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
+ T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
+ T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
+ T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
+ T47 v47, T48 v48, T49 v49) {
+ return internal::ValueArray49(v1, v2, v3, v4, v5, v6,
+ v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
+ v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
+ v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
+}
+
+template
+internal::ValueArray50 Values(T1 v1, T2 v2, T3 v3, T4 v4,
+ T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
+ T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
+ T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
+ T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
+ T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
+ T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
+ return internal::ValueArray50(v1, v2, v3, v4,
+ v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
+ v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
+ v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
+ v48, v49, v50);
+}
+
+// Bool() allows generating tests with parameters in a set of (false, true).
+//
+// Synopsis:
+// Bool()
+// - returns a generator producing sequences with elements {false, true}.
+//
+// It is useful when testing code that depends on Boolean flags. Combinations
+// of multiple flags can be tested when several Bool()'s are combined using
+// Combine() function.
+//
+// In the following example all tests in the test case FlagDependentTest
+// will be instantiated twice with parameters false and true.
+//
+// class FlagDependentTest : public testing::TestWithParam {
+// virtual void SetUp() {
+// external_flag = GetParam();
+// }
+// }
+// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
+//
+inline internal::ParamGenerator Bool() {
+ return Values(false, true);
+}
+
+# if GTEST_HAS_COMBINE
+// Combine() allows the user to combine two or more sequences to produce
+// values of a Cartesian product of those sequences' elements.
+//
+// Synopsis:
+// Combine(gen1, gen2, ..., genN)
+// - returns a generator producing sequences with elements coming from
+// the Cartesian product of elements from the sequences generated by
+// gen1, gen2, ..., genN. The sequence elements will have a type of
+// tuple where T1, T2, ..., TN are the types
+// of elements from sequences produces by gen1, gen2, ..., genN.
+//
+// Combine can have up to 10 arguments. This number is currently limited
+// by the maximum number of elements in the tuple implementation used by Google
+// Test.
+//
+// Example:
+//
+// This will instantiate tests in test case AnimalTest each one with
+// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
+// tuple("dog", BLACK), and tuple("dog", WHITE):
+//
+// enum Color { BLACK, GRAY, WHITE };
+// class AnimalTest
+// : public testing::TestWithParam > {...};
+//
+// TEST_P(AnimalTest, AnimalLooksNice) {...}
+//
+// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
+// Combine(Values("cat", "dog"),
+// Values(BLACK, WHITE)));
+//
+// This will instantiate tests in FlagDependentTest with all variations of two
+// Boolean flags:
+//
+// class FlagDependentTest
+// : public testing::TestWithParam > {
+// virtual void SetUp() {
+// // Assigns external_flag_1 and external_flag_2 values from the tuple.
+// tie(external_flag_1, external_flag_2) = GetParam();
+// }
+// };
+//
+// TEST_P(FlagDependentTest, TestFeature1) {
+// // Test your code using external_flag_1 and external_flag_2 here.
+// }
+// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
+// Combine(Bool(), Bool()));
+//
+template
+internal::CartesianProductHolder2 Combine(
+ const Generator1& g1, const Generator2& g2) {
+ return internal::CartesianProductHolder2(
+ g1, g2);
+}
+
+template
+internal::CartesianProductHolder3 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3) {
+ return internal::CartesianProductHolder3(
+ g1, g2, g3);
+}
+
+template
+internal::CartesianProductHolder4 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4) {
+ return internal::CartesianProductHolder4(
+ g1, g2, g3, g4);
+}
+
+template
+internal::CartesianProductHolder5 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4, const Generator5& g5) {
+ return internal::CartesianProductHolder5(
+ g1, g2, g3, g4, g5);
+}
+
+template
+internal::CartesianProductHolder6 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4, const Generator5& g5, const Generator6& g6) {
+ return internal::CartesianProductHolder6(
+ g1, g2, g3, g4, g5, g6);
+}
+
+template
+internal::CartesianProductHolder7 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4, const Generator5& g5, const Generator6& g6,
+ const Generator7& g7) {
+ return internal::CartesianProductHolder7(
+ g1, g2, g3, g4, g5, g6, g7);
+}
+
+template
+internal::CartesianProductHolder8 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4, const Generator5& g5, const Generator6& g6,
+ const Generator7& g7, const Generator8& g8) {
+ return internal::CartesianProductHolder8(
+ g1, g2, g3, g4, g5, g6, g7, g8);
+}
+
+template
+internal::CartesianProductHolder9 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4, const Generator5& g5, const Generator6& g6,
+ const Generator7& g7, const Generator8& g8, const Generator9& g9) {
+ return internal::CartesianProductHolder9(
+ g1, g2, g3, g4, g5, g6, g7, g8, g9);
+}
+
+template
+internal::CartesianProductHolder10 Combine(
+ const Generator1& g1, const Generator2& g2, const Generator3& g3,
+ const Generator4& g4, const Generator5& g5, const Generator6& g6,
+ const Generator7& g7, const Generator8& g8, const Generator9& g9,
+ const Generator10& g10) {
+ return internal::CartesianProductHolder10(
+ g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
+}
+# endif // GTEST_HAS_COMBINE
+
+
+
+# define TEST_P(test_case_name, test_name) \
+ class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
+ : public test_case_name { \
+ public: \
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
+ virtual void TestBody(); \
+ private: \
+ static int AddToRegistry() { \
+ ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
+ GetTestCasePatternHolder(\
+ #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
+ #test_case_name, \
+ #test_name, \
+ new ::testing::internal::TestMetaFactory< \
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
+ return 0; \
+ } \
+ static int gtest_registering_dummy_; \
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(\
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
+ }; \
+ int GTEST_TEST_CLASS_NAME_(test_case_name, \
+ test_name)::gtest_registering_dummy_ = \
+ GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
+ void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
+
+# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
+ ::testing::internal::ParamGenerator \
+ gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
+ int gtest_##prefix##test_case_name##_dummy_ = \
+ ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
+ GetTestCasePatternHolder(\
+ #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
+ #prefix, \
+ >est_##prefix##test_case_name##_EvalGenerator_, \
+ __FILE__, __LINE__)
+
+} // namespace testing
+
+#endif // GTEST_HAS_PARAM_TEST
+
+#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
diff --git a/test/fmw/gtest/include/gtest/gtest-param-test.h.pump b/test/fmw/gtest/include/gtest/gtest-param-test.h.pump
new file mode 100644
index 00000000000..2dc9303b5e3
--- /dev/null
+++ b/test/fmw/gtest/include/gtest/gtest-param-test.h.pump
@@ -0,0 +1,487 @@
+$$ -*- mode: c++; -*-
+$var n = 50 $$ Maximum length of Values arguments we want to support.
+$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
+// Copyright 2008, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Authors: vladl@google.com (Vlad Losev)
+//
+// Macros and functions for implementing parameterized tests
+// in Google C++ Testing Framework (Google Test)
+//
+// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
+//
+#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
+#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
+
+
+// Value-parameterized tests allow you to test your code with different
+// parameters without writing multiple copies of the same test.
+//
+// Here is how you use value-parameterized tests:
+
+#if 0
+
+// To write value-parameterized tests, first you should define a fixture
+// class. It is usually derived from testing::TestWithParam (see below for
+// another inheritance scheme that's sometimes useful in more complicated
+// class hierarchies), where the type of your parameter values.
+// TestWithParam is itself derived from testing::Test. T can be any
+// copyable type. If it's a raw pointer, you are responsible for managing the
+// lifespan of the pointed values.
+
+class FooTest : public ::testing::TestWithParam {
+ // You can implement all the usual class fixture members here.
+};
+
+// Then, use the TEST_P macro to define as many parameterized tests
+// for this fixture as you want. The _P suffix is for "parameterized"
+// or "pattern", whichever you prefer to think.
+
+TEST_P(FooTest, DoesBlah) {
+ // Inside a test, access the test parameter with the GetParam() method
+ // of the TestWithParam class:
+ EXPECT_TRUE(foo.Blah(GetParam()));
+ ...
+}
+
+TEST_P(FooTest, HasBlahBlah) {
+ ...
+}
+
+// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
+// case with any set of parameters you want. Google Test defines a number
+// of functions for generating test parameters. They return what we call
+// (surprise!) parameter generators. Here is a summary of them, which
+// are all in the testing namespace:
+//
+//
+// Range(begin, end [, step]) - Yields values {begin, begin+step,
+// begin+step+step, ...}. The values do not
+// include end. step defaults to 1.
+// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
+// ValuesIn(container) - Yields values from a C-style array, an STL
+// ValuesIn(begin,end) container, or an iterator range [begin, end).
+// Bool() - Yields sequence {false, true}.
+// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
+// for the math savvy) of the values generated
+// by the N generators.
+//
+// For more details, see comments at the definitions of these functions below
+// in this file.
+//
+// The following statement will instantiate tests from the FooTest test case
+// each with parameter values "meeny", "miny", and "moe".
+
+INSTANTIATE_TEST_CASE_P(InstantiationName,
+ FooTest,
+ Values("meeny", "miny", "moe"));
+
+// To distinguish different instances of the pattern, (yes, you
+// can instantiate it more then once) the first argument to the
+// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
+// actual test case name. Remember to pick unique prefixes for different
+// instantiations. The tests from the instantiation above will have
+// these names:
+//
+// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
+// * InstantiationName/FooTest.DoesBlah/1 for "miny"
+// * InstantiationName/FooTest.DoesBlah/2 for "moe"
+// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
+// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
+// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
+//
+// You can use these names in --gtest_filter.
+//
+// This statement will instantiate all tests from FooTest again, each
+// with parameter values "cat" and "dog":
+
+const char* pets[] = {"cat", "dog"};
+INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
+
+// The tests from the instantiation above will have these names:
+//
+// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
+// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
+// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
+// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
+//
+// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
+// in the given test case, whether their definitions come before or
+// AFTER the INSTANTIATE_TEST_CASE_P statement.
+//
+// Please also note that generator expressions (including parameters to the
+// generators) are evaluated in InitGoogleTest(), after main() has started.
+// This allows the user on one hand, to adjust generator parameters in order
+// to dynamically determine a set of tests to run and on the other hand,
+// give the user a chance to inspect the generated tests with Google Test
+// reflection API before RUN_ALL_TESTS() is executed.
+//
+// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
+// for more examples.
+//
+// In the future, we plan to publish the API for defining new parameter
+// generators. But for now this interface remains part of the internal
+// implementation and is subject to change.
+//
+//
+// A parameterized test fixture must be derived from testing::Test and from
+// testing::WithParamInterface, where T is the type of the parameter
+// values. Inheriting from TestWithParam satisfies that requirement because
+// TestWithParam inherits from both Test and WithParamInterface. In more
+// complicated hierarchies, however, it is occasionally useful to inherit
+// separately from Test and WithParamInterface. For example:
+
+class BaseTest : public ::testing::Test {
+ // You can inherit all the usual members for a non-parameterized test
+ // fixture here.
+};
+
+class DerivedTest : public BaseTest, public ::testing::WithParamInterface {
+ // The usual test fixture members go here too.
+};
+
+TEST_F(BaseTest, HasFoo) {
+ // This is an ordinary non-parameterized test.
+}
+
+TEST_P(DerivedTest, DoesBlah) {
+ // GetParam works just the same here as if you inherit from TestWithParam.
+ EXPECT_TRUE(foo.Blah(GetParam()));
+}
+
+#endif // 0
+
+#include "gtest/internal/gtest-port.h"
+
+#if !GTEST_OS_SYMBIAN
+# include
+#endif
+
+// scripts/fuse_gtest.py depends on gtest's own header being #included
+// *unconditionally*. Therefore these #includes cannot be moved
+// inside #if GTEST_HAS_PARAM_TEST.
+#include "gtest/internal/gtest-internal.h"
+#include "gtest/internal/gtest-param-util.h"
+#include "gtest/internal/gtest-param-util-generated.h"
+
+#if GTEST_HAS_PARAM_TEST
+
+namespace testing {
+
+// Functions producing parameter generators.
+//
+// Google Test uses these generators to produce parameters for value-
+// parameterized tests. When a parameterized test case is instantiated
+// with a particular generator, Google Test creates and runs tests
+// for each element in the sequence produced by the generator.
+//
+// In the following sample, tests from test case FooTest are instantiated
+// each three times with parameter values 3, 5, and 8:
+//
+// class FooTest : public TestWithParam { ... };
+//
+// TEST_P(FooTest, TestThis) {
+// }
+// TEST_P(FooTest, TestThat) {
+// }
+// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
+//
+
+// Range() returns generators providing sequences of values in a range.
+//
+// Synopsis:
+// Range(start, end)
+// - returns a generator producing a sequence of values {start, start+1,
+// start+2, ..., }.
+// Range(start, end, step)
+// - returns a generator producing a sequence of values {start, start+step,
+// start+step+step, ..., }.
+// Notes:
+// * The generated sequences never include end. For example, Range(1, 5)
+// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
+// returns a generator producing {1, 3, 5, 7}.
+// * start and end must have the same type. That type may be any integral or
+// floating-point type or a user defined type satisfying these conditions:
+// * It must be assignable (have operator=() defined).
+// * It must have operator+() (operator+(int-compatible type) for
+// two-operand version).
+// * It must have operator<() defined.
+// Elements in the resulting sequences will also have that type.
+// * Condition start < end must be satisfied in order for resulting sequences
+// to contain any elements.
+//
+template
+internal::ParamGenerator Range(T start, T end, IncrementT step) {
+ return internal::ParamGenerator(
+ new internal::RangeGenerator(start, end, step));
+}
+
+template
+internal::ParamGenerator Range(T start, T end) {
+ return Range(start, end, 1);
+}
+
+// ValuesIn() function allows generation of tests with parameters coming from
+// a container.
+//
+// Synopsis:
+// ValuesIn(const T (&array)[N])
+// - returns a generator producing sequences with elements from
+// a C-style array.
+// ValuesIn(const Container& container)
+// - returns a generator producing sequences with elements from
+// an STL-style container.
+// ValuesIn(Iterator begin, Iterator end)
+// - returns a generator producing sequences with elements from
+// a range [begin, end) defined by a pair of STL-style iterators. These
+// iterators can also be plain C pointers.
+//
+// Please note that ValuesIn copies the values from the containers
+// passed in and keeps them to generate tests in RUN_ALL_TESTS().
+//
+// Examples:
+//
+// This instantiates tests from test case StringTest
+// each with C-string values of "foo", "bar", and "baz":
+//
+// const char* strings[] = {"foo", "bar", "baz"};
+// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
+//
+// This instantiates tests from test case StlStringTest
+// each with STL strings with values "a" and "b":
+//
+// ::std::vector< ::std::string> GetParameterStrings() {
+// ::std::vector< ::std::string> v;
+// v.push_back("a");
+// v.push_back("b");
+// return v;
+// }
+//
+// INSTANTIATE_TEST_CASE_P(CharSequence,
+// StlStringTest,
+// ValuesIn(GetParameterStrings()));
+//
+//
+// This will also instantiate tests from CharTest
+// each with parameter values 'a' and 'b':
+//
+// ::std::list GetParameterChars() {
+// ::std::list list;
+// list.push_back('a');
+// list.push_back('b');
+// return list;
+// }
+// ::std::list l = GetParameterChars();
+// INSTANTIATE_TEST_CASE_P(CharSequence2,
+// CharTest,
+// ValuesIn(l.begin(), l.end()));
+//
+template
+internal::ParamGenerator<
+ typename ::testing::internal::IteratorTraits::value_type>
+ValuesIn(ForwardIterator begin, ForwardIterator end) {
+ typedef typename ::testing::internal::IteratorTraits
+ ::value_type ParamType;
+ return internal::ParamGenerator(
+ new internal::ValuesInIteratorRangeGenerator(begin, end));
+}
+
+template