pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject svn commit: r955701 - in /hadoop/pig/trunk/contrib/zebra: CHANGES.txt build.xml
Date Thu, 17 Jun 2010 18:44:32 GMT
Author: yanz
Date: Thu Jun 17 18:44:31 2010
New Revision: 955701

URL: http://svn.apache.org/viewvc?rev=955701&view=rev
Log:
PIG-1455 Addition of test-unit as an ant target (yanz)

Modified:
    hadoop/pig/trunk/contrib/zebra/CHANGES.txt
    hadoop/pig/trunk/contrib/zebra/build.xml

Modified: hadoop/pig/trunk/contrib/zebra/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/CHANGES.txt?rev=955701&r1=955700&r2=955701&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/CHANGES.txt (original)
+++ hadoop/pig/trunk/contrib/zebra/CHANGES.txt Thu Jun 17 18:44:31 2010
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   INCOMPATIBLE CHANGES
 
+    PIG-1455 Addition of test-unit as an ant target (yanz)
+
     PIG-1451 Change the build.test property in build to test.build.dir to be consistent with
PIG (yanz)
 
     PIG-1444 Addition of test-smoke ant target (gauravj via yanz)

Modified: hadoop/pig/trunk/contrib/zebra/build.xml
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/contrib/zebra/build.xml?rev=955701&r1=955700&r2=955701&view=diff
==============================================================================
--- hadoop/pig/trunk/contrib/zebra/build.xml (original)
+++ hadoop/pig/trunk/contrib/zebra/build.xml Thu Jun 17 18:44:31 2010
@@ -176,6 +176,49 @@ to call at top-level: ant deploy-contrib
     <fail if="tests.failed">Tests failed!</fail>
   </target>
 
+  <target name="test-unit" depends="compile-test, compile" if="test.available" description="Run
unit test">
+    <echo message="contrib: ${name}"/>
+    <delete dir="${pig.log.dir}"/>
+    <mkdir dir="${pig.log.dir}"/>
+    <delete dir="${test.build.dir}/data"/>
+    <mkdir dir="${test.build.dir}/data"/>
+    <junit
+      printsummary="yes" showoutput="${test.output}" 
+      haltonfailure="no" fork="yes" maxmemory="1024m"
+      errorProperty="tests.failed" failureProperty="tests.failed"
+      timeout="${test.timeout}">
+      
+      <sysproperty key="test.build.data" value="${test.build.dir}/data"/>
+      <sysproperty key="test.build.dir" value="${test.build.dir}"/>
+      <sysproperty key="contrib.name" value="${name}"/>
+      <sysproperty key="hadoop.log.dir" value="${pig.log.dir}"/>
+       <sysproperty key="whichCluster" value="miniCluster"/>
+	      
+      <!-- requires fork=yes for: 
+        relative File paths to use the specified user.dir 
+        classpath to use build/contrib/*.jar
+      -->
+      <sysproperty key="user.dir" value="${test.build.dir}/data"/>
+      
+      <sysproperty key="fs.default.name" value="${fs.default.name}"/>
+      <sysproperty key="pig.test.localoutputfile" value="${pig.test.localoutputfile}"/>
+      <sysproperty key="pig.log.dir" value="${pig.log.dir}"/> 
+      <classpath refid="test.classpath"/>
+      <formatter type="${test.junit.output.format}" />
+
+      <batchtest todir="${test.build.dir}" unless="testcase">
+        <fileset dir="${src.test}"
+          includes="**/io/*.java **/tfile/*.java **/types/*.java" excludes="**/TestCheckin*.java
**/tfile/KVGenerator.java **/tfile/KeySampler.java **/tfile/NanoTimer.java **/tfile/RandomDistribution.java
**/tfile/Timer.java"/>
+      </batchtest>
+      <batchtest todir="${test.build.dir}"  if="testcase">
+        <fileset dir="${src.test}"
+                 includes="**/${testcase}.java"/>
+      </batchtest>
+
+
+    </junit>
+    <fail if="tests.failed">Tests failed!</fail>
+  </target>
   <!-- ================================================================== -->
   <!-- Run smoke tests                                                  -->
   <!-- ================================================================== -->



Mime
View raw message