Author: szetszwo
Date: Wed Apr 11 22:51:10 2012
New Revision: 1325052

URL: http://svn.apache.org/viewvc?rev=1325052&view=rev
Log:
Merge r1311518 through r1325051 from trunk.

Modified:
    hadoop/common/branches/HDFS-3092/   (props changed)
    hadoop/common/branches/HDFS-3092/dev-support/test-patch.sh

Propchange: hadoop/common/branches/HDFS-3092/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk:r1311518-1325051

Modified: hadoop/common/branches/HDFS-3092/dev-support/test-patch.sh
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-3092/dev-support/test-patch.sh?rev=1325052&r1=1325051&r2=1325052&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-3092/dev-support/test-patch.sh (original)
+++ hadoop/common/branches/HDFS-3092/dev-support/test-patch.sh Wed Apr 11 
22:51:10 2012
@@ -627,22 +627,17 @@ runTests () {
   echo ""
   echo ""
 
-  echo "$MVN clean install -Pnative -D${PROJECT_NAME}PatchProcess"
-  $MVN clean install -Pnative -D${PROJECT_NAME}PatchProcess
-  if [[ $? != 0 ]] ; then
-    ### Find and format names of failed tests
-    failed_tests=`find . -name 'TEST*.xml' | xargs $GREP  -l -E 
"<failure|<error" | sed -e "s|.*target/surefire-reports/TEST-|                  
|g" | sed -e "s|\.xml||g"`
-
-    if [[ -n "$failed_tests" ]] ; then
-      JIRA_COMMENT="$JIRA_COMMENT
+  echo "$MVN clean install -fn -Pnative -D${PROJECT_NAME}PatchProcess"
+  $MVN clean install -fn -Pnative -D${PROJECT_NAME}PatchProcess
+  failed_tests=`find . -name 'TEST*.xml' | xargs $GREP  -l -E 
"<failure|<error" | sed -e "s|.*target/surefire-reports/TEST-|                  
|g" | sed -e "s|\.xml||g"`
+  # With -fn mvn always exits with a 0 exit code.  Because of this we need to
+  # find the errors instead of using the exit code.  We assume that if the 
build
+  # failed a -1 is already given for that case
+  if [[ -n "$failed_tests" ]] ; then
+    JIRA_COMMENT="$JIRA_COMMENT
 
     -1 core tests.  The patch failed these unit tests:
 $failed_tests"
-    else
-      JIRA_COMMENT="$JIRA_COMMENT
-
-    -1 core tests.  The patch failed the unit tests build"
-    fi
     return 1
   fi
   JIRA_COMMENT="$JIRA_COMMENT


Reply via email to