blob: 8b69b2bc2588047cbcf7ea60dcacbbbf78974bbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<!-- $Id: build.xml,v 12.2 2006/06/09 14:32:17 mark Exp $ -->
<project name="clover" default="test" basedir=".">
<property name="db" location="../../.."/>
<property name="src" location="${db}/java/src"/>
<property name="test.src" location="${db}/test/scr024/src"/>
<property name="examples.src" location="${db}/examples_java/src"/>
<property name="testserialdir" value="testserial"/>
<property name="clover.initstring" location="reports/clover.db"/>
<property name="clover.excludes" value="**/test/** collections/** db/** com/sleepycat/db/**"/>
<!--
<property name="build.compiler"
value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
-->
<target name="all" depends="clean,test,report"/>
<target name="clean">
<delete dir="classes"/>
<delete dir="tmp"/>
<delete dir="reports"/>
</target>
<target name="init">
<mkdir dir="classes"/>
<mkdir dir="tmp"/>
<mkdir dir="reports"/>
</target>
<path id="clover.classpath">
<pathelement location="clover.jar"/>
<pathelement location="velocity.jar"/>
</path>
<path id="classpath">
<pathelement location="classes"/>
<path refid="clover.classpath"/>
</path>
<target name="build" depends="init">
<javac destdir="classes" debug="on" source="1.3">
<src path="${src}"/>
<src path="${test.src}"/>
<src path="${examples.src}"/>
<exclude name="com/sleepycat/**/release/**"/>
<exclude name="com/sleepycat/xa/**"/>
</javac>
<property name="testserialpath"
value="com/sleepycat/collections/test/serial/TestSerial"/>
<copy file="${test.src}/${testserialpath}.java.original"
tofile="${testserialdir}/${testserialpath}.java"/>
<javac destdir="${testserialdir}" debug="on" source="1.3"
includeAntRuntime="true" srcdir="${testserialdir}">
<include name="${testserialpath}.java"/>
</javac>
</target>
<target name="test" depends="build">
<!-- Performs initialization needed before StoredClassCatalogTest is run in
the <batchtest> below.
-->
<junit fork="yes" dir="." printsummary="on" haltonfailure="on"
showoutput="on">
<classpath path="${testserialdir}"/> <!-- Must be first -->
<classpath refid="classpath"/>
<formatter type="plain" usefile="false"/>
<formatter type="xml"/>
<test
name="com.sleepycat.collections.test.serial.StoredClassCatalogTestInit"
todir="reports"/>
</junit>
<junit fork="yes" dir="." printsummary="on" haltonfailure="on"
showoutput="on">
<formatter type="xml"/>
<classpath refid="classpath"/>
<sysproperty key="longtest" value="${longtest}"/>
<batchtest todir="reports">
<fileset dir="classes" includes="**/*Test.class"/>
</batchtest>
<!--
-->
<!--
<test name="com.sleepycat.collections.KeyRangeTest" todir="reports"/>
<test name="com.sleepycat.collections.test.TransactionTest" todir="reports"/>
<test name="com.sleepycat.collections.test.CollectionTest" todir="reports"/>
-->
</junit>
</target>
<target name="examples" depends="build">
<antcall target="one_shipment_example">
<param name="param_name" value="basic"/>
</antcall>
<antcall target="one_shipment_example">
<param name="param_name" value="index"/>
</antcall>
<antcall target="one_shipment_example">
<param name="param_name" value="entity"/>
</antcall>
<antcall target="one_shipment_example">
<param name="param_name" value="tuple"/>
</antcall>
<antcall target="one_shipment_example">
<param name="param_name" value="sentity"/>
</antcall>
<antcall target="one_shipment_example">
<param name="param_name" value="marshal"/>
</antcall>
<antcall target="one_shipment_example">
<param name="param_name" value="factory"/>
</antcall>
<echo message=""/>
<echo message="=== HelloDatabaseWorld ==="/>
<java dir="." fork="yes" classpathref="classpath"
classname="collections.hello.HelloDatabaseWorld"/>
</target>
<target name="one_shipment_example">
<echo message="=== ${param_name} ==="/>
<delete dir="tmp"/>
<mkdir dir="tmp"/>
<java dir="." fork="yes" classpathref="classpath"
classname="collections.ship.${param_name}.Sample"/>
</target>
<!-- Using fork="yes" does not work for AccessExample, apparently because
it is interactive and the input stream of the forked process isn't
functional; therefore this sample writes to the base directory.
-->
<target name="access_example" depends="build">
<echo message="=== AccessExample ==="/>
<java classpathref="classpath"
classname="collections.access.AccessExample">
</java>
</target>
<target name="report">
<java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter"
fork="true">
<arg line="--outputdir reports --showSrc --initstring ${clover.initstring} --title 'Berkeley DB Java BDB API'"/>
<classpath refid="clover.classpath"/>
</java>
</target>
</project>
|