hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkesa...@apache.org
Subject svn commit: r800329 - in /hadoop/mapreduce/trunk: CHANGES.txt build.xml
Date Mon, 03 Aug 2009 12:12:29 GMT
Author: gkesavan
Date: Mon Aug  3 12:12:29 2009
New Revision: 800329

URL: http://svn.apache.org/viewvc?rev=800329&view=rev
Log:
MAPREDUCE-670. Creates ant target for 10 mins patch test build. Contributed by Jothi Padmanabhan.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/build.xml

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=800329&r1=800328&r2=800329&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Mon Aug  3 12:12:29 2009
@@ -168,6 +168,9 @@
     MAPREDUCE-656. Change org.apache.hadoop.mapred.SequenceFile* classes
     to use new mapreduce api. (Amareshwari Sriramadasu via sharad)
 
+    MAPREDUCE-670. Creates ant target for 10 mins patch test build.
+    (Jothi Padmanabhan via gkesavan)
+
   BUG FIXES
     MAPREDUCE-703. Sqoop requires dependency on hsqldb in ivy.
     (Aaron Kimball via matei)

Modified: hadoop/mapreduce/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/build.xml?rev=800329&r1=800328&r2=800329&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/build.xml (original)
+++ hadoop/mapreduce/trunk/build.xml Mon Aug  3 12:12:29 2009
@@ -113,6 +113,8 @@
   <property name="test.junit.maxmemory" value="512m" />
 
   <property name="test.mapred.build.classes" value="${test.build.dir}/mapred/classes"/>
+  <property name="test.mapred.commit.tests.file" value="${test.src.dir}/commit-tests"
/>
+  <property name="test.mapred.all.tests.file" value="${test.src.dir}/all-tests" />
 
   <property name="test.libhdfs.conf.dir" value="${c++.libhdfs.src}/tests/conf"/>
   <property name="test.libhdfs.dir" value="${test.build.dir}/libhdfs"/>
@@ -547,52 +549,66 @@
     </jar>
   </target>
 
-  <target name="run-test-mapred" depends="compile-mapred-test" description="Run mapred
unit tests">
+  <macrodef name="macro-test-runner">
+    <attribute name="test.file" />
+    <sequential>
+      <delete dir="${test.build.data}"/>
+      <mkdir dir="${test.build.data}"/>
+      <delete dir="${test.log.dir}"/>
+      <mkdir dir="${test.log.dir}"/>
+      <copy file="${test.src.dir}/hadoop-policy.xml" 
+        todir="${test.build.extraconf}" />
+      <junit showoutput="${test.output}"
+        printsummary="${test.junit.printsummary}"
+        haltonfailure="${test.junit.haltonfailure}"
+        fork="yes"
+        forkmode="${test.junit.fork.mode}"
+        maxmemory="${test.junit.maxmemory}"
+        dir="${basedir}" timeout="${test.timeout}"
+        errorProperty="tests.failed" failureProperty="tests.failed">
+        <sysproperty key="test.build.data" value="${test.build.data}"/>
+        <sysproperty key="test.cache.data" value="${test.cache.data}"/>     
+        <sysproperty key="test.debug.data" value="${test.debug.data}"/>
+        <sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
+        <sysproperty key="test.src.dir" value="${test.src.dir}"/>
+      	 <sysproperty key="taskcontroller-path" value="${taskcontroller-path}"/>
+      	 <sysproperty key="taskcontroller-user" value="${taskcontroller-user}"/>
+        <sysproperty key="test.build.extraconf" value="${test.build.extraconf}" />
+        <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
+        <sysproperty key="java.library.path"
+          value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
+        <sysproperty key="install.c++.examples" value="${install.c++.examples}"/>
+        <!-- set compile.c++ in the child jvm only if it is set -->
+        <syspropertyset dynamic="no">
+          <propertyref name="compile.c++"/>
+        </syspropertyset>
+        <classpath refid="test.classpath"/>
+        <formatter type="${test.junit.output.format}" />
+        <batchtest todir="${test.build.dir}" unless="testcase">
+          <fileset dir="${test.src.dir}/mapred" excludes="**/${test.exclude}.java">
+            <patternset>
+              <includesfile name="@{test.file}"/>
+            </patternset>
+          </fileset>
+        </batchtest>
+        <batchtest todir="${test.build.dir}" if="testcase">
+          <fileset dir="${test.src.dir}/mapred" includes="**/${testcase}.java"/>
+        </batchtest>
+      </junit>
+      <antcall target="checkfailure"/>
+    </sequential>
+  </macrodef>
 
