You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sz...@apache.org on 2014/02/07 03:43:07 UTC
svn commit: r1565519 - in /hadoop/common/branches/HDFS-5535: ./
dev-support/test-patch.sh pom.xml
Author: szetszwo
Date: Fri Feb 7 02:43:04 2014
New Revision: 1565519
URL: http://svn.apache.org/r1565519
Log:
Merge r1555021 through r1565516 from trunk.
Modified:
hadoop/common/branches/HDFS-5535/ (props changed)
hadoop/common/branches/HDFS-5535/dev-support/test-patch.sh
hadoop/common/branches/HDFS-5535/pom.xml
Propchange: hadoop/common/branches/HDFS-5535/
------------------------------------------------------------------------------
Merged /hadoop/common/trunk:r1563385-1565516
Modified: hadoop/common/branches/HDFS-5535/dev-support/test-patch.sh
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-5535/dev-support/test-patch.sh?rev=1565519&r1=1565518&r2=1565519&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-5535/dev-support/test-patch.sh (original)
+++ hadoop/common/branches/HDFS-5535/dev-support/test-patch.sh Fri Feb 7 02:43:04 2014
@@ -300,6 +300,17 @@ prebuildWithoutPatch () {
{color:red}-1 patch{color}. Trunk compilation may be broken."
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
}
@@ -401,6 +412,11 @@ applyPatch () {
}
###############################################################################
+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 ""
@@ -420,24 +436,29 @@ checkJavadocWarnings () {
(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
- javadocWarnings=`$GREP '\[WARNING\]' $PATCH_DIR/patchJavadocWarnings.txt | $AWK '/Javadoc Warnings/,EOF' | $GREP warning | $AWK 'BEGIN {total = 0} {total += 1} END {print total}'`
- echo ""
- echo ""
- echo "There appear to be $javadocWarnings javadoc warnings generated by the patched build."
-
- #There are 14 warnings that are caused by things that are caused by using sun internal APIs.
- #There are 2 warnings that are caused by the Apache DS Dn class used in MiniKdc.
- OK_JAVADOC_WARNINGS=16;
- ### if current warnings greater than OK_JAVADOC_WARNINGS
- if [[ $javadocWarnings -ne $OK_JAVADOC_WARNINGS ]] ; then
- JIRA_COMMENT="$JIRA_COMMENT
+ 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 $(($javadocWarnings-$OK_JAVADOC_WARNINGS))` warning messages."
- return 1
+ {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}. The javadoc tool did not generate any warning messages."
+ {color:green}+1 javadoc{color}. There were no new javadoc warning messages."
return 0
}
Modified: hadoop/common/branches/HDFS-5535/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-5535/pom.xml?rev=1565519&r1=1565518&r2=1565519&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-5535/pom.xml (original)
+++ hadoop/common/branches/HDFS-5535/pom.xml Fri Feb 7 02:43:04 2014
@@ -152,7 +152,7 @@ xsi:schemaLocation="http://maven.apache.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.2</version>
+ <version>3.3</version>
<dependencies>
<dependency><!-- add support for ssh/scp -->
<groupId>org.apache.maven.wagon</groupId>
@@ -329,7 +329,7 @@ xsi:schemaLocation="http://maven.apache.
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
- <version>3.0</version>
+ <version>3.3</version>
<executions>
<execution>
<id>attach-descriptor</id>