Forráskód Böngészése

HADOOP-6250. Modify test-patch to delete copied XML files before running patch build. Contributed by Rahul Kumar Singh.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@815317 13f79535-47bb-0310-9956-ffa450edef68
Hemanth Yamijala 16 éve
szülő
commit
78cff65f33
2 módosított fájl, 15 hozzáadás és 0 törlés
  1. 3 0
      CHANGES.txt
  2. 12 0
      src/test/bin/test-patch.sh

+ 3 - 0
CHANGES.txt

@@ -1018,6 +1018,9 @@ Trunk (unreleased changes)
     header would cause the reader to read the sync marker as a record. (Jay
     Booth via cdouglas)
 
+    HADOOP-6250. Modify test-patch to delete copied XML files before running
+    patch build. (Rahul Kumar Singh via yhemanth)
+
 Release 0.20.1 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 12 - 0
src/test/bin/test-patch.sh

@@ -254,6 +254,15 @@ checkTests () {
   return 0
 }
 
+cleanUpXml () {
+  cd $BASEDIR/conf
+  for file in `ls *.xml.template`
+    do
+      rm -f `basename $file .template`
+    done
+  cd $BASEDIR  
+}
+
 ###############################################################################
 ### Attempt to apply the patch
 applyPatch () {
@@ -682,6 +691,9 @@ checkAuthor
 RESULT=$?
 
 checkTests
+if [[ $HUDSON == "true" ]] ; then
+  cleanUpXml
+fi
 (( RESULT = RESULT + $? ))
 applyPatch
 if [[ $? != 0 ]] ; then