Author: mahadev
Date: Fri Mar 27 00:44:41 2009
New Revision: 758947

URL: http://svn.apache.org/viewvc?rev=758947&view=rev
Log:
ZOOKEEPER-352. to add standard ant targets required by test-patch.sh script 
(giridharan kesavan via mahadev)

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

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=758947&r1=758946&r2=758947&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri Mar 27 00:44:41 2009
@@ -49,6 +49,9 @@
   ZOOKEEPER-350. to run rats for releaseaudit. (giridharan kesavan via
 mahadev)
 
+  ZOOKEEPER-352. to add standard ant targets required by test-patch.sh script
+(giridharan kesavan via mahadev)
+
 NEW FEATURES:
 
 

Modified: hadoop/zookeeper/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=758947&r1=758946&r2=758947&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Fri Mar 27 00:44:41 2009
@@ -107,7 +107,15 @@
     <property name="rats_url" 
value="http://arat.googlecode.com/files/rat-lib-all-0.5.1.jar"; />
     <property name="rat.reporting.classname" value="rat.Report"/>
 
-    <!-- ====================================================== -->
+        <!-- test patch properties -->
+    <property name="scratch.dir" value="${user.home}/tmp"/>
+    <property name="svn.cmd" value="svn"/>
+    <property name="grep.cmd" value="grep"/>
+    <property name="patch.cmd" value="patch"/>
+    <property name="make.cmd" value="make"/>
+    <property name="test_patch_sh" value="${test.src.dir}/bin/test-patch.sh"/>
+
+<!-- ====================================================== -->
     <!-- Macro definitions                                      -->
     <!-- ====================================================== -->
     <macrodef name="macro_tar" description="Worker Macro for tar">
@@ -578,7 +586,17 @@
     <target name="test-category">
       <property name="test.category" value=""/>
     </target>
-    <target name="test" depends="test-init,test-category,junit.run"/>
+
+    <target name="test" description="to run core and contrib tests">
+       <antcall target="test-core"/>
+       <antcall target="test-contrib"/>
+    </target>
+ 
+    <target name="test-contrib" description="to run contrib tests">
+       <!-- yet to implement -->
+    </target>
+    
+    <target name="test-core" depends="test-init,test-category,junit.run"/> 
 
     <!-- ====================================================== -->
     <!-- Run optional third-party tool targets                  -->
@@ -764,4 +782,58 @@
        </java>
     </target>
 
+    <target name="findbugs.check" depends="check-for-findbugs" 
unless="findbugs.present">
+       <fail message="'findbugs.home' is not defined. Please pass 
-Dfindbugs.home=&lt;base of Findbugs installation&gt; 
+               to Ant on the command-line." />
+    </target>
+
+    <target name="patch.check" unless="patch.file">
+       <fail message="'patch.file' is not defined. Please pass 
-Dpatch.file=&lt;location of patch file&gt; 
+               to Ant on the command-line." />
+    </target>
+
+    <target name="test-patch" 
depends="patch.check,findbugs.check,forrest.check">
+       <exec executable="bash" failonerror="true">
+               <arg value="${test_patch_sh}"/>
+               <arg value="DEVELOPER"/>
+               <arg value="${patch.file}"/>
+               <arg value="${scratch.dir}"/>
+               <arg value="${svn.cmd}"/>
+               <arg value="${grep.cmd}"/>
+               <arg value="${patch.cmd}"/>
+               <arg value="${findbugs.home}"/>
+               <arg value="${forrest.home}"/>
+               <arg value="${basedir}"/>
+               <arg value="${java5.home}"/>
+               <arg value="${ant.project.name}"/>
+       </exec>
+    </target>
+
+    <target name="hudson-test-patch" depends="findbugs.check,forrest.check">
+       <exec executable="bash" failonerror="true">
+               <arg value="${test_patch_sh}"/>
+               <arg value="HUDSON"/>
+               <arg value="${scratch.dir}"/>
+               <arg value="${support.dir}"/>
+               <arg value="${ps.cmd}"/>
+               <arg value="${wget.cmd}"/>
+               <arg value="${jiracli.cmd}"/>
+               <arg value="${svn.cmd}"/>
+               <arg value="${grep.cmd}"/>
+               <arg value="${patch.cmd}"/>
+               <arg value="${findbugs.home}"/>
+               <arg value="${forrest.home}"/>
+               <arg value="${eclipse.home}"/>
+               <arg value="${python.home}"/>
+               <arg value="${basedir}"/>
+               <arg value="${trigger.url}"/>
+               <arg value="${jira.passwd}"/>
+               <arg value="${java5.home}"/>
+               <arg value="${curl.cmd}"/>
+               <arg value="${defect}"/>
+               <arg value="${ant.project.name}"/>
+       </exec>
+     </target>
+
+
 </project>


Reply via email to