HBASE-23228 Allow for jdk8 specific modules on branch-1 in precommit/nightly testing (#804)

Signed-off-by: Josh Elser <elserj@apache.org>
This commit is contained in:
Sean Busbey 2019-11-08 10:07:24 -06:00 committed by GitHub
parent 2c1d500828
commit d5dcc090c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 1 deletions

View File

@ -132,6 +132,8 @@ function personality_modules
local repostatus=$1 local repostatus=$1
local testtype=$2 local testtype=$2
local extra="" local extra=""
local branch1jdk8=()
local jdk8module=""
local MODULES=("${CHANGED_MODULES[@]}") local MODULES=("${CHANGED_MODULES[@]}")
yetus_info "Personality: ${repostatus} ${testtype}" yetus_info "Personality: ${repostatus} ${testtype}"
@ -170,6 +172,21 @@ function personality_modules
return return
fi 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 if [[ ${testtype} == findbugs ]]; then
# Run findbugs on each module individually to diff pre-patch and post-patch results and # Run findbugs on each module individually to diff pre-patch and post-patch results and
# report new warnings for changed modules only. # report new warnings for changed modules only.
@ -190,7 +207,8 @@ function personality_modules
return return
fi fi
if [[ ${testtype} == compile ]] && [[ "${SKIP_ERRORPRONE}" != "true" ]]; then if [[ ${testtype} == compile ]] && [[ "${SKIP_ERRORPRONE}" != "true" ]] &&
[[ "${PATCH_BRANCH}" != branch-1* ]] ; then
extra="${extra} -PerrorProne" extra="${extra} -PerrorProne"
fi fi