dlr 02/02/18 13:46:18 Modified: . build.properties build.xml Log: Unit testing functional, if very rough. Revision Changes Path 1.4 +3 -0 xml-rpc/build.properties Index: build.properties =================================================================== RCS file: /home/cvs/xml-rpc/build.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -u -r1.3 -r1.4 --- build.properties 15 Nov 2001 15:46:05 -0000 1.3 +++ build.properties 18 Feb 2002 21:46:18 -0000 1.4 @@ -10,7 +10,10 @@ version = 1.0rc1 project = xmlrpc build.dir = ./bin +build.test.dest = ${build.dir}/test src.dir = ./src +src.test.dir = ${src.dir}/test +test.reportsDirectory = tests javadoc.destdir = ./docs/apidocs jakarta.site2 = ../jakarta-site2 jdom.jar = jdom-b7.jar 1.6 +48 -2 xml-rpc/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-rpc/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -u -r1.5 -r1.6 --- build.xml 16 Feb 2002 18:11:01 -0000 1.5 +++ build.xml 18 Feb 2002 21:46:18 -0000 1.6 @@ -186,20 +186,66 @@ <!-- ================================================================== --> <target name="clean"> - <delete dir="${build.dir}"/> <delete file="${final.name}.tar.gz"/> <delete file="${final.name}.zip"/> + <delete dir="${build.dir}"/> + <delete dir="${test.reportsDirectory}"/> </target> <!-- ================================================================== --> <!-- T E S T --> <!-- ================================================================== --> - <!-- + <target name="compile-tests" + depends="compile" + description="Compiles testing source code"> + + <mkdir dir="${build.test.dest}"/> + + <javac srcdir="${src.test.dir}" + destdir="${build.test.dest}" + includes="**/*Test.java" + excludes="**/package.html" + debug="${debug}" + deprecation="${deprecation}" + optimize="${optimize}"> + <classpath refid="classpath"/> + <classpath> + <pathelement path="${build.dest}"/> + <pathelement path="${build.test.dest}"/> + </classpath> + </javac> + + </target> + <target name="test" + depends="compile-tests" description="Runs unit tests"> + + <echo> + Running all JUnit tests + </echo> + + <delete dir="${test.reportsDirectory}"/> + <mkdir dir="${test.reportsDirectory}"/> + + <junit printSummary="yes"> + <formatter type="plain"/> + <classpath refid="classpath"/> + <classpath> + <pathelement path="${build.dest}"/> + <pathelement path="${build.test.dest}"/> + </classpath> + <batchtest todir="${test.reportsDirectory}"> + <fileset dir="${build.test.dest}"> + <include name="**/*Test.class"/> + <!-- <exclude name="**/*ServletTest.class"/> --> + </fileset> + </batchtest> + </junit> </target> + <!-- <target name="rttest" description="Runs run-time tests"> </target>