You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2016/04/14 09:25:13 UTC

[18/20] yetus git commit: YETUS-354. findbugs in build driver has problems

YETUS-354. findbugs in build driver has problems

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/b7e48548
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/b7e48548
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/b7e48548

Branch: refs/heads/YETUS-156
Commit: b7e485487eea676f95dfd4b6b888506c841788e9
Parents: 98f0690
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Apr 11 10:45:18 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Thu Apr 14 00:24:45 2016 -0700

----------------------------------------------------------------------
 precommit/test-patch.d/findbugs.sh | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/b7e48548/precommit/test-patch.d/findbugs.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/findbugs.sh b/precommit/test-patch.d/findbugs.sh
index 152d85f..24ccc95 100755
--- a/precommit/test-patch.d/findbugs.sh
+++ b/precommit/test-patch.d/findbugs.sh
@@ -281,9 +281,19 @@ function findbugs_preapply
 
     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
+      if [[ "${FINDBUGS_WARNINGS_FAIL_PRECHECK}" = "true" ]]; then
         module_status ${modindex} -1 "branch-findbugs-${fn}-warnings.html" "${msg}"
         ((result=result+1))
+      elif [[ "${BUILDMODE}" = full ]]; then
+        module_status ${modindex} -1 "branch-findbugs-${fn}-warnings.html" "${msg}"
+        ((result=result+1))
+        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' ')
+          add_test_table "" "${firstpart}:${secondpart}"
+        done < <("${FINDBUGS_HOME}/bin/convertXmlToText" "${warnings_file}.xml")
       else
         module_status ${modindex} 0 "branch-findbugs-${fn}-warnings.html" "${msg}"
       fi
@@ -466,7 +476,7 @@ function findbugs_rebuild
 {
   declare repostatus=$1
 
-  if [[ "${repostatus}" = branch ]]; then
+  if [[ "${repostatus}" = branch || "${BUILDMODE}" = full ]]; then
     findbugs_preapply
   else
     findbugs_postinstall