HADOOP-8312. testpatch.sh should provide a simpler way to see which warnings changed (bobby)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1332417 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f484a3c019
commit
bd956559c8
@ -39,6 +39,7 @@ WGET=${WGET:-wget}
|
||||
SVN=${SVN:-svn}
|
||||
GREP=${GREP:-grep}
|
||||
PATCH=${PATCH:-patch}
|
||||
DIFF=${DIFF:-diff}
|
||||
JIRACLI=${JIRA:-jira}
|
||||
FINDBUGS_HOME=${FINDBUGS_HOME}
|
||||
FORREST_HOME=${FORREST_HOME}
|
||||
@ -61,6 +62,7 @@ printUsage() {
|
||||
echo "--svn-cmd=<cmd> The 'svn' command to use (default 'svn')"
|
||||
echo "--grep-cmd=<cmd> The 'grep' command to use (default 'grep')"
|
||||
echo "--patch-cmd=<cmd> The 'patch' command to use (default 'patch')"
|
||||
echo "--diff-cmd=<cmd> The 'diff' command to use (default 'diff')"
|
||||
echo "--findbugs-home=<path> Findbugs home directory (default FINDBUGS_HOME environment variable)"
|
||||
echo "--forrest-home=<path> Forrest home directory (default FORREST_HOME environment variable)"
|
||||
echo "--dirty-workspace Allow the local SVN workspace to have uncommitted changes"
|
||||
@ -113,6 +115,9 @@ parseArgs() {
|
||||
--patch-cmd=*)
|
||||
PATCH=${i#*=}
|
||||
;;
|
||||
--diff-cmd=*)
|
||||
DIFF=${i#*=}
|
||||
;;
|
||||
--jira-cmd=*)
|
||||
JIRACLI=${i#*=}
|
||||
;;
|
||||
@ -430,14 +435,21 @@ checkJavacWarnings () {
|
||||
fi
|
||||
### Compare trunk and patch javac warning numbers
|
||||
if [[ -f $PATCH_DIR/patchJavacWarnings.txt ]] ; then
|
||||
trunkJavacWarnings=`$GREP '\[WARNING\]' $PATCH_DIR/trunkJavacWarnings.txt | $AWK 'BEGIN {total = 0} {total += 1} END {print total}'`
|
||||
patchJavacWarnings=`$GREP '\[WARNING\]' $PATCH_DIR/patchJavacWarnings.txt | $AWK 'BEGIN {total = 0} {total += 1} END {print total}'`
|
||||
$GREP '\[WARNING\]' $PATCH_DIR/trunkJavacWarnings.txt > $PATCH_DIR/filteredTrunkJavacWarnings.txt
|
||||
$GREP '\[WARNING\]' $PATCH_DIR/patchJavacWarnings.txt > $PATCH_DIR/filteredPatchJavacWarnings.txt
|
||||
trunkJavacWarnings=`cat $PATCH_DIR/filteredTrunkJavacWarnings.txt | $AWK 'BEGIN {total = 0} {total += 1} END {print total}'`
|
||||
patchJavacWarnings=`cat $PATCH_DIR/filteredPatchJavacWarnings.txt | $AWK 'BEGIN {total = 0} {total += 1} END {print total}'`
|
||||
echo "There appear to be $trunkJavacWarnings javac compiler warnings before the patch and $patchJavacWarnings javac compiler warnings after applying the patch."
|
||||
if [[ $patchJavacWarnings != "" && $trunkJavacWarnings != "" ]] ; then
|
||||
if [[ $patchJavacWarnings -gt $trunkJavacWarnings ]] ; then
|
||||
JIRA_COMMENT="$JIRA_COMMENT
|
||||
|
||||
-1 javac. The applied patch generated $patchJavacWarnings javac compiler warnings (more than the trunk's current $trunkJavacWarnings warnings)."
|
||||
|
||||
$DIFF $PATCH_DIR/filteredTrunkJavacWarnings.txt $PATCH_DIR/filteredPatchJavacWarnings.txt > $PATCH_DIR/diffJavacWarnings.txt
|
||||
JIRA_COMMENT_FOOTER="Javac warnings: $BUILD_URL/artifact/trunk/$(basename $BASEDIR)/patchprocess/diffJavacWarnings.txt
|
||||
$JIRA_COMMENT_FOOTER"
|
||||
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
@ -121,6 +121,9 @@ Trunk (unreleased changes)
|
||||
|
||||
HADOOP-7788. Add simple HealthMonitor class to watch an HAService (todd)
|
||||
|
||||
HADOOP-8312. testpatch.sh should provide a simpler way to see which
|
||||
warnings changed (bobby)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HADOOP-7761. Improve the performance of raw comparisons. (todd)
|
||||
|
Loading…
Reference in New Issue
Block a user