HBASE-20733 QABot should run checkstyle tests if the checkstyle configs change
Signed-off-by: Mike Drob <mdrob@apache.org>
This commit is contained in:
parent
0b28155d27
commit
04db900772
|
@ -67,10 +67,12 @@ function personality_globals
|
|||
|
||||
# Yetus 0.7.0 enforces limits. Default proclimit is 1000.
|
||||
# Up it. See HBASE-19902 for how we arrived at this number.
|
||||
#shellcheck disable=SC2034
|
||||
PROCLIMIT=10000
|
||||
|
||||
# Set docker container to run with 20g. Default is 4g in yetus.
|
||||
# See HBASE-19902 for how we arrived at 20g.
|
||||
#shellcheck disable=SC2034
|
||||
DOCKERMEMLIMIT=20g
|
||||
}
|
||||
|
||||
|
@ -106,7 +108,7 @@ function personality_modules
|
|||
local repostatus=$1
|
||||
local testtype=$2
|
||||
local extra=""
|
||||
local MODULES=(${CHANGED_MODULES[@]})
|
||||
local MODULES=("${CHANGED_MODULES[@]}")
|
||||
|
||||
yetus_info "Personality: ${repostatus} ${testtype}"
|
||||
|
||||
|
@ -130,6 +132,11 @@ function personality_modules
|
|||
MODULES=(.)
|
||||
fi
|
||||
|
||||
# If the checkstyle configs change, check everything.
|
||||
if [[ "${testtype}" == checkstyle ]] && [[ "${MODULES[*]}" =~ hbase-checkstyle ]]; then
|
||||
MODULES=(.)
|
||||
fi
|
||||
|
||||
if [[ ${testtype} == mvninstall ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
personality_enqueue_module . ${extra}
|
||||
|
@ -188,17 +195,32 @@ function personality_modules
|
|||
function personality_file_tests
|
||||
{
|
||||
local filename=$1
|
||||
yetus_debug "HBase specific personality_file_tests"
|
||||
# If the change is to the refguide, then we don't need any builtin yetus tests
|
||||
# the refguide test (below) will suffice for coverage.
|
||||
if [[ ${filename} =~ src/main/asciidoc ]] ||
|
||||
[[ ${filename} =~ src/main/xslt ]]; then
|
||||
yetus_debug "Skipping builtin yetus checks for ${filename}. refguide test should pick it up."
|
||||
else
|
||||
# If we change our asciidoc, rebuild mvnsite
|
||||
if [[ ${BUILDTOOL} = maven ]]; then
|
||||
if [[ ${filename} =~ src/site || ${filename} =~ src/main/asciidoc ]]; then
|
||||
yetus_debug "tests/mvnsite: ${filename}"
|
||||
add_test mvnsite
|
||||
fi
|
||||
fi
|
||||
# If we change checkstyle configs, run checkstyle
|
||||
if [[ ${filename} =~ checkstyle.*\.xml ]]; then
|
||||
yetus_debug "tests/checkstyle: ${filename}"
|
||||
add_test checkstyle
|
||||
fi
|
||||
# fallback to checking which tests based on what yetus would do by default
|
||||
elif declare -f "${BUILDTOOL}_builtin_personality_file_tests" >/dev/null; then
|
||||
if declare -f "${BUILDTOOL}_builtin_personality_file_tests" >/dev/null; then
|
||||
"${BUILDTOOL}_builtin_personality_file_tests" "${filename}"
|
||||
elif declare -f builtin_personality_file_tests >/dev/null; then
|
||||
builtin_personality_file_tests "${filename}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
## @description Uses relevant include/exclude env variable to fetch list of included/excluded
|
||||
|
@ -648,23 +670,6 @@ function hbaseanti_patchfile
|
|||
return 0
|
||||
}
|
||||
|
||||
|
||||
## @description hbase custom mvnsite file filter. See HBASE-15042
|
||||
## @audience private
|
||||
## @stability evolving
|
||||
## @param filename
|
||||
function mvnsite_filefilter
|
||||
{
|
||||
local filename=$1
|
||||
|
||||
if [[ ${BUILDTOOL} = maven ]]; then
|
||||
if [[ ${filename} =~ src/site || ${filename} =~ src/main/asciidoc ]]; then
|
||||
yetus_debug "tests/mvnsite: ${filename}"
|
||||
add_test mvnsite
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
## This is named so that yetus will check us right after running tests.
|
||||
## Essentially, we check for normal failures and then we look for zombies.
|
||||
#function hbase_unit_logfilter
|
||||
|
|
Loading…
Reference in New Issue