From a694990f234b7f3a98c265344331e9100ef21690 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Fri, 15 Apr 2016 18:07:34 +0200 Subject: [PATCH] 8154292: jdk9-dev: All SE builds failed on 2016-04-14 Reviewed-by: alanb --- common/autoconf/configure.ac | 1 + common/autoconf/generated-configure.sh | 55 +++++++++++++++++++++++++- common/autoconf/jdk-options.m4 | 41 ++++++++++++++++++- common/autoconf/spec.gmk.in | 2 + common/conf/jib-profiles.js | 2 +- make/Main.gmk | 14 ++++--- 6 files changed, 106 insertions(+), 9 deletions(-) diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac index c7bab7c53a8..1f0c414e102 100644 --- a/common/autoconf/configure.ac +++ b/common/autoconf/configure.ac @@ -227,6 +227,7 @@ LIB_SETUP_LIBRARIES HOTSPOT_SETUP_BUILD_TWEAKS JDKOPT_DETECT_INTREE_EC +JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER ############################################################################### # diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 5fc5d22c2c6..39c4337b244 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -650,6 +650,7 @@ TEST_JOBS JOBS MEMORY_SIZE NUM_CORES +BUILD_FAILURE_HANDLER ENABLE_INTREE_EC HOTSPOT_MAKE_ARGS LIBZIP_CAN_USE_MMAP @@ -1172,6 +1173,7 @@ with_lcms with_dxsdk with_dxsdk_lib with_dxsdk_include +enable_jtreg_failure_handler with_num_cores with_memory_size with_jobs @@ -1940,6 +1942,12 @@ Optional Features: 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 @@ pkgadd_help() { # +################################################################################ +# +# 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 @@ 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=1460464859 +DATE_WHEN_GENERATED=1460713327 ############################################################################### # @@ -62037,6 +62051,45 @@ $as_echo "no" >&6; } + # 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 + + + + ############################################################################### # # Configure parts of the build that only affect the build performance, diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 index 3c677d8adde..4937c6b1ad1 100644 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -408,7 +408,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD], ################################################################################ # -# jlink options. +# jlink options. # We always keep packaged modules in JDK image. # AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS], @@ -433,3 +433,42 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS], 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) +]) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 0af5e6d0e2d..3b6cbd5cbaa 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -260,6 +260,8 @@ HOTSPOT_DIST=@HOTSPOT_DIST@ 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@ diff --git a/common/conf/jib-profiles.js b/common/conf/jib-profiles.js index a3372cf3fe2..d6f86f2e2ac 100644 --- a/common/conf/jib-profiles.js +++ b/common/conf/jib-profiles.js @@ -214,7 +214,7 @@ var getJibProfiles = function (input) { 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"], diff --git a/make/Main.gmk b/make/Main.gmk index 2b55611c90e..2bb6bab68bf 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -388,20 +388,22 @@ test-image-jdk-jtreg-native: 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 \