Author: szetszwo
Date: Wed Sep 24 13:38:08 2008
New Revision: 698721
URL: http://svn.apache.org/viewvc?rev=698721&view=rev
Log:
HADOOP-4244. Change test-patch.sh to check Eclipse classpath no matter it is
run by Hudson or not. (szetszwo)
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/test/bin/test-patch.sh
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=698721&r1=698720&r2=698721&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Sep 24 13:38:08 2008
@@ -14,6 +14,9 @@
HADOOP-4245. Update to latest version of KFS "glue" library jar.
(Sriram Rao via lohit)
+ HADOOP-4244. Change test-patch.sh to check Eclipse classpath no matter
+ it is run by Hudson or not. (szetszwo)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/core/trunk/src/test/bin/test-patch.sh
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/bin/test-patch.sh?rev=698721&r1=698720&r2=698721&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/bin/test-patch.sh (original)
+++ hadoop/core/trunk/src/test/bin/test-patch.sh Wed Sep 24 13:38:08 2008
@@ -491,7 +491,7 @@
###############################################################################
### Tests parts of contrib specific to the eclipse files
-runContribTestOnEclipseFiles () {
+checkJarFilesDeclaredInEclipse () {
export DECLARED_JARS=$(sed -n '[EMAIL
PROTECTED]"lib".*path="\(.*jar\)"[EMAIL PROTECTED]@p' <
.eclipse.templates/.classpath)
export PRESENT_JARS=$(find lib/ src/test/lib/ -name '*.jar' |sort)
# When run by Hudson, consider libs from ${SUPPORT_DIR} declared
@@ -515,6 +515,29 @@
return 0
}
+checkEclipse () {
+ echo ""
+ echo ""
+ echo "======================================================================"
+ echo "======================================================================"
+ echo " Running Eclipse classpath verification."
+ echo "======================================================================"
+ echo "======================================================================"
+ echo ""
+ echo ""
+
+ checkJarFilesDeclaredInEclipse
+ if [[ $? != 0 ]] ; then
+ JIRA_COMMENT="$JIRA_COMMENT
+
+ -1 Eclipse classpath. The patch causes the Eclipse classpath to differ
from the contents of the lib directories."
+ return 1
+ fi
+ JIRA_COMMENT="$JIRA_COMMENT
+
+ +1 Eclipse classpath. The patch retains Eclipse classpath integrity."
+ return 0
+}
###############################################################################
### Run the test-contrib target
runContribTests () {
@@ -531,8 +554,8 @@
### Kill any rogue build processes from the last attempt
$PS -auxwww | $GREP HadoopPatchProcess | /usr/bin/nawk '{print $2}' |
/usr/bin/xargs -t -I {} /usr/bin/kill -9 {} > /dev/null
- echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY
$PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml
-Dtest.output=yes test-contrib && runContribTestOnEclipseFiles"
- $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY
-DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes
test-contrib && runContribTestOnEclipseFiles
+ echo "$ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY
$PYTHON_PROPERTY -DHadoopPatchProcess= -Dtest.junit.output.format=xml
-Dtest.output=yes test-contrib"
+ $ANT_HOME/bin/ant -Dversion="${VERSION}" $ECLIPSE_PROPERTY $PYTHON_PROPERTY
-DHadoopPatchProcess= -Dtest.junit.output.format=xml -Dtest.output=yes
test-contrib
if [[ $? != 0 ]] ; then
JIRA_COMMENT="$JIRA_COMMENT
@@ -650,6 +673,8 @@
(( RESULT = RESULT + $? ))
checkFindbugsWarnings
(( RESULT = RESULT + $? ))
+checkEclipse
+(( RESULT = RESULT + $? ))
### Do not call these when run by a developer
if [[ $HUDSON == "true" ]] ; then
### DISABLE RELEASE AUDIT UNTIL HADOOP-4074 IS FIXED