Browse Source

HADOOP-6374. svn merge -c 901540 from trunk to branch-0.21

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.21@901853 13f79535-47bb-0310-9956-ffa450edef68
Konstantin Boudnik 15 years ago
parent
commit
f8863cdd0d
2 changed files with 13 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 10 1
      build.xml

+ 3 - 0
CHANGES.txt

@@ -1141,6 +1141,9 @@ Release 0.21.0 - Unreleased
 
     HADOOP-6451. Fix build to run contrib unit tests. (Tom White via cdouglas)
 
+    HADOOP-6374. JUnit tests should never depend on anything in conf.
+    (Anatoli Fomenko via cos)
+
 Release 0.20.2 - Unreleased
 
   NEW FEATURES

+ 10 - 1
build.xml

@@ -87,6 +87,7 @@
   <property name="test.junit.printsummary" value="yes" />
   <property name="test.junit.haltonfailure" value="no" />
   <property name="test.junit.maxmemory" value="512m" />
+  <property name="test.conf.dir" value="${build.dir}/test/conf" />
 
   <property name="test.core.build.classes" value="${test.build.dir}/core/classes"/>
 
@@ -190,7 +191,9 @@
     <pathelement location="${build.tools}"/>
     <pathelement path="${clover.jar}"/>
     <path refid="ivy-test.classpath"/>
-    <path refid="classpath"/>
+    <pathelement location="${build.classes}"/>
+    <pathelement location="${test.conf.dir}"/>
+    <path refid="ivy-common.classpath"/>
   </path>
 <!--
   <path id="test.hdfs.classpath">
@@ -256,6 +259,12 @@
       <mapper type="glob" from="*.template" to="*"/>
     </copy>
 
+    <mkdir dir="${test.conf.dir}"/>
+    <copy todir="${test.conf.dir}" verbose="true">
+      <fileset dir="${conf.dir}" includes="**/*.template"/>
+      <mapper type="glob" from="*.template" to="*"/>
+    </copy>
+
     <copy todir="${contrib.dir}" verbose="true">
       <fileset dir="${contrib.dir}" includes="**/*.template"/>
       <mapper type="glob" from="*.template" to="*"/>