1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <project name =" JNA" default =" default" basedir =" ." xmlns : artifact =" antlib:org.apache.maven.artifact.ant" >
2
+ <project name =" JNA" default =" default" basedir =" ." xmlns : artifact =" antlib:org.apache.maven.artifact.ant" xmlns : if = " ant:if " >
3
3
<description >Builds and tests JNA</description >
4
4
5
5
<!-- Default build compiles all platform-independent stuff as well
@@ -1127,6 +1127,12 @@ cd ..
1127
1127
<target name =" test" depends =" -enable-native,jar,compile-tests" unless =" cross-compile"
1128
1128
description =" Run all unit tests" >
1129
1129
<property name =" test.fork" value =" yes" />
1130
+ <property name =" test.forkmode" value =" perTest" />
1131
+
1132
+ <condition property =" test.jdwp" value =" -Xrunjdwp:transport=dt_socket,address=${ test.debugport } ,server=y,suspend=y" >
1133
+ <isset property =" test.debugport" />
1134
+ </condition >
1135
+
1130
1136
<property name =" reports.junit" location =" ${ reports } /junit/${ os.prefix } " />
1131
1137
<property name =" results.junit" location =" ${ build } /junit-results/${ os.prefix } " />
1132
1138
<mkdir dir =" ${ results.junit } " />
@@ -1148,6 +1154,7 @@ cd ..
1148
1154
</and >
1149
1155
</condition >
1150
1156
<property name =" tests.platform" value =" " />
1157
+ <property name =" tests.include" value =" com/sun/jna/*Test.java" />
1151
1158
<property name =" tests.exclude" value =" " />
1152
1159
<property name =" tests.exclude-patterns" value =" " />
1153
1160
<condition property =" java.awt.headless" value =" true" >
@@ -1156,8 +1163,8 @@ cd ..
1156
1163
<propertyset id =" headless" >
1157
1164
<propertyref prefix =" java.awt.headless" />
1158
1165
</propertyset >
1159
- <junit fork =" ${ test.fork } " failureproperty =" testfailure" tempdir =" ${ build } " >
1160
- <!-- < jvmarg value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y" /> -- >
1166
+ <junit fork =" ${ test.fork } " forkmode = " ${ test.forkmode } " failureproperty =" testfailure" tempdir =" ${ build } " >
1167
+ < jvmarg if : set = " test.jdwp " value = " ${ test.jdwp } " / >
1161
1168
<!-- optionally run headless -->
1162
1169
<syspropertyset refid =" headless" />
1163
1170
<!-- avoid VM conflicts with JNA protected mode -->
@@ -1173,7 +1180,7 @@ cd ..
1173
1180
<formatter type =" xml" />
1174
1181
<batchtest todir =" ${ results.junit } " >
1175
1182
<fileset dir =" ${ test.src } " excludes =" ${ tests.exclude-patterns } " >
1176
- <include name =" com/sun/jna/*Test.java " />
1183
+ <include name =" ${ tests.include } " />
1177
1184
<include name =" ${ tests.platform } " />
1178
1185
<exclude name =" ${ tests.exclude } " />
1179
1186
</fileset >
0 commit comments