Преглед изворни кода

HADOOP-9186. test-patch.sh should report build failure to JIRA. (Binglin Chang via Colin Patrick McCabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1502325 13f79535-47bb-0310-9956-ffa450edef68
Colin McCabe пре 12 година
родитељ
комит
03c950d907
2 измењених фајлова са 19 додато и 4 уклоњено
  1. 16 4
      dev-support/test-patch.sh
  2. 3 0
      hadoop-common-project/hadoop-common/CHANGES.txt

+ 16 - 4
dev-support/test-patch.sh

@@ -266,7 +266,7 @@ verifyPatch () {
 }
 
 ###############################################################################
-buildWithPatch () {
+prebuildWithoutPatch () {
   echo ""
   echo ""
   echo "======================================================================"
@@ -283,7 +283,10 @@ buildWithPatch () {
     $MVN clean test -DskipTests > $PATCH_DIR/trunkCompile.txt 2>&1
     if [[ $? != 0 ]] ; then
       echo "Top-level trunk compilation is broken?"
-      cleanupAndExit 1
+      JIRA_COMMENT="$JIRA_COMMENT
+
+    {color:red}-1 patch{color}.  Top-level trunk compilation may be broken."
+      return 1
     fi
     cd -
   fi
@@ -292,8 +295,12 @@ buildWithPatch () {
   $MVN clean test -DskipTests -D${PROJECT_NAME}PatchProcess -Ptest-patch > $PATCH_DIR/trunkJavacWarnings.txt 2>&1
   if [[ $? != 0 ]] ; then
     echo "Trunk compilation is broken?"
-    cleanupAndExit 1
+    JIRA_COMMENT="$JIRA_COMMENT
+
+    {color:red}-1 patch{color}.  Trunk compilation may be broken."
+    return 1
   fi
+  return 0
 }
 
 ###############################################################################
@@ -954,7 +961,12 @@ if [[ $RESULT != 0 ]] ; then
   submitJiraComment 1
   cleanupAndExit 1
 fi
-buildWithPatch
+prebuildWithoutPatch
+(( RESULT = RESULT + $? ))
+if [[ $RESULT != 0 ]] ; then
+  submitJiraComment 1
+  cleanupAndExit 1
+fi
 checkAuthor
 (( RESULT = RESULT + $? ))
 

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -302,6 +302,9 @@ Release 2.2.0 - UNRELEASED
     HADOOP-9417.  Support for symlink resolution in LocalFileSystem /
     RawLocalFileSystem.  (Andrew Wang via Colin Patrick McCabe)
 
+    HADOOP-9186.  test-patch.sh should report build failure to JIRA.
+    (Binglin Chang via Colin Patrick McCabe)
+
   OPTIMIZATIONS
 
   BUG FIXES