diff build.xml @ 70:993f6f8e1314

Test for log command
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sun, 23 Jan 2011 03:28:52 +0100
parents d6d2a630f4a6
children ce6d23673f2d
line wrap: on
line diff
--- a/build.xml	Sat Jan 22 22:53:57 2011 +0100
+++ b/build.xml	Sun Jan 23 03:28:52 2011 +0100
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="hgkit" default="samples">
+<!--
+ Copyright (c) 2010-2011 TMate Software Ltd
+  
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+ 
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ For information on how to redistribute this software under
+ the terms of a license other than GNU General Public License
+ contact TMate Software at support@svnkit.com
+-->
+<project name="jhg" default="samples">
     <description>
             description
     </description>
@@ -7,24 +23,49 @@
     <target name="samples" depends="build">
     	
     	<echo message="History of a specific file(s)"/>
-    	<java classpath="hgkit.jar" classname="com.tmate.hgkit.console.Log">
+    	<java classpath="jhg.jar" classname="com.tmate.hgkit.console.Log">
     		<arg line="design.txt .classpath src/com/tmate/hgkit/ll/LocalHgRepo.java"/>
     	</java>
     	
     	<echo message="Whole repo log"/>
-    	<java classpath="hgkit.jar" classname="com.tmate.hgkit.console.Log"/>
+    	<java classpath="jhg.jar" classname="com.tmate.hgkit.console.Log"/>
     	
     	<echo message="Content of a file"/>
-    	<java classpath="hgkit.jar" classname="com.tmate.hgkit.console.Cat">
+    	<java classpath="jhg.jar" classname="com.tmate.hgkit.console.Cat">
     		<arg line="src/com/tmate/hgkit/ll/Revlog.java"/>
     	</java>
 
     </target>
+	
+	<target name="tests" depends="build, build-tests">
+		<java classpath="jhg.jar,jhg-tests.jar" classname="org.tmatesoft.hg.test.TestHistory"/>
+		<java classpath="jhg.jar,jhg-tests.jar" classname="org.tmatesoft.hg.test.TestManifest"/>
+		<java classpath="jhg.jar,jhg-tests.jar" classname="org.tmatesoft.hg.test.TestStatus"/>
+	</target>
 
     <target name="build">
     	<mkdir dir="bin"/>
     	<javac srcdir="src" destdir="bin"/>
-    	<jar destfile="hgkit.jar" basedir="bin"/>
+    	<jar destfile="jhg.jar">
+    		<fileset dir="bin/">
+    			<include name="org/tmatesoft/hg/core/**" />
+    			<include name="org/tmatesoft/hg/util/**" />
+    			<include name="org/tmatesoft/hg/repo/**" />
+    			<include name="org/tmatesoft/hg/internal/**" />
+    		</fileset>
+    	</jar>
+    </target>
+
+    <target name="build-tests">
+    	<mkdir dir="bin"/>
+    	<javac srcdir="test" destdir="bin"/>
+    	<jar destfile="jhg-tests.jar" basedir="bin" includes="org/tmatesoft/hg/test/**/*"/>
+    </target>
+
+    <target name="build-cmdline">
+    	<mkdir dir="bin"/>
+    	<javac srcdir="cmdline" destdir="bin"/>
+    	<jar destfile="jhg-cl.jar" basedir="bin" includes="org/tmatesoft/hg/console/**/*"/>
     </target>
 
 </project>