You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by tu...@apache.org on 2012/10/02 16:24:44 UTC
svn commit: r1392925 - /oozie/trunk/bin/
Author: tucu
Date: Tue Oct 2 14:24:43 2012
New Revision: 1392925
URL: http://svn.apache.org/viewvc?rev=1392925&view=rev
Log:
OOZIE-992 Amendment (tucu)
Modified:
oozie/trunk/bin/test-patch
oozie/trunk/bin/test-patch-00-clean
oozie/trunk/bin/test-patch-05-patch-raw-analysis
oozie/trunk/bin/test-patch-08-rat
oozie/trunk/bin/test-patch-09-javadoc
oozie/trunk/bin/test-patch-10-compile
oozie/trunk/bin/test-patch-15-backwards-compatibility
oozie/trunk/bin/test-patch-20-tests
oozie/trunk/bin/test-patch-30-distro
oozie/trunk/bin/test-patch-XX-template
Modified: oozie/trunk/bin/test-patch
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch (original)
+++ oozie/trunk/bin/test-patch Tue Oct 2 14:24:43 2012
@@ -272,12 +272,9 @@ applyPatch() {
>> $STDOUT
if [[ ${PIPESTATUS[0]} != 0 ]] ; then
echo "Patch failed to apply to head of branch"
- echo "{color:red}-1{code} Patch failed to apply to head of branch" >> ${SUMMARYFILE}
+ echo "{color:red}-1{color} Patch failed to apply to head of branch" >> ${SUMMARYFILE}
echo "" >> ${SUMMARYFILE}
echo "----------------------------" >> ${SUMMARYFILE}
- if [ "${JIRAUPDATE}" == "true" ] ; then
- echo "{code}" >> ${SUMMARYFILE}
- fi
echo
cleanupAndExit 1
fi
@@ -394,11 +391,10 @@ if [[ $WARNINGS != 0 ]]; then
fi
echo "" >> ${SUMMARYFILE}
-
if [ ! -z "${JIRAISSUE}" ]; then
echo "The full output of the test-patch run is available at" >> ${SUMMARYFILE}
echo "" >> ${SUMMARYFILE}
- echo " ${BUILD_URL}" >> ${SUMMARYFILE}
+ echo ". ${BUILD_URL}" >> ${SUMMARYFILE}
echo "" >> ${SUMMARYFILE}
cat ${SUMMARYFILE}
else
Modified: oozie/trunk/bin/test-patch-00-clean
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-00-clean?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-00-clean (original)
+++ oozie/trunk/bin/test-patch-00-clean Tue Oct 2 14:24:43 2012
@@ -88,7 +88,7 @@ case $OP in
post)
;;
report)
- echo " ${TASKNAME} cleaned target directories" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME} cleaned target directories" >> $SUMMARYFILE
;;
esac
Modified: oozie/trunk/bin/test-patch-05-patch-raw-analysis
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-05-patch-raw-analysis?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-05-patch-raw-analysis (original)
+++ oozie/trunk/bin/test-patch-05-patch-raw-analysis Tue Oct 2 14:24:43 2012
@@ -78,25 +78,25 @@ checkNoAuthors() {
if [[ ${authorTags} != 0 ]] ; then
REPORT+=("{color:red}-1{color} the patch seems to contain ${authorTags} line(s) with @author tags")
else
- REPORT+=("{color:green}+1{code} the patch does not introduce any @author tags")
+ REPORT+=("{color:green}+1{color} the patch does not introduce any @author tags")
fi
}
###############################################################################
checkNoTabs() {
tabs=`grep "^+ " ${PATCHFILE} | grep -c -P "\t"`
if [[ ${tabs} != 0 ]] ; then
- REPORT+=("{color:red}-1{code} the patch contains ${tabs} line(s) with tabs")
+ REPORT+=("{color:red}-1{color} the patch contains ${tabs} line(s) with tabs")
else
- REPORT+=("{color:green}+1{code} the patch does not introduce any tabs")
+ REPORT+=("{color:green}+1{color} the patch does not introduce any tabs")
fi
}
###############################################################################
checkNoTrailingSpaces() {
trailingSpaces=`grep "^+ " ${PATCHFILE} | grep -c -e " $"`
if [[ ${trailingSpaces} != 0 ]] ; then
- REPORT+=("{color:red}-1{code} the patch contains ${trailingSpaces} line(s) with trailing spaces")
+ REPORT+=("{color:red}-1{color} the patch contains ${trailingSpaces} line(s) with trailing spaces")
else
- REPORT+=("{color:green}+1{code} the patch does not introduce any trailing spaces")
+ REPORT+=("{color:green}+1{color} the patch does not introduce any trailing spaces")
fi
}
###############################################################################
@@ -104,20 +104,20 @@ checkLinesLength() {
# We check for > 133 to account for the "+" sign
longLines=`grep "^+ " ${PATCHFILE} | awk 'BEGIN{count=0}{if ( length > 133 ) { count=count+1} }END{ print count}'`
if [[ ${longLines} != 0 ]] ; then
- REPORT+=("{color:red}-1{code} the patch contains ${longLines} line(s) longer than 132 characters")
+ REPORT+=("{color:red}-1{color} the patch contains ${longLines} line(s) longer than 132 characters")
else
- REPORT+=("{color:green}+1{code} the patch does not introduce any line longer than 132")
+ REPORT+=("{color:green}+1{color} the patch does not introduce any line longer than 132")
fi
}
###############################################################################
checkForTestcases() {
testcases=`grep -c -i -e '^+++.*/test' ${PATCHFILE}`
if [[ ${testcases} == 0 ]] ; then
- REPORT+=("{color:red}-1{code} the patch does not add/modify any testcase")
+ REPORT+=("{color:red}-1{color} the patch does not add/modify any testcase")
#reverting for summary +1 calculation
testcases=1
else
- REPORT+=("{color:green}+1{code} the patch does adds/modifies ${testcases} testcase(s)")
+ REPORT+=("{color:green}+1{color} the patch does adds/modifies ${testcases} testcase(s)")
#reverting for summary +1 calculation
testcases=0
fi
@@ -140,12 +140,12 @@ case $OP in
checkForTestcases
total=`expr $authorTags + $tabs + $trailingSpaces + $longLines + $testcases`
if [[ $total == 0 ]] ; then
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
else
- echo "{color:red}-1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME}" >> $SUMMARYFILE
fi
for line in "${REPORT[@]}" ; do
- echo " ${line}" >> $SUMMARYFILE
+ echo ". ${line}" >> $SUMMARYFILE
done
;;
esac
Modified: oozie/trunk/bin/test-patch-08-rat
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-08-rat?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-08-rat (original)
+++ oozie/trunk/bin/test-patch-08-rat Tue Oct 2 14:24:43 2012
@@ -85,10 +85,10 @@ checkForWarnings() {
patchWarns=`grep -c '\!?????' ${REPORTDIR}/${TASKNAME}-patch.txt`
newWarns=`expr $patchWarns - $cleanWarns`
if [[ $newWarns -le 0 ]] ; then
- REPORT+=("{color:green}+1{code} the patch does not seem to introduce new RAT warnings")
+ REPORT+=("{color:green}+1{color} the patch does not seem to introduce new RAT warnings")
newWarns=0
else
- REPORT+=("{color:red}-1{code} the patch seems to introduce $newWarns new RAT warning(s)")
+ REPORT+=("{color:red}-1{color} the patch seems to introduce $newWarns new RAT warning(s)")
newWarns=1
fi
if [[ $cleanWarns != 0 ]] ; then
@@ -112,12 +112,12 @@ case $OP in
report)
checkForWarnings
if [[ $newWarns == 0 ]] ; then
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
else
- echo "{color:red}-1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME}" >> $SUMMARYFILE
fi
for line in "${REPORT[@]}" ; do
- echo " ${line}" >> $SUMMARYFILE
+ echo ". ${line}" >> $SUMMARYFILE
done
;;
esac
Modified: oozie/trunk/bin/test-patch-09-javadoc
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-09-javadoc?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-09-javadoc (original)
+++ oozie/trunk/bin/test-patch-09-javadoc Tue Oct 2 14:24:43 2012
@@ -81,10 +81,10 @@ checkForWarnings() {
patchWarns=`grep '\[WARNING\]' ${REPORTDIR}/${TASKNAME}-patch.txt | awk '/Javadoc Warnings/,EOF' | grep warning | awk 'BEGIN {total = 0} {total += 1} END {print total}'`
newWarns=`expr $patchWarns - $cleanWarns`
if [[ $newWarns -le 0 ]] ; then
- REPORT+=("{color:green}+1{code} the patch does not seem to introduce new Javadoc warnings")
+ REPORT+=("{color:green}+1{color} the patch does not seem to introduce new Javadoc warnings")
newWarns=0
else
- REPORT+=("{color:red}-1{code} the patch seems to introduce $newWarns new Javadoc warning(s)")
+ REPORT+=("{color:red}-1{color} the patch seems to introduce $newWarns new Javadoc warning(s)")
newWarns=1
fi
if [[ $cleanWarns != 0 ]] ; then
@@ -105,12 +105,12 @@ case $OP in
report)
checkForWarnings
if [[ $newWarns == 0 ]] ; then
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
else
- echo "{color:red}-1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME}" >> $SUMMARYFILE
fi
for line in "${REPORT[@]}" ; do
- echo " ${line}" >> $SUMMARYFILE
+ echo ". ${line}" >> $SUMMARYFILE
done
;;
esac
Modified: oozie/trunk/bin/test-patch-10-compile
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-10-compile?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-10-compile (original)
+++ oozie/trunk/bin/test-patch-10-compile Tue Oct 2 14:24:43 2012
@@ -87,10 +87,10 @@ checkForWarnings() {
patchWarns=`cat ${TEMPDIR}/${TASKNAME}-javacwarns-patch.txt | awk 'BEGIN {total = 0} {total += 1} END {print total}'`
newWarns=`expr $patchWarns - $cleanWarns`
if [[ $newWarns -le 0 ]] ; then
- REPORT+=("{color:green}+1{code} the patch does not seem to introduce new javac warnings")
+ REPORT+=("{color:green}+1{color} the patch does not seem to introduce new javac warnings")
newWarns=0
else
- REPORT+=("{color:red}-1{code} the patch seems to introduce $newWarns new javac warning(s)")
+ REPORT+=("{color:red}-1{color} the patch seems to introduce $newWarns new javac warning(s)")
newWarns=1
fi
}
@@ -103,17 +103,17 @@ case $OP in
pre)
mvn clean test -PtestPatchCompile -DskipTests ${MVNPASSTHRU} | tee ${REPORTDIR}/${TASKNAME}-clean.txt >> $STDOUT
if [[ ${PIPESTATUS[0]} == 0 ]] ; then
- echo "{color:green}+1{code} HEAD compiles" >> ${TEMPDIR}/${TASKNAME}-compile.txt
+ echo "{color:green}+1{color} HEAD compiles" >> ${TEMPDIR}/${TASKNAME}-compile.txt
else
- echo "{color:red}-1{code} HEAD does not compile" >> ${TEMPDIR}/${TASKNAME}-compile.txt
+ echo "{color:red}-1{color} HEAD does not compile" >> ${TEMPDIR}/${TASKNAME}-compile.txt
fi
;;
post)
mvn clean test -PtestPatchCompile -DskipTests ${MVNPASSTHRU} | tee ${REPORTDIR}/${TASKNAME}-patch.txt >> $STDOUT
if [[ ${PIPESTATUS[0]} == 0 ]] ; then
- echo "{color:green}+1{code} patch compiles" >> ${TEMPDIR}/${TASKNAME}-compile.txt
+ echo "{color:green}+1{color} patch compiles" >> ${TEMPDIR}/${TASKNAME}-compile.txt
else
- echo "{color:red}-1{code} patch does not compile" >> ${TEMPDIR}/${TASKNAME}-compile.txt
+ echo "{color:red}-1{color} patch does not compile" >> ${TEMPDIR}/${TASKNAME}-compile.txt
fi
;;
report)
@@ -128,12 +128,12 @@ case $OP in
checkForWarnings
total=`expr $compileErrors + $newWarns`
if [[ $total == 0 ]] ; then
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
else
- echo "{color:red}-1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME}" >> $SUMMARYFILE
fi
for line in "${REPORT[@]}" ; do
- echo " ${line}" >> $SUMMARYFILE
+ echo ". ${line}" >> $SUMMARYFILE
done
;;
esac
Modified: oozie/trunk/bin/test-patch-15-backwards-compatibility
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-15-backwards-compatibility?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-15-backwards-compatibility (original)
+++ oozie/trunk/bin/test-patch-15-backwards-compatibility Tue Oct 2 14:24:43 2012
@@ -76,9 +76,9 @@ parseArgs() {
checkJPAAnnotations() {
annotations=`grep -c -E "^(\+|\-).*(@Column|@Lob|@Basic|@Entity|@Transient)" ${PATCHFILE}`
if [[ ${annotations} != 0 ]] ; then
- REPORT+=("{color:red}-1{code} the patch seems to change ${annotations} line(s) with JPA Entity/Colum/Basic/Lob/Transient annotations")
+ REPORT+=("{color:red}-1{color} the patch seems to change ${annotations} line(s) with JPA Entity/Colum/Basic/Lob/Transient annotations")
else
- REPORT+=("{color:green}+1{code} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations")
+ REPORT+=("{color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations")
fi
}
###############################################################################
@@ -87,9 +87,9 @@ checkJPAFiles() {
ormXml=`grep -c -i -E '^\+\+\+.*/*-orm.xml' ${PATCHFILE}`
jpaFiles=`expr $persistenceXml + $ormXml`
if [[ ${jpaFiles} != 0 ]] ; then
- REPORT+=("{color:red}-1{code} the patch modifies ${jpaFiles} JPA file(s), persistence.xml or *-orm.xml")
+ REPORT+=("{color:red}-1{color} the patch modifies ${jpaFiles} JPA file(s), persistence.xml or *-orm.xml")
else
- REPORT+=("{color:green}+1{code} the patch does not modify JPA files")
+ REPORT+=("{color:green}+1{color} the patch does not modify JPA files")
fi
}
###############################################################################
@@ -107,12 +107,12 @@ case $OP in
checkJPAFiles
total=`expr $annotations + $jpaFiles`
if [[ $total == 0 ]] ; then
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
else
- echo "{color:red}-1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME}" >> $SUMMARYFILE
fi
for line in "${REPORT[@]}" ; do
- echo " ${line}" >> $SUMMARYFILE
+ echo ". ${line}" >> $SUMMARYFILE
done
;;
esac
Modified: oozie/trunk/bin/test-patch-20-tests
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-20-tests?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-20-tests (original)
+++ oozie/trunk/bin/test-patch-20-tests Tue Oct 2 14:24:43 2012
@@ -110,19 +110,19 @@ case $OP in
testsExitCode=`cat ${TEMPDIR}/${TASKNAME}.exitCode`
if [[ "$testsExitCode" != "0" ]] ; then
if [ -n "${failedTests}" ] ; then
- echo "{color:red}-1{code} ${TASKNAME} - the patch failed the following testcases:" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME} - the patch failed the following testcases:" >> $SUMMARYFILE
echo "" >> ${SUMMARYFILE}
echo "${failedTests}" >> $SUMMARYFILE
echo "" >> ${SUMMARYFILE}
else
- echo "{color:red}-1{code} ${TASKNAME} - patch does not compile, cannot run testcases" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME} - patch does not compile, cannot run testcases" >> $SUMMARYFILE
fi
else
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
fi
- echo " $testsRun" >> $SUMMARYFILE
- echo " $testsFailed" >> $SUMMARYFILE
- echo " $testsErrors" >> $SUMMARYFILE
+ echo ". $testsRun" >> $SUMMARYFILE
+ echo ". $testsFailed" >> $SUMMARYFILE
+ echo ". $testsErrors" >> $SUMMARYFILE
;;
esac
Modified: oozie/trunk/bin/test-patch-30-distro
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-30-distro?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-30-distro (original)
+++ oozie/trunk/bin/test-patch-30-distro Tue Oct 2 14:24:43 2012
@@ -94,11 +94,11 @@ case $OP in
report)
exitCode=`cat ${TEMPDIR}/${TASKNAME}.exitCode`
if [[ "$exitCode" != "0" ]] ; then
- echo "{color:red}-1{code} ${TASKNAME}" >> $SUMMARYFILE
- echo " {color:red}-1{code} distro tarball fails with the patch" >> $SUMMARYFILE
+ echo "{color:red}-1{color} ${TASKNAME}" >> $SUMMARYFILE
+ echo ". {color:red}-1{color} distro tarball fails with the patch" >> $SUMMARYFILE
else
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
- echo " {color:green}+1{code} distro tarball builds with the patch " >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
+ echo ". {color:green}+1{color} distro tarball builds with the patch " >> $SUMMARYFILE
fi
;;
esac
Modified: oozie/trunk/bin/test-patch-XX-template
URL: http://svn.apache.org/viewvc/oozie/trunk/bin/test-patch-XX-template?rev=1392925&r1=1392924&r2=1392925&view=diff
==============================================================================
--- oozie/trunk/bin/test-patch-XX-template (original)
+++ oozie/trunk/bin/test-patch-XX-template Tue Oct 2 14:24:43 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ case $OP in
post)
;;
report)
- echo "{color:green}+1{code} ${TASKNAME}" >> $SUMMARYFILE
+ echo "{color:green}+1{color} ${TASKNAME}" >> $SUMMARYFILE
;;
esac