diff --git a/CHANGES.txt b/CHANGES.txt index c4dcd34a36..682b89a6f5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -902,6 +902,9 @@ Trunk (unreleased changes) HADOOP-6172. Fix jar file names in hadoop-config.sh and include ${build.src} as a part of the source list in build.xml. (Hong Tang via szetszwo) + HADOOP-6124. Fix javac warning detection in test-patch.sh. (Giridharan + Kesavan via szetszwo) + Release 0.20.1 - Unreleased INCOMPATIBLE CHANGES diff --git a/src/test/bin/test-patch.sh b/src/test/bin/test-patch.sh index 68560e48c6..ccfdccc2da 100755 --- a/src/test/bin/test-patch.sh +++ b/src/test/bin/test-patch.sh @@ -307,9 +307,14 @@ checkJavacWarnings () { echo "======================================================================" echo "" echo "" - echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1 + echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= clean tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1" + $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -Djava5.home=${JAVA5_HOME} -Dforrest.home=${FORREST_HOME} -DHadoopPatchProcess= clean tar > $PATCH_DIR/patchJavacWarnings.txt 2>&1 + if [[ $? != 0 ]] ; then + JIRA_COMMENT="$JIRA_COMMENT + -1 javac. The patch appears to cause tar ant target to fail." + return 1 + fi ### Compare trunk and patch javac warning numbers if [[ -f $PATCH_DIR/patchJavacWarnings.txt ]] ; then trunkJavacWarnings=`$GREP -o '\[javac\] [0-9]* warning' $PATCH_DIR/trunkJavacWarnings.txt | awk '{total += $2} END {print total}'`