浏览代码

HADOOP-8375. test-patch should stop immediately once it has found compilation errors (bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1336887 13f79535-47bb-0310-9956-ffa450edef68
Robert Joseph Evans 13 年之前
父节点
当前提交
6957c78066
共有 2 个文件被更改,包括 13 次插入4 次删除
  1. 10 4
      dev-support/test-patch.sh
  2. 3 0
      hadoop-common-project/hadoop-common/CHANGES.txt

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

@@ -423,8 +423,8 @@ checkJavacWarnings () {
   if [[ $? != 0 ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT
 
-    -1 javac.  The patch appears to cause tar ant target to fail."
-    return 1
+    -1 javac.  The patch appears to cause the build to fail."
+    return 2
   fi
   ### Compare trunk and patch javac warning numbers
   if [[ -f $PATCH_DIR/patchJavacWarnings.txt ]] ; then
@@ -900,9 +900,15 @@ if [[ $? != 0 ]] ; then
   submitJiraComment 1
   cleanupAndExit 1
 fi
-checkJavadocWarnings
-(( RESULT = RESULT + $? ))
 checkJavacWarnings
+JAVAC_RET=$?
+#2 is returned if the code could not compile
+if [[ $JAVAC_RET == 2 ]] ; then
+  submitJiraComment 1
+  cleanupAndExit 1
+fi
+(( RESULT = RESULT + $JAVAC_RET ))
+checkJavadocWarnings
 (( RESULT = RESULT + $? ))
 checkEclipseGeneration
 (( RESULT = RESULT + $? ))

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

@@ -132,6 +132,9 @@ Trunk (unreleased changes)
     HADOOP-8354. test-patch findbugs may fail if a dependent module is changed
     (Tom White and Robert Evans)
 
+    HADOOP-8375. test-patch should stop immediately once it has found
+    compilation errors (bobby)
+
   OPTIMIZATIONS
 
     HADOOP-7761. Improve the performance of raw comparisons. (todd)