|
5 | 5 | <property name="targetdir" location="target"/>
|
6 | 6 | <property name="testdir" location="${targetdir}/test"/>
|
7 | 7 | <dirname property="javabase" file="${java.home}"/>
|
8 |
| - |
| 8 | + |
9 | 9 | <path id="classpath">
|
10 | 10 | <fileset dir="lib">
|
11 | 11 | <include name="**/*.jar"/>
|
|
40 | 40 | encoding="ISO-8859-1"
|
41 | 41 | memoryMaximumSize="256M"
|
42 | 42 | fork="true"
|
43 |
| - debug="on" |
| 43 | + debug="on" |
44 | 44 | includeantruntime="false">
|
45 | 45 |
|
46 | 46 | <compilerarg value="-Xlint:all,-fallthrough"/>
|
|
142 | 142 | <fileset dir="docs/${version}" />
|
143 | 143 | </jar>
|
144 | 144 |
|
145 |
| - |
146 |
| - |
147 | 145 | </target>
|
148 | 146 |
|
149 | 147 | <target name="rebuild" depends="clean, compile"/>
|
150 | 148 |
|
151 | 149 | <!-- - - - - - - - - - - - - - - - - - - - - - -->
|
152 |
| - <!-- test stuff --> |
| 150 | + <!-- test targets --> |
153 | 151 | <!-- - - - - - - - - - - - - - - - - - - - - - -->
|
154 | 152 |
|
155 |
| - <taskdef name="testng" |
156 |
| - classpathref="classpath" |
157 |
| - classname="org.testng.TestNGAntTask" |
158 |
| - > |
159 |
| - </taskdef> |
| 153 | + <taskdef name="testng" classpathref="classpath" classname="org.testng.TestNGAntTask" /> |
160 | 154 |
|
161 | 155 | <target name="test" depends="compile">
|
162 | 156 | <testng classpathref="classpath" outputdir="${testdir}" listeners="com.mongodb.util.TestNGListener" haltonfailure="true" >
|
|
165 | 159 | </testng>
|
166 | 160 | </target>
|
167 | 161 |
|
| 162 | + <target name="test-single" depends="compile"> |
| 163 | + <condition property="propsSpecified"> |
| 164 | + <and> |
| 165 | + <isset property="class.name" /> |
| 166 | + </and> |
| 167 | + </condition> |
| 168 | + <fail unless="propsSpecified" message="class.name roperty not specified."/> |
| 169 | + |
| 170 | + <copy todir="build/test" file="testng-single.xml" overwrite="true"> |
| 171 | + <filterset> |
| 172 | + <filter token="CLASS" value="${class.name}"/> |
| 173 | + </filterset> |
| 174 | + </copy> |
| 175 | + |
| 176 | + <testng classpathref="classpath" outputdir="${testdir}" haltonfailure="true" verbose="1"> |
| 177 | + <jvmarg value="-Xmx512M" /> |
| 178 | + <xmlfileset dir="build/test" includes="testng-single.xml"/> |
| 179 | + </testng> |
| 180 | + </target> |
| 181 | + |
| 182 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 183 | + <!-- misc targets --> |
| 184 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 185 | + |
168 | 186 | <target name="examples" depends="compile">
|
169 | 187 |
|
170 | 188 | <javac srcdir="examples"
|
|
173 | 191 | deprecation="off"
|
174 | 192 | source="1.5"
|
175 | 193 | encoding="ISO-8859-1"
|
176 |
| - debug="on" |
| 194 | + debug="on" |
177 | 195 | includeantruntime="false">
|
178 | 196 | <classpath refid="classpath"/>
|
179 | 197 | </javac>
|
|
196 | 214 | deprecation="off"
|
197 | 215 | source="1.5"
|
198 | 216 | encoding="ISO-8859-1"
|
199 |
| - debug="on" |
| 217 | + debug="on" |
200 | 218 | includeantruntime="false">
|
201 | 219 | <classpath refid="classpath"/>
|
202 | 220 | </javac>
|
203 | 221 |
|
204 |
| - <java classname="examples.ReadOplog" |
205 |
| - fork="true"> |
| 222 | + <java classname="examples.ReadOplog" fork="true"> |
206 | 223 | <classpath refid="classpath"/>
|
207 | 224 | </java>
|
208 | 225 |
|
209 | 226 | </target>
|
210 | 227 |
|
| 228 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 229 | + <!-- reporting targets --> |
| 230 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 231 | + |
211 | 232 | <target name="junit-reports" depends="test">
|
212 | 233 | <junitreport todir="${testdir}">
|
213 | 234 | <fileset dir="${testdir}">
|
214 | 235 | <include name="*/*.xml"/>
|
215 | 236 | </fileset>
|
216 |
| - |
| 237 | + |
217 | 238 | <report format="noframes" todir="${testdir}"/>
|
218 | 239 | </junitreport>
|
219 | 240 | </target>
|
220 | 241 |
|
221 |
| - |
| 242 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 243 | + <!-- publish targets --> |
| 244 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
222 | 245 |
|
223 | 246 | <target name="publish">
|
224 | 247 | <exec dir="." executable="python">
|
|
0 commit comments