浏览代码

HADOOP-11884. test-patch.sh should pull the real findbugs version (Kengo Seki via aw)

Allen Wittenauer 10 年之前
父节点
当前提交
182d86dac0
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 3 2
      dev-support/test-patch.sh
  2. 3 0
      hadoop-common-project/hadoop-common/CHANGES.txt

+ 3 - 2
dev-support/test-patch.sh

@@ -1859,8 +1859,6 @@ function check_findbugs
     return 1
     return 1
   fi
   fi
 
 
-  findbugs_version=$("${FINDBUGS_HOME}/bin/findbugs" -version)
-
   for module in ${modules}
   for module in ${modules}
   do
   do
     pushd "${module}" >/dev/null
     pushd "${module}" >/dev/null
@@ -1872,6 +1870,9 @@ function check_findbugs
     popd >/dev/null
     popd >/dev/null
   done
   done
 
 
+  #shellcheck disable=SC2016
+  findbugs_version=$(${AWK} 'match($0, /findbugs-maven-plugin:[^:]*:findbugs/) { print substr($0, RSTART + 22, RLENGTH - 31); exit }' "${PATCH_DIR}/patchFindBugsOutput${module_suffix}.txt")
+
   if [[ ${rc} -ne 0 ]]; then
   if [[ ${rc} -ne 0 ]]; then
     add_jira_table -1 findbugs "The patch appears to cause Findbugs (version ${findbugs_version}) to fail."
     add_jira_table -1 findbugs "The patch appears to cause Findbugs (version ${findbugs_version}) to fail."
     return 1
     return 1

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -575,6 +575,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11939. Deprecate DistCpV1 and Logalyzer.
     HADOOP-11939. Deprecate DistCpV1 and Logalyzer.
     (Brahma Reddy Battula via aajisaka)
     (Brahma Reddy Battula via aajisaka)
 
 
+    HADOOP-11884. test-patch.sh should pull the real findbugs version
+    (Kengo Seki via aw)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
     HADOOP-11785. Reduce the number of listStatus operation in distcp
     HADOOP-11785. Reduce the number of listStatus operation in distcp