-    <delete dir="${test.build.data}"/>
-    <mkdir dir="${test.build.data}"/>
-    <delete dir="${test.log.dir}"/>
-    <mkdir dir="${test.log.dir}"/>
-    <copy file="${test.src.dir}/hadoop-policy.xml" 
-      todir="${test.build.extraconf}" />
-    <junit showoutput="${test.output}"
-      printsummary="${test.junit.printsummary}"
-      haltonfailure="${test.junit.haltonfailure}"
-      fork="yes"
-      forkmode="${test.junit.fork.mode}"
-      maxmemory="${test.junit.maxmemory}"
-      dir="${basedir}" timeout="${test.timeout}"
-      errorProperty="tests.failed" failureProperty="tests.failed">
-      <sysproperty key="test.build.data" value="${test.build.data}"/>
-      <sysproperty key="test.cache.data" value="${test.cache.data}"/>     
-      <sysproperty key="test.debug.data" value="${test.debug.data}"/>
-      <sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
-      <sysproperty key="test.src.dir" value="${test.src.dir}"/>
-    	<sysproperty key="taskcontroller-path" value="${taskcontroller-path}"/>
-    	<sysproperty key="taskcontroller-user" value="${taskcontroller-user}"/>
-      <sysproperty key="test.build.extraconf" value="${test.build.extraconf}" />
-      <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
-      <sysproperty key="java.library.path"
-       value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
-      <sysproperty key="install.c++.examples" value="${install.c++.examples}"/>
-      <!-- set compile.c++ in the child jvm only if it is set -->
-      <syspropertyset dynamic="no">
-         <propertyref name="compile.c++"/>
-      </syspropertyset>
-      <classpath refid="test.classpath"/>
-      <formatter type="${test.junit.output.format}" />
-      <batchtest todir="${test.build.dir}" unless="testcase">
-        <fileset dir="${test.src.dir}/mapred"
-           includes="**/${test.include}.java"
-     excludes="**/${test.exclude}.java" />
-      </batchtest>
-      <batchtest todir="${test.build.dir}" if="testcase">
-        <fileset dir="${test.src.dir}/mapred" includes="**/${testcase}.java"/>
-      </batchtest>
-    </junit>
-    <antcall target="checkfailure"/>
+  <target name="run-test-mapred" depends="compile-mapred-test" description="Run mapred
unit tests">
+    <macro-test-runner test.file="${test.mapred.all.tests.file}" />
   </target> 
 
+   <target name="run-commit-test" depends="compile-mapred-test" description="Run approximate
10-minute set of unit tests prior to commiting">
+     <macro-test-runner test.file="${test.mapred.commit.tests.file}" />
+   </target>
+ 
+
+
   <target name="checkfailure" if="tests.failed">
     <touch file="${test.build.dir}/testsfailed"/>
     <fail unless="continueOnFailure">Tests failed!</fail>
@@ -1094,6 +1110,8 @@
         <exclude name="CHANGES.txt"/>
         <exclude name="docs/"/>
         <exclude name="lib/jdiff/"/>
+        <exclude name="src/test/all-tests"/>
+        <exclude name="src/test/commit-tests"/>
       </fileset>
     </rat:report>
   </target>



Mime
View raw message