Repository: yetus Updated Branches: refs/heads/master 358b0eab7 -> 06c76a1bb
YETUS-138. Skipping maven poms that don't package causes testing holes Signed-off-by: Sean Busbey <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/06c76a1b Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/06c76a1b Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/06c76a1b Branch: refs/heads/master Commit: 06c76a1bb79eff7bb0d8634193905a0d5afd6fdf Parents: 358b0ea Author: Allen Wittenauer <[email protected]> Authored: Tue Oct 27 14:51:30 2015 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Sun Nov 1 11:31:36 2015 -0800 ---------------------------------------------------------------------- .../documentation/latest/precommit-advanced.md | 4 +-- precommit/test-patch.sh | 27 +++++--------------- 2 files changed, 7 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/06c76a1b/asf-site-src/source/documentation/latest/precommit-advanced.md ---------------------------------------------------------------------- diff --git a/asf-site-src/source/documentation/latest/precommit-advanced.md b/asf-site-src/source/documentation/latest/precommit-advanced.md index f68db7a..638f7d2 100644 --- a/asf-site-src/source/documentation/latest/precommit-advanced.md +++ b/asf-site-src/source/documentation/latest/precommit-advanced.md @@ -226,9 +226,7 @@ There are a handful of extremely important system variables that make life easie * CHANGED\_FILES is a list of all files that appear to be added, deleted, or modified in the patch. -* CHANGED\_UNFILTERED\_MODULES is a list of all modules that house all of the CHANGED\_FILES. Be aware that the root of the source tree is reported as '.'. - -* CHANGED\_MODULES reports which modules that appear to have source code in them. +* CHANGED\_MODULES is a list of all modules that house all of the CHANGED\_FILES. Be aware that the root of the source tree is reported as '.'. * GITHUB\_REPO is to help test-patch when talking to Github. If test-patch is given just a number on the command line, it will default to using this repo to determine the pull request. http://git-wip-us.apache.org/repos/asf/yetus/blob/06c76a1b/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index fb1b4d0..6b398ad 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -70,8 +70,7 @@ function setup_defaults # shellcheck disable=SC2034 CHANGED_MODULES="" - # shellcheck disable=SC2034 - CHANGED_UNFILTERED_MODULES="" + # shellcheck disable=SC2034 CHANGED_UNION_MODULES="" USER_MODULE_LIST="" @@ -320,6 +319,8 @@ function finish_footer_table { local maxmem + add_footer_table "modules" "C: ${CHANGED_MODULES} U: ${CHANGED_UNION_MODULES}" + # `sort | head` can cause a broken pipe error, but we can ignore it just like compute_gitdiff. # shellcheck disable=SC2016,SC2086 maxmem=$(find "${PATCH_DIR}" -type f -exec ${AWK} 'match($0, /^\[INFO\] Final Memory: [0-9]+/) @@ -997,7 +998,7 @@ function module_skipdir ## @audience private ## @stability stable ## @replaceable no -## @return None; sets ${CHANGED_MODULES} and ${CHANGED_UNFILTERED_MODULES} +## @return None; sets ${CHANGED_MODULES} function find_changed_modules { local i @@ -1044,24 +1045,8 @@ function find_changed_modules fi #shellcheck disable=SC2086,SC2034 - CHANGED_UNFILTERED_MODULES=$(echo ${builddirs} ${USER_MODULE_LIST} | tr ' ' '\n' | sort -u) - #shellcheck disable=SC2086,SC2116 - CHANGED_UNFILTERED_MODULES=$(echo ${CHANGED_UNFILTERED_MODULES}) - - if [[ ${BUILDTOOL} = maven ]]; then - # Filter out modules without code - for module in ${builddirs}; do - ${GREP} "<packaging>pom</packaging>" "${module}/pom.xml" > /dev/null - if [[ "$?" != 0 ]]; then - buildmods="${buildmods} ${module}" - fi - done - else - buildmods=${CHANGED_UNFILTERED_MODULES} - fi - - #shellcheck disable=SC2086,SC2034 - CHANGED_MODULES=$(echo ${buildmods} ${USER_MODULE_LIST} | tr ' ' '\n' | sort -u) + CHANGED_MODULES=$(echo ${builddirs} ${USER_MODULE_LIST} | tr ' ' '\n' | sort -u) + CHANGED_MODULES=$(echo ${CHANGED_MODULES} ${USER_MODULE_LIST} | tr ' ' '\n' | sort -u) # turn it back into a list so that anyone printing doesn't # generate multiline output
