From: Rob E. <ro...@us...> - 2009-10-12 03:35:34
|
Update of /cvsroot/trove4j/trove In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25314/trove Modified Files: Tag: TROVE_3_WORKING build.xml Log Message: Support for third-party benchmarks. Include tests for Colt map put/get. Index: build.xml =================================================================== RCS file: /cvsroot/trove4j/trove/build.xml,v retrieving revision 1.61.2.6 retrieving revision 1.61.2.7 diff -C2 -d -r1.61.2.6 -r1.61.2.7 *** build.xml 9 Oct 2009 04:09:00 -0000 1.61.2.6 --- build.xml 12 Oct 2009 03:35:21 -0000 1.61.2.7 *************** *** 209,224 **** <!-- Compile and run the unit tests. --> <!-- =============================================================== --> ! <target name="test" depends="compile" description="Compile unit tests and run them using JUnit."> - - <echo message="output.dest = ${output.dest}"/> - - <javac destdir="${output.tests}" debug="${debug}" target="1.5"> - <src path="${test_src}"/> - <classpath> - <pathelement location="${lib}/junit.jar"/> - <pathelement location="${output.dest}"/> - </classpath> - </javac> <copy todir="${output.tests}"> --- 209,214 ---- <!-- Compile and run the unit tests. --> <!-- =============================================================== --> ! <target name="test" depends="compile,-build_tests" description="Compile unit tests and run them using JUnit."> <copy todir="${output.tests}"> *************** *** 245,250 **** <fail message="Tests failed. Check test output." if="test.failed"/> </target> ! ! <!-- =============================================================== --> <!-- Build generator classes. --> --- 235,260 ---- <fail message="Tests failed. Check test output." if="test.failed"/> </target> ! ! ! <!-- =============================================================== --> ! <!-- Run benchmarks. --> ! <!-- =============================================================== --> ! <target name="benchmark" depends="compile,-build_tests" ! description="Run benchmark suite."> ! ! <java classname="gnu.trove.benchmark.BenchmarkRunner" fork="true"> ! <classpath> ! <fileset dir="${lib}"> ! <include name="*.jar"/> ! </fileset> ! ! <pathelement path="${output.dest}"/> ! <pathelement path="${output.generator_classes}"/> ! <pathelement path="${output.tests}"/> ! </classpath> ! </java> ! </target> ! ! <!-- =============================================================== --> <!-- Build generator classes. --> *************** *** 257,261 **** source="1.5" target="1.5"/> </target> ! <!-- =================================================================== --> <!-- Initialization target --> --- 267,272 ---- source="1.5" target="1.5"/> </target> ! ! <!-- =================================================================== --> <!-- Initialization target --> *************** *** 276,278 **** --- 287,336 ---- <echo message="----------- ${Name} ${version} [${year}] ------------"/> </target> + + + <!-- =================================================================== --> + <!-- Targets related to benchmarks. --> + <!-- =================================================================== --> + + <target name="-build_tests" depends="-init"> + <javac destdir="${output.tests}" debug="${debug}" target="1.5"> + <src path="${test_src}"/> + <exclude name="gnu/trove/benchmark/colt/**"/> + + <classpath> + <pathelement location="${lib}/junit.jar"/> + <pathelement location="${output.dest}"/> + </classpath> + </javac> + + <!-- See if third party libraries are available --> + <available classname="cern.colt.map.OpenIntObjectHashMap" + property="colt.available"> + + <classpath> + <fileset dir="${lib}"> + <include name="*.jar"/> + </fileset> + </classpath> + </available> + <antcall target="-build_colt_benchmarks"/> + + </target> + + + <target name="-build_colt_benchmarks" depends="-init" if="colt.available"> + <javac destdir="${output.tests}" debug="${debug}" target="1.5"> + <src path="${test_src}"/> + + <include name="gnu/trove/benchmark/colt/**"/> + + <classpath> + <fileset dir="${lib}"> + <include name="*.jar"/> + </fileset> + <pathelement location="${output.dest}"/> + <pathelement location="${output.tests}"/> + </classpath> + </javac> + </target> </project> \ No newline at end of file |