From 82037ee3f2697c50de6afd744789ff69e45234a0 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Fri, 8 Nov 2019 10:07:24 -0600 Subject: [PATCH] HBASE-23228 Allow for jdk8 specific modules on branch-1 in precommit/nightly testing (#804) Signed-off-by: Josh Elser --- dev-support/hbase-personality.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index 84b90be83d4..655c2042215 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -132,6 +132,8 @@ function personality_modules local repostatus=$1 local testtype=$2 local extra="" + local branch1jdk8=() + local jdk8module="" local MODULES=("${CHANGED_MODULES[@]}") yetus_info "Personality: ${repostatus} ${testtype}" @@ -169,6 +171,21 @@ function personality_modules return fi + # This list should include any modules that require jdk8. Maven should be configured to only + # include them when a proper JDK is in use, but that doesn' work if we specifically ask for the + # module to build as yetus does if something changes in the module. Rather than try to + # figure out what jdk is in use so we can duplicate the module activation logic, just + # build at the top level if anything changes in one of these modules and let maven sort it out. + branch1jdk8=(hbase-error-prone hbase-tinylfu-blockcache) + if [[ "${PATCH_BRANCH}" = branch-1* ]]; then + for jdk8module in "${branch1jdk8[@]}"; do + if [[ "${MODULES[*]}" =~ ${jdk8module} ]]; then + MODULES=(.) + break + fi + done + fi + if [[ ${testtype} == findbugs ]]; then # Run findbugs on each module individually to diff pre-patch and post-patch results and # report new warnings for changed modules only. @@ -189,7 +206,8 @@ function personality_modules return fi - if [[ ${testtype} == compile ]] && [[ "${SKIP_ERRORPRONE}" != "true" ]]; then + if [[ ${testtype} == compile ]] && [[ "${SKIP_ERRORPRONE}" != "true" ]] && + [[ "${PATCH_BRANCH}" != branch-1* ]] ; then extra="${extra} -PerrorProne" fi