From 3c43eed2759014adf024e9ef8365d083d6e576c3 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Fri, 20 Oct 2017 11:08:35 -0500 Subject: [PATCH 1/2] HBASE-19060 precommit plugin test 'hadoopcheck' should only run when java or maven files change. --- dev-support/hbase-personality.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index 27c2169b8c..88e773e286 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -218,7 +218,7 @@ function hadoopcheck_filefilter { local filename=$1 - if [[ ${filename} =~ \.java$ ]]; then + if [[ ${filename} =~ \.java$ ]] || [[ ${filename} =~ pom.xml$ ]]; then add_test hadoopcheck fi } @@ -241,6 +241,10 @@ function hadoopcheck_rebuild return 0 fi + if ! verify_needed_test hadoopcheck; then + return 0 + fi + big_console_header "Compiling against various Hadoop versions" # All supported Hadoop versions that we want to test the compilation with @@ -317,7 +321,7 @@ function hbaseprotoc_filefilter fi } -## @description hadoopcheck test +## @description check hbase proto compilation ## @audience private ## @stability evolving ## @param repostatus -- 2.14.1 From f28fd52a562ad903c0a697783e7f52266b779982 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Fri, 20 Oct 2017 14:39:03 -0500 Subject: [PATCH 2/2] HBASE-19039 refactor shadedjars test to only run on java changes. --- dev-support/hbase-personality.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh index 88e773e286..dcf4f7a0b4 100755 --- a/dev-support/hbase-personality.sh +++ b/dev-support/hbase-personality.sh @@ -171,12 +171,19 @@ function shadedjars_initialize { yetus_debug "initializing shaded client checks." maven_add_install shadedjars - add_test shadedjars } -function shadedjars_clean +## @description only run the test if java changes. +## @audience private +## @stability evolving +## @param filename +function shadedjars_filefilter { - "${MAVEN}" "${MAVEN_ARGS[@]}" clean -fae -pl hbase_shaded/hbase-shaded-check-invariants -am -Prelease + local filename=$1 + + if [[ ${filename} =~ \.java$ ]] || [[ ${filename} =~ pom.xml$ ]]; then + add_test shadedjars + fi } ## @description test the shaded client artifacts @@ -188,6 +195,10 @@ function shadedjars_rebuild local repostatus=$1 local logfile="${PATCH_DIR}/${repostatus}-shadedjars.txt" + if ! verify_needed_test shadedjars; then + return 0 + fi + big_console_header "Checking shaded client builds on ${repostatus}" echo_and_redirect "${logfile}" \ -- 2.14.1