Author: bobby
Date: Thu May 10 21:09:08 2012
New Revision: 1336887
URL: http://svn.apache.org/viewvc?rev=1336887&view=rev
Log:
HADOOP-8375. test-patch should stop immediately once it has found compilation
errors (bobby)
Modified:
hadoop/common/trunk/dev-support/test-patch.sh
Modified: hadoop/common/trunk/dev-support/test-patch.sh
URL:
http://svn.apache.org/viewvc/hadoop/common/trunk/dev-support/test-patch.sh?rev=1336887&r1=1336886&r2=1336887&view=diff
==============================================================================
--- hadoop/common/trunk/dev-support/test-patch.sh (original)
+++ hadoop/common/trunk/dev-support/test-patch.sh Thu May 10 21:09:08 2012
@@ -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 + $? ))