You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ni...@apache.org on 2008/01/28 04:59:17 UTC
svn commit: r615723 - /hadoop/core/nightly/hudsonBuildHadoopPatch.sh
Author: nigel
Date: Sun Jan 27 19:59:17 2008
New Revision: 615723
URL: http://svn.apache.org/viewvc?rev=615723&view=rev
Log:
fixed a bug that was double counting some javac warnings on trunk builds, but not on the patch builds
Modified:
hadoop/core/nightly/hudsonBuildHadoopPatch.sh
Modified: hadoop/core/nightly/hudsonBuildHadoopPatch.sh
URL: http://svn.apache.org/viewvc/hadoop/core/nightly/hudsonBuildHadoopPatch.sh?rev=615723&r1=615722&r2=615723&view=diff
==============================================================================
--- hadoop/core/nightly/hudsonBuildHadoopPatch.sh (original)
+++ hadoop/core/nightly/hudsonBuildHadoopPatch.sh Sun Jan 27 19:59:17 2008
@@ -81,8 +81,9 @@
echo "======================================================================"
echo ""
echo ""
- $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -DHadoopPatchProcess= releaseaudit &> $PATCH_DIR/trunkReleaseAuditWarnings
- $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -Dfindbugs.home=$FINDBUGS_HOME -Djavac.args="-Xlint -Xmaxwarns 1000" -DHadoopPatchProcess= clean tar findbugs &> $PATCH_DIR/trunkJavacWarnings
+ $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -DHadoopPatchProcess= releaseaudit &> $PATCH_DIR/trunkReleaseAuditWarnings.txt
+ $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -Djavac.args="-Xlint -Xmaxwarns 1000" -DHadoopPatchProcess= clean tar &> $PATCH_DIR/trunkJavacWarnings.txt
+ $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -Dfindbugs.home=$FINDBUGS_HOME -DHadoopPatchProcess= findbugs &> /dev/null
cp $WORKSPACE/trunk/build/test/findbugs/*.xml $PATCH_DIR/trunkFindbugsWarnings.xml
}
@@ -155,7 +156,7 @@
if [[ $javadocWarnings != 0 ]] ; then
JIRA_COMMENT="$JIRA_COMMENT
- javadoc -1. The javadoc tool appears to have generated $javadocWarningswarning messages."
+ javadoc -1. The javadoc tool appears to have generated $javadocWarnings warning messages."
return 1
fi
JIRA_COMMENT="$JIRA_COMMENT
@@ -176,12 +177,12 @@
echo "======================================================================"
echo ""
echo ""
- $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -Djavac.args="-Xlint -Xmaxwarns 1000" -DHadoopPatchProcess= tar &> $PATCH_DIR/patchJavacWarnings
+ $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -Djavac.args="-Xlint -Xmaxwarns 1000" -DHadoopPatchProcess= tar &> $PATCH_DIR/patchJavacWarnings.txt
### Compare trunk and patch javac warning numbers
- if [[ -f $PATCH_DIR/patchJavacWarnings ]] ; then
- trunkJavacWarnings=`$GREP -o '\[javac\] [0-9]* warning' $PATCH_DIR/trunkJavacWarnings | awk '{total += $2} END {print total}'`
- patchJavacWarnings=`$GREP -o '\[javac\] [0-9]* warning' $PATCH_DIR/patchJavacWarnings | awk '{total += $2} END {print total}'`
+ if [[ -f $PATCH_DIR/patchJavacWarnings.txt ]] ; then
+ trunkJavacWarnings=`$GREP -o '\[javac\] [0-9]* warning' $PATCH_DIR/trunkJavacWarnings.txt | awk '{total += $2} END {print total}'`
+ patchJavacWarnings=`$GREP -o '\[javac\] [0-9]* warning' $PATCH_DIR/patchJavacWarnings.txt | awk '{total += $2} END {print total}'`
echo ""
echo ""
echo "There appear to be $trunkJavacWarnings javac compiler warnings before the patch and $patchJavacWarnings javac compiler warnings after applying the patch."
@@ -212,12 +213,12 @@
echo "======================================================================"
echo ""
echo ""
- $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -DHadoopPatchProcess= releaseaudit &> $PATCH_DIR/patchReleaseAuditWarnings
+ $ANT_HOME/bin/ant -Dversion=${SVN_REVISION}_${defect}_PATCH-${patchNum} -DHadoopPatchProcess= releaseaudit &> $PATCH_DIR/patchReleaseAuditWarnings.txt
### Compare trunk and patch release audit warning numbers
- if [[ -f $PATCH_DIR/patchReleaseAuditWarnings ]] ; then
- trunkReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/trunkReleaseAuditWarnings`
- patchReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/patchReleaseAuditWarnings`
+ if [[ -f $PATCH_DIR/patchReleaseAuditWarnings.txt ]] ; then
+ trunkReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/trunkReleaseAuditWarnings.txt`
+ patchReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt`
echo ""
echo ""
echo "There appear to be $trunkReleaseAuditWarnings release audit warnings before the patch and $patchReleaseAuditWarnings release audit warnings after applying the patch."
@@ -226,6 +227,11 @@
JIRA_COMMENT="$JIRA_COMMENT
release audit -1. The applied patch generated $patchReleaseAuditWarnings release audit warnings (more than the trunk's current $trunkReleaseAuditWarnings warnings)."
+ $GREP '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt > $PATCH_DIR/patchReleaseAuditProblems.txt
+ $GREP '\!?????' $PATCH_DIR/trunkReleaseAuditWarnings.txt > $PATCH_DIR/trunkReleaseAuditProblems.txt
+ diff $PATCH_DIR/patchReleaseAuditProblems $PATCH_DIR/trunkReleaseAuditProblems > $PATCH_DIR/releaseAuditDiffWarnings.txt
+ JIRA_COMMENT_FOOTER="Release audit warnings: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/artifact/trunk/current/releaseAuditDiffWarnings.txt
+$JIRA_COMMENT_FOOTER"
return 1
fi
fi