diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 23efb1302b4..1f6823c2be4 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2023, 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 @@ -126,7 +126,6 @@ jobs: --with-boot-jdk=${{ steps.bootjdk.outputs.path }} --with-jtreg=${{ steps.jtreg.outputs.path }} --with-gtest=${{ steps.gtest.outputs.path }} - --enable-jtreg-failure-handler --with-zlib=system --with-jmod-compress=zip-1 ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 55851907769..cbe501ea606 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2023, 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 @@ -101,7 +101,6 @@ jobs: --with-boot-jdk=${{ steps.bootjdk.outputs.path }} --with-jtreg=${{ steps.jtreg.outputs.path }} --with-gtest=${{ steps.gtest.outputs.path }} - --enable-jtreg-failure-handler --with-zlib=system --with-jmod-compress=zip-1 ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 8973219f0ab..95ef72b31eb 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2022, 2023, 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 @@ -114,7 +114,6 @@ jobs: --with-boot-jdk=${{ steps.bootjdk.outputs.path }} --with-jtreg=${{ steps.jtreg.outputs.path }} --with-gtest=${{ steps.gtest.outputs.path }} - --enable-jtreg-failure-handler --with-msvc-toolset-version=${{ inputs.msvc-toolset-version }} --with-jmod-compress=zip-1 ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index a0472e8cb81..7e8c7bb8bed 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2023, 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 @@ -101,6 +101,29 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS], AUTOCONF_DIR=$TOPDIR/make/autoconf ]) +############################################################################### +# Setup what kind of build environment type we have (CI or local developer) +AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV], +[ + if test "x$CI" = "xtrue"; then + DEFAULT_BUILD_ENV="ci" + AC_MSG_NOTICE([CI environment variable set to $CI]) + else + DEFAULT_BUILD_ENV="dev" + fi + + UTIL_ARG_WITH(NAME: build-env, TYPE: literal, + RESULT: BUILD_ENV, + VALID_VALUES: [auto dev ci], DEFAULT: auto, + CHECKING_MSG: [for build environment type], + DESC: [select build environment type (affects certain default values)], + IF_AUTO: [ + RESULT=$DEFAULT_BUILD_ENV + ] + ) + AC_SUBST(BUILD_ENV) +]) + ############################################################################### # Evaluates platform specific overrides for devkit variables. # $1: Name of variable diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac index 05f2a51a7ed..df50899a830 100644 --- a/make/autoconf/configure.ac +++ b/make/autoconf/configure.ac @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2023, 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 @@ -86,6 +86,7 @@ PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET # Continue setting up basic stuff. Most remaining code require fundamental tools. BASIC_SETUP_PATHS +BASIC_SETUP_BUILD_ENV # Check if it's a pure open build or if custom sources are to be used. JDKOPT_SETUP_OPEN_OR_CUSTOM diff --git a/make/autoconf/lib-tests.m4 b/make/autoconf/lib-tests.m4 index 9d3080d2050..117a0215b1b 100644 --- a/make/autoconf/lib-tests.m4 +++ b/make/autoconf/lib-tests.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2023, 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 @@ -285,10 +285,16 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB], # AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER], [ - UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto, + if test "x$BUILD_ENV" = "xci"; then + BUILD_FAILURE_HANDLER_DEFAULT=auto + else + BUILD_FAILURE_HANDLER_DEFAULT=false + fi + + UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: $BUILD_FAILURE_HANDLER_DEFAULT, RESULT: BUILD_FAILURE_HANDLER, DESC: [enable building of the jtreg failure handler], - DEFAULT_DESC: [enabled if jtreg is present], + DEFAULT_DESC: [enabled if jtreg is present and build env is CI], CHECKING_MSG: [if the jtreg failure handler should be built], CHECK_AVAILABLE: [ AC_MSG_CHECKING([if the jtreg failure handler is available]) diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index 064dd7bbd32..686ccdeeae9 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -249,7 +249,7 @@ var getJibProfilesCommon = function (input, data) { common.main_profile_base = { dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"], default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"], - configure_args: concat("--enable-jtreg-failure-handler", + configure_args: concat( "--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK", "--disable-manpages", "--disable-jvm-feature-shenandoahgc",