--- old/common/autoconf/configure.ac 2016-04-15 11:49:23.068198308 +0200 +++ new/common/autoconf/configure.ac 2016-04-15 11:49:22.980194623 +0200 @@ -227,6 +227,7 @@ HOTSPOT_SETUP_BUILD_TWEAKS JDKOPT_DETECT_INTREE_EC +JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER ############################################################################### # --- old/common/autoconf/generated-configure.sh 2016-04-15 11:49:23.512216895 +0200 +++ new/common/autoconf/generated-configure.sh 2016-04-15 11:49:23.368210867 +0200 @@ -650,6 +650,7 @@ JOBS MEMORY_SIZE NUM_CORES +BUILD_FAILURE_HANDLER ENABLE_INTREE_EC HOTSPOT_MAKE_ARGS LIBZIP_CAN_USE_MMAP @@ -1172,6 +1173,7 @@ with_dxsdk with_dxsdk_lib with_dxsdk_include +enable_jtreg_failure_handler with_num_cores with_memory_size with_jobs @@ -1940,6 +1942,12 @@ disable bundling of the freetype library with the build result [enabled on Windows or when using --with-freetype, disabled otherwise] + --enable-jtreg-failure-handler + forces build of the jtreg failure handler to be + enabled, missing dependencies become fatal errors. + Default is auto, where the failure handler is built + if all dependencies are present and otherwise just + disabled. --enable-sjavac use sjavac to do fast incremental compiles [disabled] --disable-javac-server disable javac server [enabled] @@ -4274,6 +4282,12 @@ # +################################################################################ +# +# Check if building of the jtreg failure handler should be enabled. +# + + # # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -4950,7 +4964,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1460464859 +DATE_WHEN_GENERATED=1460713327 ############################################################################### # @@ -62035,6 +62049,45 @@ fi + + + # Check whether --enable-jtreg-failure-handler was given. +if test "${enable_jtreg_failure_handler+set}" = set; then : + enableval=$enable_jtreg_failure_handler; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5 +$as_echo_n "checking if jtreg failure handler should be built... " >&6; } + + if test "x$enable_jtreg_failure_handler" = "xyes"; then + if test "x$JT_HOME" = "x"; then + as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5 + else + BUILD_FAILURE_HANDLER=true + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5 +$as_echo "yes, forced" >&6; } + fi + elif test "x$enable_jtreg_failure_handler" = "xno"; then + BUILD_FAILURE_HANDLER=false + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5 +$as_echo "no, forced" >&6; } + elif test "x$enable_jtreg_failure_handler" = "xauto" \ + || test "x$enable_jtreg_failure_handler" = "x"; then + if test "x$JT_HOME" = "x"; then + BUILD_FAILURE_HANDLER=false + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5 +$as_echo "no, missing jtreg" >&6; } + else + BUILD_FAILURE_HANDLER=true + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5 +$as_echo "yes, jtreg present" >&6; } + fi + else + as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5 + fi + + ############################################################################### --- old/common/autoconf/jdk-options.m4 2016-04-15 11:49:24.784270147 +0200 +++ new/common/autoconf/jdk-options.m4 2016-04-15 11:49:24.696266463 +0200 @@ -408,7 +408,7 @@ ################################################################################ # -# jlink options. +# jlink options. # We always keep packaged modules in JDK image. # AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS], @@ -433,3 +433,42 @@ AC_SUBST(JLINK_KEEP_PACKAGED_MODULES) ]) + +################################################################################ +# +# Check if building of the jtreg failure handler should be enabled. +# +AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER], +[ + AC_ARG_ENABLE([jtreg-failure-handler], [AS_HELP_STRING([--enable-jtreg-failure-handler], + [forces build of the jtreg failure handler to be enabled, missing dependencies + become fatal errors. Default is auto, where the failure handler is built if all + dependencies are present and otherwise just disabled.])]) + + AC_MSG_CHECKING([if jtreg failure handler should be built]) + + if test "x$enable_jtreg_failure_handler" = "xyes"; then + if test "x$JT_HOME" = "x"; then + AC_MSG_ERROR([Cannot enable jtreg failure handler without jtreg.]) + else + BUILD_FAILURE_HANDLER=true + AC_MSG_RESULT([yes, forced]) + fi + elif test "x$enable_jtreg_failure_handler" = "xno"; then + BUILD_FAILURE_HANDLER=false + AC_MSG_RESULT([no, forced]) + elif test "x$enable_jtreg_failure_handler" = "xauto" \ + || test "x$enable_jtreg_failure_handler" = "x"; then + if test "x$JT_HOME" = "x"; then + BUILD_FAILURE_HANDLER=false + AC_MSG_RESULT([no, missing jtreg]) + else + BUILD_FAILURE_HANDLER=true + AC_MSG_RESULT([yes, jtreg present]) + fi + else + AC_MSG_ERROR([Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler]) + fi + + AC_SUBST(BUILD_FAILURE_HANDLER) +]) --- old/common/autoconf/spec.gmk.in 2016-04-15 11:49:25.164286056 +0200 +++ new/common/autoconf/spec.gmk.in 2016-04-15 11:49:25.080282539 +0200 @@ -260,6 +260,8 @@ BUILD_HOTSPOT=@BUILD_HOTSPOT@ +BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@ + # The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep # it in sync. BOOT_JDK:=@BOOT_JDK@ --- old/common/conf/jib-profiles.js 2016-04-15 11:49:25.540301797 +0200 +++ new/common/conf/jib-profiles.js 2016-04-15 11:49:25.456298280 +0200 @@ -214,7 +214,7 @@ var getJibProfilesCommon = function (input) { var common = { dependencies: ["boot_jdk", "gnumake", "jtreg"], - configure_args: ["--with-default-make-target=all"], + configure_args: ["--with-default-make-target=all", "--enable-jtreg-failure-handler"], configure_args_32bit: ["--with-target-bits=32", "--with-jvm-variants=client,server"], configure_args_debug: ["--enable-debug"], configure_args_slowdebug: ["--with-debug-level=slowdebug"], --- old/make/Main.gmk 2016-04-15 11:49:25.944318710 +0200 +++ new/make/Main.gmk 2016-04-15 11:49:25.856315026 +0200 @@ -385,20 +385,22 @@ build-test-lib: +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk) -# Builds the failure handler jtreg extension -build-test-failure-handler: +ifeq ($(BUILD_FAILURE_HANDLER), true) + # Builds the failure handler jtreg extension + build-test-failure-handler: +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \ -f BuildFailureHandler.gmk build) -# Runs the tests for the failure handler jtreg extension -test-failure-handler: + # Runs the tests for the failure handler jtreg extension + test-failure-handler: +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \ -f BuildFailureHandler.gmk test) -# Copies the failure handler jtreg extension into the test image -test-image-failure-handler: + # Copies the failure handler jtreg extension into the test image + test-image-failure-handler: +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \ -f BuildFailureHandler.gmk images) +endif ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \ test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \