forked from tilialabs/qtjambi5
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_autotests.xml
414 lines (388 loc) · 24.7 KB
/
build_autotests.xml
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<!--
TODO:
- We work the target names into "tests.*" namespace "compile.java" => "tests.compile.java".
-->
<project default="all" basedir=".">
<property environment="env"/>
<tstamp/>
<property file="tests.properties"/>
<property name="junit.exists" value="tests.junit.exists" />
<condition property="qtjambi.osx">
<os family="mac"/>
</condition>
<target name="help"
description="Provides detailed help.">
<echo>Generates an executable .jar file that runs the generator example...</echo>
</target>
<target name="tests.clean" description="Cleans built test files">
<delete dir="${outputDir}/tests/autotest-generator"/>
<delete dir="${outputDir}/tests/autotests"/>
<delete dir="${outputDir}/tests/auto"/>
<delete dir="${outputDir}/tests"/>
</target>
<target name="reports.clean" description="Cleans the Unit Test results">
<delete dir="${outputDir}/tests/junitxml-release"/>
<delete dir="${outputDir}/tests/junitxml-debug"/>
<delete dir="${outputDir}/tests/TestResults-release"/>
<delete dir="${outputDir}/tests/TestResults-debug"/>
</target>
<target name="check.junit">
<available property="junit.path" type="file" file="${tests.junit}"/>
<fail message="Path to JUnit is required to build the Unit Tests. Specify the path in tests.properties">
<condition>
<not>
<isset property="junit.path"/>
</not>
</condition>
</fail>
</target>
<target name="check.ssl">
<available property="qtjambi.ssl" type="file" file="build/generator/out/java/org/qtjambi/qt/network/QSslSocket.java"/>
</target>
<target name="compile.native.generator" depends="init.build">
<mkdir dir="${outputDir}/tests/autotest-generator"/>
<generator dir="${generator.builddir}"
debugTools="${qtjambi.debug-tools}"
inputDirectory="${generatorDir}${psep}${basedir}/autotestlib"
outputDirectory="${outputDir}/tests/autotest-generator"
generatorDirectory="${generator.builddir}"
typesystem="${basedir}/autotestlib/build.txt"
header="${basedir}/autotestlib/global.h"
qtincludedirectory="${qtjambi.qt.includedir}"
qtlibdirectory="${tools.qt.libdir}"
includepaths="${basedir}/autotestlib${psep}${generator.includepaths}"
outputPreprocessFile="preprocessed_autotests.tmp"
/>
</target>
<target name="compile.native" depends="init.build">
<qmake dir="${outputDir}/tests/autotest-generator"
pro="${basedir}/autotestlib/autotestlib.pro"
config="${qtjambi.configuration}"
qtconfig="${qtjambi.qtconfig}"
debugTools="${qtjambi.debug-tools}"
qmakebinary="${qtjambi.qt.qmake.abspath}"/>
<make dir="${outputDir}/tests/autotest-generator" target="${qtjambi.qmake.target.default}"/>
</target>
<target name="compile.deps">
<!-- <mkdir dir="${outputDir}/tests/autotests" />
<javac destdir="${outputDir}/tests/autotests" debug="true"
includeantruntime="false"
source="1.5" target="1.5">
<classpath>
<pathelement location="${basedir}/jars/qtjambi.jar" />
<pathelement location="." />
</classpath>
</javac> -->
</target>
<target name="compile.java" depends="init.build, compile.deps, check.junit, check.ssl">
<mkdir dir="${outputDir}/tests/auto"/>
<!-- encoding="UTF-8" required due to some file tests (I18N) using
no ASCII/ISO-8859-1 characters and the MacOSX Java using "MacRoman"
character set by default. -->
<javac destdir="${outputDir}/tests/auto" debug="true"
includeantruntime="false"
source="1.5" target="1.5" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation" />
<compilerarg value="-Xlint:unchecked" />
<classpath>
<pathelement location="${basedir}/jars/qtjambi.jar" />
<pathelement location="${tests.junit}" />
<pathelement location="${tests.hamcrest}" />
</classpath>
<src path="${basedir}/src/java/autotest"/>
<!-- pick up the generated code from compile.native -->
<src path="${outputDir}/tests/autotest-generator/java"/>
<include name="org/qtjambi/autotests/**/*.java"/>
<include name="org/qtjambi/generatortests/**/*.java"/>
<exclude name="org/qtjambi/unittests/**/*.java"/>
<exclude name="org/qtjambi/autotests/**/*QPlastiqueStyle.java" if="${qt.feature.QT_NO_STYLE_PLASTIQUE}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableOpenGL.java" unless="${qtjambi.opengl.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableWebkit.java" unless="${qtjambi.webkit.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableScript.java" unless="${qtjambi.script.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableQt3D.java" unless="${qtjambi.qt3d.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestMemoryManagementQt3D.java" unless="${qtjambi.qt3d.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableDeclarative.java" unless="${qtjambi.declarative.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableHelp.java" unless="${qtjambi.help.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableMultimedia.java" unless="${qtjambi.multimedia.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableXmlpatterns.java" unless="${qtjambi.xmlpatterns.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestCloneableSQL.java" unless="${qtjambi.sql.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestInjectedCodeV2LookupHost.java" if="qtjambi.javac.sunjdk5.compiler"/>
<exclude name="org/qtjambi/autotests/**/TestInjectedCodeOpenGL.java" unless="${qtjambi.opengl.any.true}"/>
<exclude name="org/qtjambi/autotests/**/TestInjectedCodeSQL.java" unless="${qtjambi.sql.any.true}"/>
</javac>
<mkdir dir="${outputDir}/tests/unit"/>
<javac destdir="${outputDir}/tests/unit" debug="true"
includeantruntime="false"
source="1.5" target="1.5" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation" />
<compilerarg value="-Xlint:unchecked" />
<classpath>
<pathelement location="${basedir}/jars/qtjambi.jar" />
<pathelement location="${tests.junit}" />
<pathelement location="${tests.hamcrest}" />
<pathelement location="${outputDir}/tests/auto" />
<pathelement location="${basedir}/src/java/autotest" />
</classpath>
<src path="src/java/autotest"/>
<exclude name="org/qtjambi/autotests/**/*.java"/>
<exclude name="org/qtjambi/generatortests/**/*.java"/>
<include name="org/qtjambi/unittests/**/*.java"/>
<exclude name="org/qtjambi/unittests/**/TestQSslSocket.java" unless="qtjambi.ssl" /><!--depends on ssl-->
<exclude name="org/qtjambi/unittests/**/TestQScript*.java" unless="${qtjambi.script.any.true}"/>
<exclude name="org/qtjambi/unittests/**/TestQXmlFormatter.java" unless="${qtjambi.xmlpattern.any.true}"/>
<!-- MacOSX version of Qt does not have this API -->
<exclude name="org/qtjambi/unittests/TestXmlQXmlStreamReader.java" if="qtjambi.config.ismacosx"/>
</javac>
</target>
<!-- NOTES: This should be merged with the normal target as the only difference is the -XstartOnFirstThread option.
In order to execute I needed to "export DYLD_LIBRARY_PATH=$QTDIR/lib:${absNativeBaseDir}/lib"
and then run the usual "ant compile.tests tests.run"
-->
<target name="run.osx" if="qtjambi.osx" depends="init.test">
<qtjambi-resolve-path var="absOutputDir" path="${outputDir}" />
<qtjambi-resolve-path var="absQtLib" path="${qtLib}" />
<qtjambi-resolve-path var="absJambiLib" path="${jambiLib}" />
<qtjambi-resolve-path var="absNativeBaseDir" path="${nativeBaseDir}" />
<delete dir="${outputDir}/tests/junitxml-${kind}" />
<delete dir="${outputDir}/tests/TestResults-${kind}" />
<mkdir dir="${outputDir}/tests/junitxml-${kind}"/>
<mkdir dir="${outputDir}/tests/TestResults-${kind}"/>
<junit fork="yes" printsummary="true" haltonfailure="no" timeout="600000" showoutput="yes" logfailedtests="yes">
<classpath>
<pathelement location="${tests.junit}" />
<pathelement location="${tests.hamcrest}" />
<pathelement location="${basedir}/jars/qtjambi.jar" />
<!-- <pathelement location="${outputDir}/qtjambi-native-${qtjambi.osname}-${qtjambi.compiler}-${qtjambi.version}${qtjambi.configuration.dash}.jar" /> -->
<pathelement path="src/java/qtjambi-examples" />
<pathelement path="${absOutputDir}/tests/auto" />
<pathelement path="${absOutputDir}/tests/unit" />
<pathelement path="${absOutputDir}/tests/autotests" />
<pathelement path="${basedir}/src/java/qtjambi-examples" />
<!-- examples: is needed to pickup some images and non-code resource files to work with -->
<!-- this is needed by 2 tests in org/qtjambi/autotests/TestInjectedCode.java#testIODevicePeek() -->
<pathelement path="src/java/autotest" />
</classpath>
<jvmarg value="-XstartOnFirstThread"/><!-- if="qtjambi.config.ismacosx" -->
<jvmarg value="-d64"/><!-- This option can force 32bit JRE when
we're built using fat binaries supporting both 32 and 64bit -->
<jvmarg value="-Djava.library.path=${absQtLib}${psep}${absJambiLib}${psep}${outputDir}/tests/lib"/>
<!-- <jvmarg value="-Dorg.qtjambi.qt.verbose-loading=true"/> -->
<jvmarg value="-Dorg.qtjambi.qt.debug=${kind}"/><!-- This should not be needed now, it loads default from MANIFEST.MF -->
<jvmarg value="-Dorg.qtjambi.qt.debug.inhibitNativeResourceThread=true"/>
<!-- <jvmarg value="-Dorg.qtjambi.qt.debug.level=255"/> -->
<jvmarg value="-Dorg.qtjambi.qt.exceptions-for-messages=none"/>
<jvmarg value="-Xrs"/><!-- This stops JVM intercepting SIGSEGV
from native code (so we can see where/why it crashed) otherwise
the JVM may promote SIGSEGV to NullPointerException, which is
not that useful for debugging. -->
<jvmarg value="-Xcheck:jni"/>
<env key="QTJAMBI_DEBUG_TRACE" value="true"/>
<env key="DYLD_LIBRARY_PATH" value="${env.DYLD_LIBRARY_PATH}${psep}${absQtLib}${psep}${absJambiLib}"/><!-- if="qtjambi.config.ismacosx" -->
<formatter type="xml" usefile="yes" />
<batchtest fork="yes" todir="${outputDir}/tests/junitxml-${kind}">
<fileset dir="src/java/autotest">
<include name="**/org/qtjambi/autotests/**/Test*.java"/>
<exclude name="**/org/qtjambi/autotests/**/TestClipboard.java"/>
<exclude name="**/org/qtjambi/autotests/**/TestStartup.java"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementNonPolymorphicObject.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementPolymorphicObject.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementQObjectType.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementValueType.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/*QPlastiqueStyle.java" if="${qt.feature.QT_NO_STYLE_PLASTIQUE}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableOpenGL.java" unless="${qtjambi.opengl.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableSQL.java" unless="${qtjambi.sql.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestInjectedCodeV2LookupHost.java" if="qtjambi.javac.sunjdk5.compiler"/>
<exclude name="**/org/qtjambi/autotests/**/TestInjectedCodeOpenGL.java" unless="${qtjambi.opengl.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestInjectedCodeSQL.java" unless="${qtjambi.sql.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableWebkit.java" unless="${qtjambi.webkit.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableScript.java" unless="${qtjambi.script.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableQt3D.java" unless="${qtjambi.qt3d.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementQt3D.java" unless="${qtjambi.qt3d.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableDeclarative.java" unless="${qtjambi.declarative.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableHelp.java" unless="${qtjambi.help.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableMultimedia.java" unless="${qtjambi.multimedia.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableXmlpatterns.java" unless="${qtjambi.xmlpatterns.any.true}"/>
</fileset>
<fileset dir="src/java/autotest">
<include name="**/org/qtjambi/unittests/**/Test*.java"/>
<!-- MacOSX version of Qt does not have this API -->
<exclude name="**/org/qtjambi/unittests/**/TestQSslSocket.java" unless="qtjambi.ssl" /><!--depends on ssl-->
<exclude name="**/org/qtjambi/unittests/**/TestQScript*.java" unless="${qtjambi.script.any.true}"/>
<exclude name="**/org/qtjambi/unittests/**/TestQXmlFormatter.java" unless="${qtjambi.xmlpattern.any.true}"/>
<exclude name="**/org/qtjambi/unittests/TestXmlQXmlStreamReader.java" if="qtjambi.config.ismacosx"/>
</fileset>
<fileset dir="src/java/autotest" includes="**/org/qtjambi/generatortests/**/Test*.java"/>
</batchtest>
</junit>
</target>
<target name="run.other" unless="qtjambi.osx" depends="init.test, check.junit">
<qtjambi-resolve-path var="absOutputDir" path="${outputDir}" />
<qtjambi-resolve-path var="absQtLib" path="${qtLib}" />
<qtjambi-resolve-path var="absJambiLib" path="${jambiLib}" />
<qtjambi-resolve-path var="absNativeBaseDir" path="${nativeBaseDir}" />
<delete dir="${outputDir}/tests/junitxml-${kind}" />
<delete dir="${outputDir}/tests/TestResults-${kind}" />
<mkdir dir="${outputDir}/tests/junitxml-${kind}"/>
<mkdir dir="${outputDir}/tests/TestResults-${kind}"/>
<!-- files contained in todir being accessed from the tests -->
<copy todir="${outputDir}/tests/auto/org/qtjambi/autotests">
<fileset dir="src/java/autotest/org/qtjambi/autotests" excludes="**/*.java"/>
</copy>
<copy todir="${outputDir}/tests/auto/org/qtjambi/unittests">
<fileset dir="src/java/autotest/org/qtjambi/unittests" excludes="**/*.java"/>
</copy>
<junit fork="yes" printsummary="true" haltonfailure="no" timeout="600000" showoutput="yes" logfailedtests="yes">
<classpath>
<pathelement location="${tests.junit}" />
<pathelement location="${tests.hamcrest}" />
<pathelement location="${basedir}/jars/qtjambi.jar" />
<!-- <pathelement location="${outputDir}/qtjambi-native-${qtjambi.osname}-${qtjambi.compiler}-${qtjambi.version}${qtjambi.configuration.dash}.jar" /> -->
<pathelement path="src/java/qtjambi-examples" />
<pathelement path="${absOutputDir}/tests/auto" />
<pathelement path="${absOutputDir}/tests/unit" />
<pathelement path="${absOutputDir}/tests/autotests" />
<!-- platform-output folder is needed by Windows so that the addLibraryPath()
is setup correctly so plugins can be loaded -->
<pathelement path="${absNativeBaseDir}" />
<pathelement path="${basedir}/src/java/qtjambi-examples" />
<!-- examples: is needed to pickup some images and non-code resource files to work with -->
<!-- this is needed by 2 tests in org/qtjambi/autotests/TestInjectedCode.java#testIODevicePeek() -->
<pathelement path="src/java/autotest" />
</classpath>
<jvmarg value="-Djava.library.path=${absQtLib}${psep}${absJambiLib}${psep}${outputDir}/tests/bin${psep}${outputDir}/tests/lib"/>
<jvmarg value="-Dorg.qtjambi.qt.verbose-loading=true"/>
<jvmarg value="-Dorg.qtjambi.qt.debug=${kind}"/><!-- This should not be needed now, it loads default from MANIFEST.MF -->
<jvmarg value="-Dorg.qtjambi.qt.debug.inhibitNativeResourceThread=true"/>
<jvmarg value="-Dorg.qtjambi.qt.debug.level=255"/>
<jvmarg value="-Dorg.qtjambi.qt.exceptions-for-messages=none"/>
<jvmarg value="-Xrs"/><!-- This stops JVM intercepting SIGSEGV
from native code (so we can see where/why it crashed) otherwise
the JVM may promote SIGSEGV to NullPointerException, which is
not that useful for debugging. -->
<jvmarg value="-Xcheck:jni"/>
<env key="QTJAMBI_DEBUG_TRACE" value="true"/>
<!-- <jvmarg value="-verbose"/> -->
<formatter type="xml" usefile="yes" />
<batchtest fork="yes" todir="${outputDir}/tests/junitxml-${kind}">
<fileset dir="src/java/autotest">
<!-- <include name="**/org/qtjambi/autotests/**/TestClipboard.java"/> -->
<include name="**/org/qtjambi/autotests/**/Test*.java"/>
<exclude name="**/org/qtjambi/autotests/**/TestClipboard.java"/>
<exclude name="**/org/qtjambi/autotests/**/TestStartup.java"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementNonPolymorphicObject.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementPolymorphicObject.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementQObjectType.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementValueType.java" unless="${qtjambi.debug-tools}"/>
<exclude name="**/org/qtjambi/autotests/**/*QPlastiqueStyle.java"/> <!-- if="${qt.feature.QT_NO_STYLE_PLASTIQUE}"-->
<exclude name="**/org/qtjambi/autotests/**/TestCloneableOpenGL.java" unless="${qtjambi.opengl.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableSQL.java" unless="${qtjambi.sql.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestInjectedCodeV2LookupHost.java" if="qtjambi.javac.sunjdk5.compiler"/>
<exclude name="**/org/qtjambi/autotests/**/TestInjectedCodeOpenGL.java" unless="${qtjambi.opengl.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestInjectedCodeSQL.java" unless="${qtjambi.sql.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableWebkit.java" unless="${qtjambi.webkit.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableScript.java" unless="${qtjambi.script.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableQt3D.java" unless="${qtjambi.qt3d.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestMemoryManagementQt3D.java" unless="${qtjambi.qt3d.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableDeclarative.java" unless="${qtjambi.declarative.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableHelp.java" unless="${qtjambi.help.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableMultimedia.java" unless="${qtjambi.multimedia.any.true}"/>
<exclude name="**/org/qtjambi/autotests/**/TestCloneableXmlpatterns.java" unless="${qtjambi.xmlpatterns.any.true}"/>
</fileset>
<fileset dir="src/java/autotest">
<include name="**/org/qtjambi/unittests/**/Test*.java"/>
<!-- MacOSX version of Qt does not have this API -->
<exclude name="**/org/qtjambi/unittests/**/TestQSslSocket.java" unless="qtjambi.ssl" /><!--depends on ssl-->
<exclude name="**/org/qtjambi/unittests/**/TestQScript*.java" unless="${qtjambi.script.any.true}"/>
<exclude name="**/org/qtjambi/unittests/**/TestQXmlFormatter.java" unless="${qtjambi.xmlpattern.any.true}"/>
<exclude name="**/org/qtjambi/unittests/TestXmlQXmlStreamReader.java" if="qtjambi.config.ismacosx"/>
</fileset>
<fileset dir="src/java/autotest" includes="**/org/qtjambi/generatortests/**/Test*.java"/>
</batchtest>
</junit>
</target>
<target name="run" depends="init">
<if>
<available file="${outputDir}/platform-output-debug" type="dir"/>
<then>
<antcall target="debug.run"/>
</then>
<else>
<if>
<available file="${outputDir}/platform-output" type="dir"/>
<then>
<antcall target="release.run"/>
</then>
<else>
<fail message="No build available."/>
</else>
</if>
</else>
</if>
</target>
<target name="release.run" depends="init">
<if>
<available file="${outputDir}/platform-output" type="dir"/>
<then>
<antcall target="run.other">
<param name="kind" value="release"/>
<param name="nativeBaseDir" value="${outputDir}/platform-output"/>
<param name="qtLib" value="${outputDir}/platform-output/lib"/>
<param name="jambiLib" value="${outputDir}/platform-output/lib"/>
</antcall>
<antcall target="run.osx">
<param name="kind" value="release"/>
<param name="nativeBaseDir" value="${outputDir}/platform-output"/>
<param name="qtLib" value="${outputDir}/platform-output/lib"/>
<param name="jambiLib" value="${outputDir}/platform-output/lib"/>
</antcall>
<junitreport todir="${outputDir}/tests/junitxml-release">
<fileset dir="${outputDir}/tests/junitxml-release">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${outputDir}/tests/TestResults-release" />
</junitreport>
</then>
<else>
<fail message="No release build available."/>
</else>
</if>
</target>
<target name="debug.run" depends="init">
<if>
<available file="${outputDir}/platform-output-debug" type="dir"/>
<then>
<antcall target="run.other">
<param name="kind" value="debug"/>
<param name="nativeBaseDir" value="${outputDir}/platform-output-debug"/>
<param name="qtLib" value="${outputDir}/platform-output-debug/lib"/>
<param name="jambiLib" value="${outputDir}/platform-output-debug/lib"/>
</antcall>
<antcall target="run.osx">
<param name="kind" value="debug"/>
<param name="nativeBaseDir" value="${outputDir}/platform-output-debug"/>
<param name="qtLib" value="${outputDir}/platform-output-debug/lib"/>
<param name="jambiLib" value="${outputDir}/platform-output-debug/lib"/>
</antcall>
<junitreport todir="${outputDir}/tests/junitxml-debug">
<fileset dir="${outputDir}/tests/junitxml-debug">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${outputDir}/tests/TestResults-debug" />
</junitreport>
</then>
<else>
<fail message="No debug build available."/>
</else>
</if>
</target>
<target name="tests.generate"
depends="init.build, compile.native.generator, compile.native, compile.java" description="Builds tests and required libraries"/>
<target name="tests.compile"
depends="init.build, compile.native, compile.java" description="Builds tests and required libraries"/>
<target name="tests.run"
depends="init.build, init.test, setenv, run" description="Runs tests and generates report in TestReport subdir"/>
<target name="tests.release.run"
depends="init.build, init.test, setenv, release.run" description="Runs tests on the release build and generates report in TestReport subdir"/>
<target name="tests.debug.run"
depends="init.build, init.test, setenv, debug.run" description="Runs tests on the debug build and generates report in TestReport subdir"/>
</project>