Selaa lähdekoodia

HADOOP-818. Fix contrib unit tests to not depend on core unit tests. Contributed by Owen.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@486289 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 vuotta sitten
vanhempi
commit
af258a9916

+ 3 - 0
CHANGES.txt

@@ -45,6 +45,9 @@ Trunk (unreleased changes)
     speed the shuffle and make things more scalable.
     speed the shuffle and make things more scalable.
     (Devaraj Das via cutting)
     (Devaraj Das via cutting)
 
 
+13. HADOOP-818. Fix contrib unit tests to not depend on core unit
+    tests.  (omalley via cutting)
+
 
 
 Release 0.9.1 - 2006-12-06
 Release 0.9.1 - 2006-12-06
 
 

+ 4 - 5
src/contrib/build-contrib.xml

@@ -27,7 +27,6 @@
   <property name="hadoop.log.dir" location="${build.dir}/test/logs"/>
   <property name="hadoop.log.dir" location="${build.dir}/test/logs"/>
   <!-- all jars together -->
   <!-- all jars together -->
   <property name="deploy.dir" location="${hadoop.root}/build/"/>
   <property name="deploy.dir" location="${hadoop.root}/build/"/>
-  <property name="minimr.dir" value="${hadoop.root}/build/minimr"/>
   <property name="javac.deprecation" value="off"/>
   <property name="javac.deprecation" value="off"/>
   <property name="javac.debug" value="on"/>
   <property name="javac.debug" value="on"/>
 
 
@@ -52,8 +51,7 @@
   <path id="test.classpath">
   <path id="test.classpath">
     <pathelement location="${build.test}" />
     <pathelement location="${build.test}" />
     <pathelement location="${hadoop.root}/build/test/classes"/>
     <pathelement location="${hadoop.root}/build/test/classes"/>
-    <pathelement location="${minimr.dir}" />
-    <pathelement location="${hadoop.root}/src/test"/>
+    <pathelement location="${hadoop.root}/src/contrib/test"/>
     <pathelement location="${conf.dir}"/>
     <pathelement location="${conf.dir}"/>
     <pathelement location="${hadoop.root}/build"/>
     <pathelement location="${hadoop.root}/build"/>
     <path refid="classpath"/>
     <path refid="classpath"/>
@@ -72,7 +70,6 @@
     <mkdir dir="${build.classes}"/>
     <mkdir dir="${build.classes}"/>
     <mkdir dir="${build.test}"/>
     <mkdir dir="${build.test}"/>
     <mkdir dir="${hadoop.log.dir}"/>
     <mkdir dir="${hadoop.log.dir}"/>
-    <mkdir dir="${minimr.dir}"/>
     <antcall target="init-contrib"/>
     <antcall target="init-contrib"/>
   </target>
   </target>
 
 
@@ -137,10 +134,12 @@
     <delete dir="${hadoop.log.dir}"/>
     <delete dir="${hadoop.log.dir}"/>
     <mkdir dir="${hadoop.log.dir}"/>
     <mkdir dir="${hadoop.log.dir}"/>
     <junit
     <junit
-      printsummary="withOutAndErr" showoutput="no" haltonfailure="no" fork="yes"
+      printsummary="yes" showoutput="${test.output}" 
+      haltonfailure="no" fork="yes"
       errorProperty="tests.failed" failureProperty="tests.failed">
       errorProperty="tests.failed" failureProperty="tests.failed">
       
       
       <sysproperty key="test.build.data" value="${build.test}/data"/>
       <sysproperty key="test.build.data" value="${build.test}/data"/>
+      <sysproperty key="build.test" value="${build.test}"/>
       
       
       <!-- requires fork=yes for: 
       <!-- requires fork=yes for: 
         relative File paths to use the specified user.dir 
         relative File paths to use the specified user.dir 

+ 18 - 0
src/contrib/test/hadoop-site.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="nutch-conf.xsl"?>
+
+<!-- Values used when running unit tests.  This is mostly empty, to -->
+<!-- use of the default values, overriding the potentially -->
+<!-- user-editted hadoop-site.xml in the conf/ directory.  -->
+
+<configuration>
+
+
+<property>
+  <name>hadoop.tmp.dir</name>
+  <value>${build.test}</value>
+  <description>A base for other temporary directories.</description>
+</property>
+
+
+</configuration>

+ 10 - 0
src/contrib/test/mapred-default.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="nutch-conf.xsl"?>
+
+<!-- Values used when running unit tests.  This is mostly empty, to -->
+<!-- use of the default values, overriding the potentially -->
+<!-- user-editted mapred-default.xml in the conf/ directory.  -->
+
+<configuration>
+
+</configuration>