From 5f53fd8eadbd047a2116be590c00f3384710adfa Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Tue, 4 Aug 2009 19:01:51 +0000 Subject: [PATCH] HADOOP-6124. Fix javac warning detection in test-patch.sh. Contributed by Giridharan Kesavan git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@800919 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/test/bin/test-patch.sh | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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}'`