Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 1 | <project name="thrifttest" default="test" basedir="."> |
| 2 | |
| 3 | <description>Thrift Test Build File</description> |
| 4 | |
| 5 | <property name="src" location="src" /> |
| 6 | <property name="gen" location="gen-java" /> |
| 7 | <property name="build" location="build" /> |
David Reiss | 14feb41 | 2008-03-02 06:29:23 +0000 | [diff] [blame^] | 8 | <property name="cpath" location="../../lib/java/libthrift.jar:/usr/share/java/commons-lang-2.3.jar" /> |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 9 | |
| 10 | <target name="init"> |
| 11 | <tstamp /> |
| 12 | <mkdir dir="${build}"/> |
| 13 | </target> |
| 14 | |
| 15 | <target name="generate"> |
Mark Slee | 6f5e2cb | 2007-01-25 08:01:28 +0000 | [diff] [blame] | 16 | <exec executable="../../compiler/cpp/thrift"> |
David Reiss | 14feb41 | 2008-03-02 06:29:23 +0000 | [diff] [blame^] | 17 | <arg line="--gen java:hashcode ../ThriftTest.thrift" /> |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 18 | </exec> |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 19 | <exec executable="../../compiler/cpp/thrift"> |
David Reiss | 14feb41 | 2008-03-02 06:29:23 +0000 | [diff] [blame^] | 20 | <arg line="--gen java:hashcode ../DebugProtoTest.thrift" /> |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 21 | </exec> |
| 22 | <exec executable="../../compiler/cpp/thrift"> |
David Reiss | 14feb41 | 2008-03-02 06:29:23 +0000 | [diff] [blame^] | 23 | <arg line="--gen java:hashcode ../OptionalRequiredTest.thrift" /> |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 24 | </exec> |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 25 | </target> |
| 26 | |
Mark Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 27 | <target name="compileonly"> |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 28 | <javac debug="true" srcdir="${gen}" destdir="${build}" classpath="${cpath}" /> |
| 29 | <javac debug="true" srcdir="${src}" destdir="${build}" classpath="${cpath}:${gen}" /> |
| 30 | </target> |
| 31 | |
| 32 | <target name="compile" depends="init,generate,compileonly"> |
| 33 | <jar jarfile="thrifttest.jar" basedir="${build}"/> |
Mark Slee | 78f58e2 | 2006-09-02 04:17:07 +0000 | [diff] [blame] | 34 | </target> |
| 35 | |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 36 | <target name="test" depends="compile"> |
David Reiss | 3b15ebc | 2008-03-02 06:29:19 +0000 | [diff] [blame] | 37 | <java classname="com.facebook.thrift.test.IdentityTest" classpath="${cpath}:./thrifttest.jar"/> |
| 38 | <java classname="com.facebook.thrift.test.EqualityTest" classpath="${cpath}:./thrifttest.jar"/> |
Mark Slee | 9577100 | 2006-06-07 06:53:25 +0000 | [diff] [blame] | 39 | </target> |
| 40 | |
| 41 | <target name="clean"> |
| 42 | <delete dir="gen-java" /> |
| 43 | <delete dir="${build}" /> |
| 44 | <delete file="thrifttest.jar" /> |
| 45 | </target> |
| 46 | |
| 47 | </project> |