Return-Path: X-Original-To: apmail-yetus-commits-archive@minotaur.apache.org Delivered-To: apmail-yetus-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AAE21189E8 for ; Thu, 5 Nov 2015 20:35:49 +0000 (UTC) Received: (qmail 91411 invoked by uid 500); 5 Nov 2015 20:35:49 -0000 Delivered-To: apmail-yetus-commits-archive@yetus.apache.org Received: (qmail 91355 invoked by uid 500); 5 Nov 2015 20:35:49 -0000 Mailing-List: contact commits-help@yetus.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@yetus.apache.org Delivered-To: mailing list commits@yetus.apache.org Received: (qmail 91337 invoked by uid 99); 5 Nov 2015 20:35:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Nov 2015 20:35:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5F377E390B; Thu, 5 Nov 2015 20:35:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aw@apache.org To: commits@yetus.apache.org Message-Id: <75751d87085b4cdda5e2016369394ebd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: yetus git commit: YETUS-23. convertXmlToText keeps failing (trial patch #1) Date: Thu, 5 Nov 2015 20:35:49 +0000 (UTC) Repository: yetus Updated Branches: refs/heads/YETUS-83 e8bd3ad1b -> ee5baeb74 YETUS-23. convertXmlToText keeps failing (trial patch #1) Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/ee5baeb7 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/ee5baeb7 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/ee5baeb7 Branch: refs/heads/YETUS-83 Commit: ee5baeb74d4f3792c6b0d09cf7acbdae98e5d9eb Parents: e8bd3ad Author: Allen Wittenauer Authored: Thu Oct 29 23:28:07 2015 -0700 Committer: Allen Wittenauer Committed: Thu Nov 5 12:35:31 2015 -0800 ---------------------------------------------------------------------- precommit/test-patch.d/findbugs.sh | 72 ++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/ee5baeb7/precommit/test-patch.d/findbugs.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/findbugs.sh b/precommit/test-patch.d/findbugs.sh index ae18893..42d59fb 100755 --- a/precommit/test-patch.d/findbugs.sh +++ b/precommit/test-patch.d/findbugs.sh @@ -184,12 +184,13 @@ function findbugs_runner ## @return 1 on failure function findbugs_preapply { - local fn - local module - local i=0 - local warnings_file - local module_findbugs_warnings - local result=0 + declare fn + declare module + declare modindex=0 + declare warnings_file + declare module_findbugs_warnings + declare result=0 + declare msg verify_needed_test findbugs @@ -212,35 +213,39 @@ function findbugs_preapply return 0 fi - if [[ "${FINDBUGS_WARNINGS_FAIL_PRECHECK}" == "true" ]]; then - until [[ $i -eq ${#MODULE[@]} ]]; do - if [[ ${MODULE_STATUS[${i}]} == -1 ]]; then - ((result=result+1)) - ((i=i+1)) - continue - fi - module=${MODULE[${i}]} - start_clock - offset_clock "${MODULE_STATUS_TIMER[${i}]}" - fn=$(module_file_fragment "${module}") - warnings_file="${PATCH_DIR}/branch-findbugs-${fn}-warnings" - # shellcheck disable=SC2016 - module_findbugs_warnings=$("${FINDBUGS_HOME}/bin/filterBugs" -first \ - "${PATCH_BRANCH}" \ - "${warnings_file}.xml" \ - "${warnings_file}.xml" \ - | ${AWK} '{print $1}') - - if [[ ${module_findbugs_warnings} -gt 0 ]] ; then - module_status ${i} -1 "branch-findbugs-${fn}.html" "${module} in ${PATCH_BRANCH} cannot run convertXmlToText from findbugs" + until [[ ${modindex} -eq ${#MODULE[@]} ]]; do + if [[ ${MODULE_STATUS[${modindex}]} == -1 ]]; then + ((result=result+1)) + ((modindex=modindex+1)) + continue + fi + module=${MODULE[${modindex}]} + start_clock + offset_clock "${MODULE_STATUS_TIMER[${modindex}]}" + fn=$(module_file_fragment "${module}") + warnings_file="${PATCH_DIR}/branch-findbugs-${fn}-warnings" + # shellcheck disable=SC2016 + module_findbugs_warnings=$("${FINDBUGS_HOME}/bin/filterBugs" -first \ + "${PATCH_BRANCH}" \ + "${warnings_file}.xml" \ + "${warnings_file}.xml" \ + | ${AWK} '{print $1}') + + if [[ ${module_findbugs_warnings} -gt 0 ]] ; then + msg="${module} in ${PATCH_BRANCH} has ${module_findbugs_warnings} extant Findbugs warnings." + if [[ "${FINDBUGS_WARNINGS_FAIL_PRECHECK}" == "true" ]]; then + module_status ${modindex} -1 "branch-findbugs-${fn}-warnings.html" "${msg}" ((result=result+1)) + else + module_status ${modindex} 0 "branch-findbugs-${fn}-warnings.html" "${msg}" fi - savestop=$(stop_clock) - MODULE_STATUS_TIMER[${i}]=${savestop} - ((i=i+1)) - done - modules_messages branch findbugs true - fi + fi + + savestop=$(stop_clock) + MODULE_STATUS_TIMER[${modindex}]=${savestop} + ((modindex=modindex+1)) + done + modules_messages branch findbugs true if [[ ${result} != 0 ]]; then return 1 @@ -376,6 +381,7 @@ function findbugs_postinstall if [[ ${new_findbugs_warnings} -gt 0 ]] ; then populate_test_table FindBugs "module:${module}" + #shellcheck disable=SC2162 while read line; do firstpart=$(echo "${line}" | cut -f2 -d:) secondpart=$(echo "${line}" | cut -f9- -d' ')