You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2014/12/24 02:04:39 UTC

tez git commit: TEZ-1889. Fix test-patch to provide correct findbugs report. (hitesh)

Repository: tez
Updated Branches:
  refs/heads/master 45a443166 -> 8343fc83f


TEZ-1889. Fix test-patch to provide correct findbugs report. (hitesh)


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

Branch: refs/heads/master
Commit: 8343fc83f924c7d9921a71d503daf8df22750d83
Parents: 45a4431
Author: Hitesh Shah <hi...@apache.org>
Authored: Tue Dec 23 17:03:34 2014 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Tue Dec 23 17:03:34 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt               |  1 +
 build-tools/test-patch.sh | 20 ++++++++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/8343fc83/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1165602..046c424 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Release 0.7.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1889. Fix test-patch to provide correct findbugs report.
   TEZ-1313. Setup pre-commit build to test submitted patches.
   TEZ-1856. Remove LocalOnFileSortedOutput, LocalMergedInput, LocalTaskOutputFiles.
 

http://git-wip-us.apache.org/repos/asf/tez/blob/8343fc83/build-tools/test-patch.sh
----------------------------------------------------------------------
diff --git a/build-tools/test-patch.sh b/build-tools/test-patch.sh
index b144621..a18bc0c 100755
--- a/build-tools/test-patch.sh
+++ b/build-tools/test-patch.sh
@@ -553,20 +553,24 @@ checkFindbugsWarnings () {
   for file in $(find $BASEDIR -name findbugsXml.xml)
   do
     relative_file=${file#$BASEDIR/} # strip leading $BASEDIR prefix
+    if [ ! $relative_file == "target/findbugsXml.xml" ]; then
+      module_suffix=${relative_file%/target/findbugsXml.xml} # strip trailing path
+      module_suffix=`basename ${module_suffix}`
+    fi
 
-    cp $file $PATCH_DIR/patchFindbugsWarnings.xml
+    cp $file $PATCH_DIR/patchFindbugsWarnings${module_suffix}.xml
     $FINDBUGS_HOME/bin/setBugDatabaseInfo -timestamp "01/01/2000" \
-      $PATCH_DIR/patchFindbugsWarnings.xml \
-      $PATCH_DIR/patchFindbugsWarnings.xml
-    newFindbugsWarnings=`$FINDBUGS_HOME/bin/filterBugs -first "01/01/2000" $PATCH_DIR/patchFindbugsWarnings.xml \
-      $PATCH_DIR/newPatchFindbugsWarnings.xml | $AWK '{print $1}'`
+      $PATCH_DIR/patchFindbugsWarnings${module_suffix}.xml \
+      $PATCH_DIR/patchFindbugsWarnings${module_suffix}.xml
+    newFindbugsWarnings=`$FINDBUGS_HOME/bin/filterBugs -first "01/01/2000" $PATCH_DIR/patchFindbugsWarnings${module_suffix}.xml \
+      $PATCH_DIR/newPatchFindbugsWarnings${module_suffix}.xml | $AWK '{print $1}'`
     echo "Found $newFindbugsWarnings Findbugs warnings ($file)"
     findbugsWarnings=$((findbugsWarnings+newFindbugsWarnings))
     $FINDBUGS_HOME/bin/convertXmlToText -html \
-      $PATCH_DIR/newPatchFindbugsWarnings.xml \
-      $PATCH_DIR/newPatchFindbugsWarnings.html
+      $PATCH_DIR/newPatchFindbugsWarnings${module_suffix}.xml \
+      $PATCH_DIR/newPatchFindbugsWarnings${module_suffix}.html
     if [[ $newFindbugsWarnings > 0 ]] ; then
-      JIRA_COMMENT_FOOTER="Findbugs warnings: $BUILD_URL/artifact/patchprocess/newPatchFindbugsWarnings.html
+      JIRA_COMMENT_FOOTER="Findbugs warnings: $BUILD_URL/artifact/patchprocess/newPatchFindbugsWarnings${module_suffix}.html
 $JIRA_COMMENT_FOOTER"
     fi
   done