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.
|
# Yetus 0.7.0 enforces limits. Default proclimit is 1000.
|
||||||
# Up it. See HBASE-19902 for how we arrived at this number.
|
# Up it. See HBASE-19902 for how we arrived at this number.
|
||||||
|
#shellcheck disable=SC2034
|
||||||
PROCLIMIT=10000
|
PROCLIMIT=10000
|
||||||
|
|
||||||
# Set docker container to run with 20g. Default is 4g in yetus.
|
# Set docker container to run with 20g. Default is 4g in yetus.
|
||||||
# See HBASE-19902 for how we arrived at 20g.
|
# See HBASE-19902 for how we arrived at 20g.
|
||||||
|
#shellcheck disable=SC2034
|
||||||
DOCKERMEMLIMIT=20g
|
DOCKERMEMLIMIT=20g
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +108,7 @@ function personality_modules
|
||||||
local repostatus=$1
|
local repostatus=$1
|
||||||
local testtype=$2
|
local testtype=$2
|
||||||
local extra=""
|
local extra=""
|
||||||
local MODULES=(${CHANGED_MODULES[@]})
|
local MODULES=("${CHANGED_MODULES[@]}")
|
||||||
|
|
||||||
yetus_info "Personality: ${repostatus} ${testtype}"
|
yetus_info "Personality: ${repostatus} ${testtype}"
|
||||||
|
|
||||||
|
@ -130,6 +132,11 @@ function personality_modules
|
||||||
MODULES=(.)
|
MODULES=(.)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If the checkstyle configs change, check everything.
|
||||||
|
if [[ "${testtype}" == checkstyle ]] && [[ "${MODULES[*]}" =~ hbase-checkstyle ]]; then
|
||||||
|
MODULES=(.)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${testtype} == mvninstall ]]; then
|
if [[ ${testtype} == mvninstall ]]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
personality_enqueue_module . ${extra}
|
personality_enqueue_module . ${extra}
|
||||||
|
@ -188,17 +195,32 @@ function personality_modules
|
||||||
function personality_file_tests
|
function personality_file_tests
|
||||||
{
|
{
|
||||||
local filename=$1
|
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
|
# If the change is to the refguide, then we don't need any builtin yetus tests
|
||||||
# the refguide test (below) will suffice for coverage.
|
# the refguide test (below) will suffice for coverage.
|
||||||
if [[ ${filename} =~ src/main/asciidoc ]] ||
|
if [[ ${filename} =~ src/main/asciidoc ]] ||
|
||||||
[[ ${filename} =~ src/main/xslt ]]; then
|
[[ ${filename} =~ src/main/xslt ]]; then
|
||||||
yetus_debug "Skipping builtin yetus checks for ${filename}. refguide test should pick it up."
|
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
|
# 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}"
|
"${BUILDTOOL}_builtin_personality_file_tests" "${filename}"
|
||||||
elif declare -f builtin_personality_file_tests >/dev/null; then
|
elif declare -f builtin_personality_file_tests >/dev/null; then
|
||||||
builtin_personality_file_tests "${filename}"
|
builtin_personality_file_tests "${filename}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
## @description Uses relevant include/exclude env variable to fetch list of included/excluded
|
## @description Uses relevant include/exclude env variable to fetch list of included/excluded
|
||||||
|
@ -648,23 +670,6 @@ function hbaseanti_patchfile
|
||||||
return 0
|
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.
|
## 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.
|
## Essentially, we check for normal failures and then we look for zombies.
|
||||||
#function hbase_unit_logfilter
|
#function hbase_unit_logfilter
|
||||||
|
|
Loading…
Reference in New Issue