Author: nigel
Date: Mon Jul  7 22:08:57 2008
New Revision: 674720

URL: http://svn.apache.org/viewvc?rev=674720&view=rev
Log:
HADOOP-3653. Fix test-patch target to properly account for Eclipse classpath 
jars. Contributed by Brice Arnould.

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=674720&r1=674719&r2=674720&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Jul  7 22:08:57 2008
@@ -771,6 +771,9 @@
     HADOOP-3693. Fix archives, distcp and native library documentation to
     conform to style guidelines. (Amareshwari Sriramadasu via cdouglas)
 
+    HADOOP-3653. Fix test-patch target to properly account for Eclipse
+    classpath jars. (Brice Arnould via nigel)
+
 Release 0.17.1 - Unreleased
 
   INCOMPATIBLE CHANGES

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=674720&r1=674719&r2=674720&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/bin/test-patch.sh (original)
+++ hadoop/core/trunk/src/test/bin/test-patch.sh Mon Jul  7 22:08:57 2008
@@ -468,10 +468,16 @@
 ###############################################################################
 ### Tests parts of contrib specific to the eclipse files
 runContribTestOnEclipseFiles () {
-  export ECLIPSE_DECLARED_JARS=$(sed -n '[EMAIL 
PROTECTED]"lib".*path="\(.*jar\)"[EMAIL PROTECTED]@p' < 
.eclipse.templates/.classpath |sort)
-  export PRESENT_JARS=$(find lib/ -name '*.jar' |sort)
+  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
+  if [[ ${HUDSON} == "true" ]]; then
+      DECLARED_JARS="${DECLARED_JARS} $(cd "${SUPPORT_DIR}"; find lib -name 
'*.jar')"
+  fi
+  DECLARED_JARS=$(sed 'y/ /\n/' <<< ${DECLARED_JARS} | sort)
   export ECLIPSE_DECLARED_SRC=$(sed -n '[EMAIL 
PROTECTED]"src".*path="\(.*\)"[EMAIL PROTECTED]@p' < 
.eclipse.templates/.classpath |sort)
-  if [ "${ECLIPSE_DECLARED_JARS}" != "${PRESENT_JARS}" ]; then
+
+  if [ "${DECLARED_JARS}" != "${PRESENT_JARS}" ]; then
     echo "Some jars are not declared in the Eclipse project."
     return 1
   fi


Reply via email to