From f76ed3485964b5ec5ed003ba91cb5160f3ddd599 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Thu, 14 Jun 2018 13:00:08 -0500 Subject: [PATCH 1/2] HBASE-20733 QABot should run checkstyle tests if the checkstyle configs change --- dev-support/hbase-personality.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index 2c6e4a8089..b277d68efe 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -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} @@ -665,6 +672,24 @@ function mvnsite_filefilter fi } +## @description hbase custom build checkstyle when configs change. +## @audience private +## @stability evolving +## @param filename +function checkstyle_filefilter +{ + local filename=$1 + + if [[ ${BUILDTOOL} = maven ]]; then + if [[ ${filename} =~ \.java$ ]] || \ + [[ ${filename} =~ checkstyle.*\.xml ]]; then + yetus_debug "tests/checkstyle: ${filename}" + add_test checkstyle + return 0 + 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 -- 2.16.1 From 179061bdacf4c851480a6c9f72103fe7605805d0 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Thu, 14 Jun 2018 13:03:10 -0500 Subject: [PATCH 2/2] WIP to cause checkstyle to run. --- hbase-checkstyle/src/main/resources/hbase/checkstyle.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml b/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml index 7ad797cf1f..caa9f461de 100644 --- a/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml +++ b/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml @@ -28,6 +28,9 @@ 'mvn package'. If you are interested in the full story, see https://issues.apache.org/jira/browse/HBASE-6795. + + + --> -- 2.16.1