Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 36190 invoked from network); 4 May 2008 06:51:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 May 2008 06:51:49 -0000 Received: (qmail 55998 invoked by uid 500); 4 May 2008 06:51:51 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 55976 invoked by uid 500); 4 May 2008 06:51:50 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 55965 invoked by uid 99); 4 May 2008 06:51:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 May 2008 23:51:50 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 May 2008 06:51:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5659C2388A02; Sat, 3 May 2008 23:51:20 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r653184 - in /hadoop/core/trunk: CHANGES.txt build.xml src/test/bin/test-patch.sh Date: Sun, 04 May 2008 06:51:20 -0000 To: core-commits@hadoop.apache.org From: nigel@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080504065120.5659C2388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nigel Date: Sat May 3 23:51:19 2008 New Revision: 653184 URL: http://svn.apache.org/viewvc?rev=653184&view=rev Log: HADOOP-3345. Enhance the hudson-test-patch target to cleanup messages, fix minor defects, and add eclipse plugin and python unit tests. Contributed by Nigel Daley. Modified: hadoop/core/trunk/CHANGES.txt hadoop/core/trunk/build.xml hadoop/core/trunk/src/test/bin/test-patch.sh Modified: hadoop/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=653184&r1=653183&r2=653184&view=diff ============================================================================== --- hadoop/core/trunk/CHANGES.txt (original) +++ hadoop/core/trunk/CHANGES.txt Sat May 3 23:51:19 2008 @@ -72,6 +72,9 @@ HADOOP-2799. Deprecate o.a.h.io.Closable in favor of java.io.Closable. (Tsz Wo (Nicholas), SZE via cdouglas) + HADOOP-3345. Enhance the hudson-test-patch target to cleanup messages, + fix minor defects, and add eclipse plugin and python unit tests. (nigel) + OPTIMIZATIONS HADOOP-3274. The default constructor of BytesWritable creates empty Modified: hadoop/core/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/core/trunk/build.xml?rev=653184&r1=653183&r2=653184&view=diff ============================================================================== --- hadoop/core/trunk/build.xml (original) +++ hadoop/core/trunk/build.xml Sat May 3 23:51:19 2008 @@ -1146,8 +1146,8 @@ - - + + @@ -1160,6 +1160,8 @@ + + Modified: hadoop/core/trunk/src/test/bin/test-patch.sh URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/bin/test-patch.sh?rev=653184&r1=653183&r2=653184&view=diff ============================================================================== --- hadoop/core/trunk/src/test/bin/test-patch.sh (original) +++ hadoop/core/trunk/src/test/bin/test-patch.sh Sat May 3 23:51:19 2008 @@ -12,8 +12,8 @@ HUDSON) ### Set HUDSON to true to indicate that this script is being run by Hudson HUDSON=true - if [[ $# != 14 ]] ; then - echo "ERROR: usage $0 HUDSON " + if [[ $# != 16 ]] ; then + echo "ERROR: usage $0 HUDSON " cleanupAndExit 0 fi PATCH_DIR=$2 @@ -26,9 +26,11 @@ PATCH=$9 FINDBUGS_HOME=${10} FORREST_HOME=${11} - BASEDIR=${12} - TRIGGER_BUILD_URL=${13} - JIRA_PASSWD=${14} + ECLIPSE_HOME=${12} + PYTHON_HOME=${13} + BASEDIR=${14} + TRIGGER_BUILD_URL=${15} + JIRA_PASSWD=${16} ### Retrieve the defect number if [ ! -e $PATCH_DIR/defectNum ] ; then echo "Could not determine the patch to test. Exiting." @@ -39,6 +41,8 @@ echo "Could not determine the patch to test. Exiting." cleanupAndExit 0 fi + ECLIPSE_PROPERTY="-Declipse.home=$ECLIPSE_HOME" + PYTHON_PROPERTY="-Dpython.home=$PYTHON_HOME" ;; DEVELOPER) ### Set HUDSON to false to indicate that this script is being run by a developer @@ -154,8 +158,16 @@ if [[ $HUDSON == "true" ]] ; then $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= releaseaudit &> $PATCH_DIR/trunkReleaseAuditWarnings.txt fi - $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" -DHadoopPatchProcess= clean tar &> $PATCH_DIR/trunkJavacWarnings.txt + $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -DHadoopPatchProcess= clean tar &> $PATCH_DIR/trunkJavacWarnings.txt + if [[ $? != 0 ]] ; then + echo "Trunk compilation is broken?" + cleanupAndExit 1 + fi $ANT_HOME/bin/ant -Dversion="${VERSION}" -Dfindbugs.home=$FINDBUGS_HOME -DHadoopPatchProcess= findbugs &> /dev/null + if [[ $? != 0 ]] ; then + echo "Trunk findbugs is broken?" + cleanupAndExit 1 + fi cp $BASEDIR/build/test/findbugs/*.xml $PATCH_DIR/trunkFindbugsWarnings.xml } @@ -176,12 +188,12 @@ if [[ $authorTags != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT - @author -1. The patch appears to contain $authorTags @author tags which the Hadoop community has agreed to not allow in code contributions." + -1 @author. The patch appears to contain $authorTags @author tags which the Hadoop community has agreed to not allow in code contributions." return 1 fi JIRA_COMMENT="$JIRA_COMMENT - @author +1. The patch does not contain any @author tags." + +1 @author. The patch does not contain any @author tags." return 0 } @@ -202,13 +214,13 @@ if [[ $testReferences == 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT - tests included -1. The patch doesn't appear to include any new or modified tests. + -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch." return 1 fi JIRA_COMMENT="$JIRA_COMMENT - tests included +1. The patch appears to include $testReferences new or modified tests." + +1 tests included. The patch appears to include $testReferences new or modified tests." return 0 } @@ -229,7 +241,7 @@ echo "PATCH APPLICATION FAILED" JIRA_COMMENT="$JIRA_COMMENT - patch -1. The patch command could not apply the patch." + -1 patch. The patch command could not apply the patch." return 1 fi return 0 @@ -255,12 +267,12 @@ if [[ $javadocWarnings != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT - javadoc -1. The javadoc tool appears to have generated $javadocWarnings warning messages." + -1 javadoc. The javadoc tool appears to have generated $javadocWarnings warning messages." return 1 fi JIRA_COMMENT="$JIRA_COMMENT - javadoc +1. The javadoc tool did not generate any warning messages." + +1 javadoc. The javadoc tool did not generate any warning messages." return 0 } @@ -276,7 +288,7 @@ echo "======================================================================" echo "" echo "" - $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" -DHadoopPatchProcess= tar &> $PATCH_DIR/patchJavacWarnings.txt + $ANT_HOME/bin/ant -Dversion="${VERSION}" -Djavac.args="-Xlint -Xmaxwarns 1000" $ECLIPSE_PROPERTY -DHadoopPatchProcess= tar &> $PATCH_DIR/patchJavacWarnings.txt ### Compare trunk and patch javac warning numbers if [[ -f $PATCH_DIR/patchJavacWarnings.txt ]] ; then @@ -287,14 +299,14 @@ if [[ $patchJavacWarnings > $trunkJavacWarnings ]] ; then JIRA_COMMENT="$JIRA_COMMENT - javac -1. The applied patch generated $patchJavacWarnings javac compiler warnings (more than the trunk's current $trunkJavacWarnings warnings)." + -1 javac. The applied patch generated $patchJavacWarnings javac compiler warnings (more than the trunk's current $trunkJavacWarnings warnings)." return 1 fi fi fi JIRA_COMMENT="$JIRA_COMMENT - javac +1. The applied patch does not generate any new javac compiler warnings." + +1 javac. The applied patch does not increase the total number of javac compiler warnings." return 0 } @@ -323,7 +335,7 @@ if [[ $patchReleaseAuditWarnings > $trunkReleaseAuditWarnings ]] ; then JIRA_COMMENT="$JIRA_COMMENT - release audit -1. The applied patch generated $patchReleaseAuditWarnings release audit warnings (more than the trunk's current $trunkReleaseAuditWarnings warnings)." + -1 release audit. 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 echo "A diff of patched release audit warnings with trunk release audit warnings." > $PATCH_DIR/releaseAuditDiffWarnings.txt @@ -338,7 +350,7 @@ fi JIRA_COMMENT="$JIRA_COMMENT - release audit +1. The applied patch does not generate any new release audit warnings." + +1 release audit. The applied patch does not increase the total number of release audit warnings." return 0 } @@ -365,12 +377,12 @@ # if [[ $patchStyleErrors != 0 ]] ; then # JIRA_COMMENT="$JIRA_COMMENT # -# checkstyle -1. The patch generated $patchStyleErrors code style errors." +# -1 checkstyle. The patch generated $patchStyleErrors code style errors." # return 1 # fi # JIRA_COMMENT="$JIRA_COMMENT # -# checkstyle +1. The patch generated 0 code style errors." +# +1 checkstyle. The patch generated 0 code style errors." return 0 } @@ -390,7 +402,7 @@ if [ $? != 0 ] ; then JIRA_COMMENT="$JIRA_COMMENT - findbugs -1. The patch appears to cause Findbugs to fail." + -1 findbugs. The patch appears to cause Findbugs to fail." return 1 fi JIRA_COMMENT_FOOTER="Findbugs warnings: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html @@ -413,12 +425,12 @@ if [[ $findbugsWarnings != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT - findbugs -1. The patch appears to introduce $findbugsWarnings new Findbugs warnings." + -1 findbugs. The patch appears to introduce $findbugsWarnings new Findbugs warnings." return 1 fi JIRA_COMMENT="$JIRA_COMMENT - findbugs +1. The patch does not introduce any new Findbugs warnings." + +1 findbugs. The patch does not introduce any new Findbugs warnings." return 0 } @@ -442,12 +454,12 @@ if [[ $? != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT - core tests -1. The patch failed core unit tests." + -1 core tests. The patch failed core unit tests." return 1 fi JIRA_COMMENT="$JIRA_COMMENT - core tests +1. The patch passed core unit tests." + +1 core tests. The patch passed core unit tests." return 0 } @@ -467,16 +479,16 @@ ### Kill any rogue build processes from the last attempt $PS -auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' | /usr/bin/xargs -t -I {} /usr/bin/kill -9 {} > /dev/null - $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib + $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes test-contrib if [[ $? != 0 ]] ; then JIRA_COMMENT="$JIRA_COMMENT - contrib tests -1. The patch failed contrib unit tests." + -1 contrib tests. The patch failed contrib unit tests." return 1 fi JIRA_COMMENT="$JIRA_COMMENT - contrib tests +1. The patch passed contrib unit tests." + +1 contrib tests. The patch passed contrib unit tests." return 0 } @@ -573,9 +585,10 @@ checkTests (( RESULT = RESULT + $? )) applyPatch -if [[ $? != 0 ]] ; then +(( RESULT = RESULT + $? )) +if [[ $RESULT != 0 ]] ; then submitJiraComment 1 - cleanupAndExit $? + cleanupAndExit $RESULT fi checkJavadocWarnings (( RESULT = RESULT + $? ))