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 2015/11/12 17:02:56 UTC

[1/2] yetus git commit: YETUS-23. findbugs pre-apply check failures gives error as if convertXmlToText invocation fails

Repository: yetus
Updated Branches:
  refs/heads/master a2f7e4dc8 -> 5f446b1d2


YETUS-23. findbugs pre-apply check failures gives error as if convertXmlToText invocation fails

Signed-off-by: Sean Busbey <bu...@apache.org>


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

Branch: refs/heads/master
Commit: 2a6ac915aeb2bcea0b30cbe8a73900027dfa872a
Parents: a2f7e4d
Author: Allen Wittenauer <aw...@apache.org>
Authored: Thu Oct 29 23:28:07 2015 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Thu Nov 12 07:50:07 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/2a6ac915/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' ')


[2/2] yetus git commit: YETUS-157. build tools should force compile if their control file is patched

Posted by aw...@apache.org.
YETUS-157. build tools should force compile if their control file is patched

Signed-off-by: Sean Busbey <bu...@apache.org>


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

Branch: refs/heads/master
Commit: 5f446b1d2dd3f353bea5e7455b04d14577ef37d6
Parents: 2a6ac91
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Nov 2 14:45:19 2015 -0800
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Thu Nov 12 07:52:11 2015 -0800

----------------------------------------------------------------------
 precommit/test-patch.d/ant.sh    | 11 +++++++++++
 precommit/test-patch.d/gradle.sh | 13 +++++++++++++
 precommit/test-patch.d/maven.sh  | 18 ++++++++++++++----
 precommit/test-patch.sh          |  2 +-
 4 files changed, 39 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/5f446b1d/precommit/test-patch.d/ant.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/ant.sh b/precommit/test-patch.d/ant.sh
index 6fc9e2f..31c5881 100755
--- a/precommit/test-patch.d/ant.sh
+++ b/precommit/test-patch.d/ant.sh
@@ -61,6 +61,17 @@ function ant_initialize
   fi
 }
 
+function ant_filefilter
+{
+  declare filename=$1
+
+  if [[ ${filename} =~ build\.xml$
+     || ${filename} =~ ivy\.xml$ ]]; then
+    yetus_debug "tests/compile: ${filename}"
+    add_test compile
+  fi
+}
+
 function ant_buildfile
 {
   echo "build.xml"

http://git-wip-us.apache.org/repos/asf/yetus/blob/5f446b1d/precommit/test-patch.d/gradle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/gradle.sh b/precommit/test-patch.d/gradle.sh
index 2a5fb42..4a4e4d2 100755
--- a/precommit/test-patch.d/gradle.sh
+++ b/precommit/test-patch.d/gradle.sh
@@ -67,6 +67,19 @@ function gradle_initialize
   fi
 }
 
+function gradle_filefilter
+{
+  declare filename=$1
+
+  if [[ ${filename} =~ build\.gradle$
+     || ${filename} =~ gradlew$
+     || ${filename} =~ gradle\.properties$
+     || ${filename} =~ wrapper\.gradle$ ]]; then
+    yetus_debug "tests/compile: ${filename}"
+    add_test compile
+  fi
+}
+
 function gradle_buildfile
 {
   echo "gradlew"

http://git-wip-us.apache.org/repos/asf/yetus/blob/5f446b1d/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 43e2b0b..9deffb5 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -151,6 +151,16 @@ function maven_precheck
   fi
 }
 
+function maven_filefilter
+{
+  declare filename=$1
+
+  if [[ ${filename} =~ pom\.xml$ ]]; then
+    yetus_debug "tests/compile: ${filename}"
+    add_test compile
+  fi
+}
+
 function maven_buildfile
 {
   echo "pom.xml"
@@ -167,10 +177,10 @@ function mvnsite_filefilter
 
   if [[ ${BUILDTOOL} = maven ]]; then
     if [[ ${filename} =~ src/site ]]; then
-       yetus_debug "tests/mvnsite: ${filename}"
-       add_test mvnsite
-     fi
-   fi
+      yetus_debug "tests/mvnsite: ${filename}"
+      add_test mvnsite
+    fi
+  fi
 }
 
 function maven_modules_worker

http://git-wip-us.apache.org/repos/asf/yetus/blob/5f446b1d/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 5cd5912..72ca097 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -1323,7 +1323,7 @@ function determine_needed_tests
     yetus_debug "Determining needed tests for ${i}"
     personality_file_tests "${i}"
 
-    for plugin in ${TESTTYPES}; do
+    for plugin in ${TESTTYPES} ${BUILDTOOL}; do
       if declare -f ${plugin}_filefilter >/dev/null 2>&1; then
         "${plugin}_filefilter" "${i}"
       fi