You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/09/30 21:09:18 UTC

git commit: AMBARI-7528 Disabling javadoc check in the test-patch (jaoki)

Repository: ambari
Updated Branches:
  refs/heads/trunk 04688200d -> 63d507275


AMBARI-7528 Disabling javadoc check in the test-patch (jaoki)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/63d50727
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63d50727
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63d50727

Branch: refs/heads/trunk
Commit: 63d507275cbfc4e9f38a86894ed550ea1e0573d4
Parents: 0468820
Author: Jun Aoki <ja...@apache.org>
Authored: Tue Sep 30 12:09:07 2014 -0700
Committer: Jun Aoki <ja...@apache.org>
Committed: Tue Sep 30 12:09:07 2014 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh | 62 ------------------------------------------
 1 file changed, 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/63d50727/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index c0b60d2..c416c4a 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -285,16 +285,6 @@ prebuildWithoutPatch () {
     return 1
   fi
 
-  echo "$MVN clean test javadoc:javadoc -DskipTests -Pdocs -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/trunkJavadocWarnings.txt 2>&1"
-  $MVN clean test javadoc:javadoc -DskipTests -Pdocs -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/trunkJavadocWarnings.txt 2>&1
-  if [[ $? != 0 ]] ; then
-    echo "Trunk javadoc compilation is broken?"
-    JIRA_COMMENT="$JIRA_COMMENT
-
-    {color:red}-1 patch{color}.  Trunk compilation may be broken."
-    return 1
-  fi
-
   return 0
 }
 
@@ -396,56 +386,6 @@ applyPatch () {
   return 0
 }
 
-###############################################################################
-calculateJavadocWarnings() {
-    WARNING_FILE="$1"
-    RET=$(egrep "^[0-9]+ warnings$" "$WARNING_FILE" | awk '{sum+=$1} END {print sum}')
-}
-
-### Check there are no javadoc warnings
-checkJavadocWarnings () {
-  echo ""
-  echo ""
-  echo "======================================================================"
-  echo "======================================================================"
-  echo "    Determining number of patched javadoc warnings."
-  echo "======================================================================"
-  echo "======================================================================"
-  echo ""
-  echo ""
-  echo "$MVN clean test javadoc:javadoc -DskipTests -Pdocs -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/patchJavadocWarnings.txt 2>&1"
-  if [ -d hadoop-project ]; then
-    (cd hadoop-project; $MVN install > /dev/null 2>&1)
-  fi
-  if [ -d hadoop-common-project/hadoop-annotations ]; then  
-    (cd hadoop-common-project/hadoop-annotations; $MVN install > /dev/null 2>&1)
-  fi
-  $MVN clean test javadoc:javadoc -DskipTests -Pdocs -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/patchJavadocWarnings.txt 2>&1
-  calculateJavadocWarnings "$PATCH_DIR/trunkJavadocWarnings.txt"
-  numTrunkJavadocWarnings=$RET
-  calculateJavadocWarnings "$PATCH_DIR/patchJavadocWarnings.txt"
-  numPatchJavadocWarnings=$RET
-  grep -i warning "$PATCH_DIR/trunkJavadocWarnings.txt" > "$PATCH_DIR/trunkJavadocWarningsFiltered.txt"
-  grep -i warning "$PATCH_DIR/patchJavadocWarnings.txt" > "$PATCH_DIR/patchJavadocWarningsFiltered.txt"
-  diff -u "$PATCH_DIR/trunkJavadocWarningsFiltered.txt" \
-          "$PATCH_DIR/patchJavadocWarningsFiltered.txt" > \
-          "$PATCH_DIR/diffJavadocWarnings.txt"
-  rm -f "$PATCH_DIR/trunkJavadocWarningsFiltered.txt" "$PATCH_DIR/patchJavadocWarningsFiltered.txt"
-  echo "There appear to be $numTrunkJavadocWarnings javadoc warnings before the patch and $numPatchJavadocWarnings javadoc warnings after applying the patch."
-  if [[ $numTrunkJavadocWarnings != "" && $numPatchJavadocWarnings != "" ]] ; then
-    if [[ $numPatchJavadocWarnings -gt $numTrunkJavadocWarnings ]] ; then
-      JIRA_COMMENT="$JIRA_COMMENT
-
-    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated `expr $(($numPatchJavadocWarnings-$numTrunkJavadocWarnings))` warning messages.
-        See $BUILD_URL/artifact/trunk/patchprocess/diffJavadocWarnings.txt for details."
-        return 1
-    fi
-  fi
-  JIRA_COMMENT="$JIRA_COMMENT
-
-    {color:green}+1 javadoc{color}.  There were no new javadoc warning messages."
-  return 0
-}
 
 ###############################################################################
 ### Check there are no changes in the number of Javac warnings
@@ -1041,8 +981,6 @@ if [[ $JAVAC_RET == 2 ]] ; then
   cleanupAndExit 1
 fi
 (( RESULT = RESULT + $JAVAC_RET ))
-checkJavadocWarnings
-(( RESULT = RESULT + $? ))
 ### Checkstyle not implemented yet
 #checkStyle
 #(( RESULT = RESULT + $? ))