HADOOP-7005: Update test-patch.sh to remove callback to Hudson master. Contributed by nigel.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1027235 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nigel Daley 2010-10-25 18:59:28 +00:00
parent 13fcef246e
commit 217ce2dcf3
2 changed files with 14 additions and 15 deletions

View File

@ -142,6 +142,8 @@ Trunk (unreleased changes)
HADOOP-6987. Use JUnit Rule to optionally fail test cases that run more HADOOP-6987. Use JUnit Rule to optionally fail test cases that run more
than 10 seconds (jghoman) than 10 seconds (jghoman)
HADOOP-7005. Update test-patch.sh to remove callback to Hudson. (nigel)
OPTIMIZATIONS OPTIMIZATIONS
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..). HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

View File

@ -16,7 +16,7 @@
ulimit -n 1024 ulimit -n 1024
### Setup some variables. ### Setup some variables.
### JOB_NAME, SVN_REVISION, and BUILD_NUMBER are set by Hudson if it is run by patch process ### SVN_REVISION and BUILD_URL are set by Hudson if it is run by patch process
############################################################################### ###############################################################################
parseArgs() { parseArgs() {
@ -24,8 +24,8 @@ parseArgs() {
HUDSON) HUDSON)
### Set HUDSON to true to indicate that this script is being run by Hudson ### Set HUDSON to true to indicate that this script is being run by Hudson
HUDSON=true HUDSON=true
if [[ $# != 19 ]] ; then if [[ $# != 18 ]] ; then
echo "ERROR: usage $0 HUDSON <PATCH_DIR> <SUPPORT_DIR> <PS_CMD> <WGET_CMD> <JIRACLI> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <ECLIPSE_HOME> <PYTHON_HOME> <WORKSPACE_BASEDIR> <TRIGGER_BUILD> <JIRA_PASSWD> <JAVA5_HOME> <CURL_CMD> <DEFECT> " echo "ERROR: usage $0 HUDSON <PATCH_DIR> <SUPPORT_DIR> <PS_CMD> <WGET_CMD> <JIRACLI> <SVN_CMD> <GREP_CMD> <PATCH_CMD> <FINDBUGS_HOME> <FORREST_HOME> <ECLIPSE_HOME> <PYTHON_HOME> <WORKSPACE_BASEDIR> <JIRA_PASSWD> <JAVA5_HOME> <CURL_CMD> <DEFECT> "
cleanupAndExit 0 cleanupAndExit 0
fi fi
PATCH_DIR=$2 PATCH_DIR=$2
@ -41,11 +41,10 @@ parseArgs() {
ECLIPSE_HOME=${12} ECLIPSE_HOME=${12}
PYTHON_HOME=${13} PYTHON_HOME=${13}
BASEDIR=${14} BASEDIR=${14}
TRIGGER_BUILD_URL=${15} JIRA_PASSWD=${15}
JIRA_PASSWD=${16} JAVA5_HOME=${16}
JAVA5_HOME=${17} CURL=${17}
CURL=${18} defect=${18}
defect=${19}
### Retrieve the defect number ### Retrieve the defect number
if [ -z "$defect" ] ; then if [ -z "$defect" ] ; then
@ -389,7 +388,7 @@ checkReleaseAuditWarnings () {
echo "Lines that start with ????? in the release audit report indicate files that do not have an Apache license header." > $PATCH_DIR/releaseAuditDiffWarnings.txt echo "Lines that start with ????? in the release audit report indicate files that do not have an Apache license header." > $PATCH_DIR/releaseAuditDiffWarnings.txt
echo "" > $PATCH_DIR/releaseAuditDiffWarnings.txt echo "" > $PATCH_DIR/releaseAuditDiffWarnings.txt
diff $PATCH_DIR/patchReleaseAuditProblems.txt $PATCH_DIR/trunkReleaseAuditProblems.txt >> $PATCH_DIR/releaseAuditDiffWarnings.txt diff $PATCH_DIR/patchReleaseAuditProblems.txt $PATCH_DIR/trunkReleaseAuditProblems.txt >> $PATCH_DIR/releaseAuditDiffWarnings.txt
JIRA_COMMENT_FOOTER="Release audit warnings: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt JIRA_COMMENT_FOOTER="Release audit warnings: $BUILD_URL/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt
$JIRA_COMMENT_FOOTER" $JIRA_COMMENT_FOOTER"
return 1 return 1
fi fi
@ -418,7 +417,7 @@ checkStyle () {
echo "" echo ""
echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= checkstyle" echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= checkstyle"
$ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= checkstyle $ANT_HOME/bin/ant -Dversion="${VERSION}" -DHadoopPatchProcess= checkstyle
JIRA_COMMENT_FOOTER="Checkstyle results: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/artifact/trunk/build/test/checkstyle-errors.html JIRA_COMMENT_FOOTER="Checkstyle results: $BUILD_URL/artifact/trunk/build/test/checkstyle-errors.html
$JIRA_COMMENT_FOOTER" $JIRA_COMMENT_FOOTER"
### TODO: calculate actual patchStyleErrors ### TODO: calculate actual patchStyleErrors
# patchStyleErrors=0 # patchStyleErrors=0
@ -454,7 +453,7 @@ checkFindbugsWarnings () {
-1 findbugs. The patch appears to cause Findbugs to fail." -1 findbugs. The patch appears to cause Findbugs to fail."
return 1 return 1
fi fi
JIRA_COMMENT_FOOTER="Findbugs warnings: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html JIRA_COMMENT_FOOTER="Findbugs warnings: $BUILD_URL/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
$JIRA_COMMENT_FOOTER" $JIRA_COMMENT_FOOTER"
cp $BASEDIR/build/test/findbugs/*.xml $PATCH_DIR/patchFindbugsWarnings.xml cp $BASEDIR/build/test/findbugs/*.xml $PATCH_DIR/patchFindbugsWarnings.xml
$FINDBUGS_HOME/bin/setBugDatabaseInfo -timestamp "01/01/1999" \ $FINDBUGS_HOME/bin/setBugDatabaseInfo -timestamp "01/01/1999" \
@ -697,7 +696,7 @@ cleanupAndExit () {
############################################################################### ###############################################################################
JIRA_COMMENT="" JIRA_COMMENT=""
JIRA_COMMENT_FOOTER="Console output: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/console JIRA_COMMENT_FOOTER="Console output: $BUILD_URL/console
This message is automatically generated." This message is automatically generated."
@ -709,8 +708,6 @@ checkout
RESULT=$? RESULT=$?
if [[ $HUDSON == "true" ]] ; then if [[ $HUDSON == "true" ]] ; then
if [[ $RESULT != 0 ]] ; then if [[ $RESULT != 0 ]] ; then
### Resubmit build.
$CURL $TRIGGER_BUILD_URL'&DEFECTNUM='$defect
exit 100 exit 100
fi fi
fi fi
@ -750,7 +747,7 @@ if [[ $HUDSON == "true" ]] ; then
fi fi
checkInjectSystemFaults checkInjectSystemFaults
(( RESULT = RESULT + $? )) (( RESULT = RESULT + $? ))
JIRA_COMMENT_FOOTER="Test results: http://hudson.zones.apache.org/hudson/job/$JOB_NAME/$BUILD_NUMBER/testReport/ JIRA_COMMENT_FOOTER="Test results: $BUILD_URL/testReport/
$JIRA_COMMENT_FOOTER" $JIRA_COMMENT_FOOTER"
submitJiraComment $RESULT submitJiraComment $RESULT