From 93a08a975137c4fdf3e407972ce284f86de57e91 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 8 Mar 2013 20:56:02 +0000 Subject: [PATCH] HBASE-8035 Add site target check to precommit tests git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1454548 13f79535-47bb-0310-9956-ffa450edef68 --- dev-support/test-patch.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index 8105565ecac..df08f389a13 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -677,6 +677,34 @@ runTests () { return $BAD } +############################################################################### +### Check docbook site xml +checkSiteXml () { + echo "" + echo "" + echo "======================================================================" + echo "======================================================================" + echo " Checking Site generation" + echo "======================================================================" + echo "======================================================================" + echo "" + echo "" + + echo "$MVN clean compile site -DskipTests -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/patchSiteOutput.txt 2>&1" + export MAVEN_OPTS="${MAVEN_OPTS}" + $MVN clean compile site -DskipTests -D${PROJECT_NAME}PatchProcess > $PATCH_DIR/patchSiteOutput.txt 2>&1 + if [[ $? != 0 ]] ; then + JIRA_COMMENT="$JIRA_COMMENT + + {color:red}-1 site{color}. The patch appears to cause mvn site goal to fail." + return 1 + fi + JIRA_COMMENT="$JIRA_COMMENT + + {color:green}+1 site{color}. The mvn site goal succeeds with this patch." + return 0 +} + ############################################################################### ### Run the inject-system-faults target checkInjectSystemFaults () { @@ -817,6 +845,8 @@ checkReleaseAuditWarnings (( RESULT = RESULT + $? )) checkLineLengths (( RESULT = RESULT + $? )) +checkSiteXml +(( RESULT = RESULT + $?)) ### Do not call these when run by a developer if [[ $JENKINS == "true" ]] ; then runTests