hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r1036694 - in /hadoop/common/trunk: CHANGES.txt src/test/bin/test-patch.properties src/test/bin/test-patch.sh src/test/test-patch.properties
Date Fri, 19 Nov 2010 00:44:12 GMT
Author: nigel
Date: Fri Nov 19 00:44:11 2010
New Revision: 1036694

URL: http://svn.apache.org/viewvc?rev=1036694&view=rev
Log:
HADOOP-7042. Updates to test-patch.sh to include failed test names and improve other messaging.
 Contributed by nigel.

Added:
    hadoop/common/trunk/src/test/test-patch.properties
Removed:
    hadoop/common/trunk/src/test/bin/test-patch.properties
Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/test/bin/test-patch.sh

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1036694&r1=1036693&r2=1036694&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Fri Nov 19 00:44:11 2010
@@ -8,6 +8,9 @@ Trunk (unreleased changes)
 
   IMPROVEMENTS
 
+    HADOOP-7042. Updates to test-patch.sh to include failed test names and
+    improve other messaging. (nigel)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/trunk/src/test/bin/test-patch.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/test/bin/test-patch.sh?rev=1036694&r1=1036693&r2=1036694&view=diff
==============================================================================
--- hadoop/common/trunk/src/test/bin/test-patch.sh (original)
+++ hadoop/common/trunk/src/test/bin/test-patch.sh Fri Nov 19 00:44:11 2010
@@ -18,7 +18,7 @@ ulimit -n 1024
 ### Setup some variables.  
 ### SVN_REVISION and BUILD_URL are set by Hudson if it is run by patch process
 ### Read variables from properties file
-. `dirname $0`/test-patch.properties
+. `dirname $0`/../test-patch.properties
 
 ###############################################################################
 parseArgs() {
@@ -433,6 +433,7 @@ $JIRA_COMMENT_FOOTER"
 ###############################################################################
 ### Check there are no changes in the number of Findbugs warnings
 checkFindbugsWarnings () {
+  findbugs_version=`${FINDBUGS_HOME}/bin/findbugs -version`
   echo ""
   echo ""
   echo "======================================================================"
@@ -447,7 +448,7 @@ checkFindbugsWarnings () {
   if [ $? != 0 ] ; then
     JIRA_COMMENT="$JIRA_COMMENT
 
-    -1 findbugs.  The patch appears to cause Findbugs to fail."
+    -1 findbugs.  The patch appears to cause Findbugs (version ${findbugs_version}) to fail."
     return 1
   fi
 JIRA_COMMENT_FOOTER="Findbugs warnings: $BUILD_URL/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
@@ -468,12 +469,12 @@ $JIRA_COMMENT_FOOTER"
   if [[ $findbugsWarnings > $OK_FINDBUGS_WARNINGS ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT
 
-    -1 findbugs.  The patch appears to introduce `expr $(($findbugsWarnings-$OK_FINDBUGS_WARNINGS))`
new Findbugs warnings."
+    -1 findbugs.  The patch appears to introduce `expr $(($findbugsWarnings-$OK_FINDBUGS_WARNINGS))`
new Findbugs (version ${findbugs_version}) warnings."
     return 1
   fi
   JIRA_COMMENT="$JIRA_COMMENT
 
-    +1 findbugs.  The patch does not introduce any new Findbugs warnings."
+    +1 findbugs.  The patch does not introduce any new Findbugs (version ${findbugs_version})
warnings."
   return 0
 }
 
@@ -500,9 +501,11 @@ runCoreTests () {
   echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml
-Dtest.output=yes -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME
$PreTestTarget test-core"
   $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= -Dtest.junit.output.format=xml
-Dtest.output=yes -Dcompile.c++=yes -Dforrest.home=$FORREST_HOME -Djava5.home=$JAVA5_HOME
$PreTestTarget test-core
   if [[ $? != 0 ]] ; then
+    failed_tests=`grep -l "<failure" build/test/*.xml | sed -e "s|build/test/TEST-|  
               |g" | sed -e "s|\.xml||g"`
     JIRA_COMMENT="$JIRA_COMMENT
 
-    -1 core tests.  The patch failed core unit tests."
+    -1 core tests.  The patch failed these core unit tests:
+$failed_tests"
     return 1
   fi
   JIRA_COMMENT="$JIRA_COMMENT

Added: hadoop/common/trunk/src/test/test-patch.properties
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/test/test-patch.properties?rev=1036694&view=auto
==============================================================================
--- hadoop/common/trunk/src/test/test-patch.properties (added)
+++ hadoop/common/trunk/src/test/test-patch.properties Fri Nov 19 00:44:11 2010
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+OK_RELEASEAUDIT_WARNINGS=1
+OK_FINDBUGS_WARNINGS=1
+OK_JAVADOC_WARNINGS=6



Mime
View raw message