Lines 136-141
Link Here
|
136 |
this.debugSuspend = suspend; |
136 |
this.debugSuspend = suspend; |
137 |
} |
137 |
} |
138 |
|
138 |
|
|
|
139 |
/** Address to attach to |
140 |
*/ |
141 |
public void setDebugAddress (String address) { |
142 |
this.debugAddress = address; |
143 |
} |
144 |
|
139 |
// test mode |
145 |
// test mode |
140 |
public void setTestMode(String testMode) { |
146 |
public void setTestMode(String testMode) { |
141 |
if ((testMode != null) & (!testMode.equals(""))) { |
147 |
if ((testMode != null) & (!testMode.equals(""))) { |
Lines 198-203
Link Here
|
198 |
// debug should suspend code execution |
204 |
// debug should suspend code execution |
199 |
protected boolean debugSuspend = false; |
205 |
protected boolean debugSuspend = false; |
200 |
|
206 |
|
|
|
207 |
// debug should start its own server |
208 |
private String debugAddress; |
209 |
|
201 |
// debug port to which debugger is connected. When 0 - debugging is not started |
210 |
// debug port to which debugger is connected. When 0 - debugging is not started |
202 |
protected int debugPort = 0; |
211 |
protected int debugPort = 0; |
203 |
|
212 |
|
Lines 266-277
Link Here
|
266 |
if (enableAssertions) { |
275 |
if (enableAssertions) { |
267 |
commandLine.createVmArgument().setValue("-ea"); |
276 |
commandLine.createVmArgument().setValue("-ea"); |
268 |
} |
277 |
} |
|
|
278 |
|
269 |
// debugger |
279 |
// debugger |
270 |
if (debugPort > 0) { |
280 |
if (debugPort > 0) { |
|
|
281 |
if (debugAddress != null && debugAddress.length () > 0) { |
282 |
throw new BuildException ("Cannot specify debug port (" + debugPort + ") and address (" + debugAddress + ") at once"); |
283 |
} |
271 |
String suspendArg = debugSuspend ? "y" : "n"; |
284 |
String suspendArg = debugSuspend ? "y" : "n"; |
272 |
String debugArgument = "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend="+suspendArg+",address="+debugPort; |
285 |
String debugArgument = "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend="+suspendArg+",address="+debugPort; |
273 |
commandLine.createVmArgument().setLine(debugArgument); |
286 |
commandLine.createVmArgument().setLine(debugArgument); |
274 |
} |
287 |
} else { |
|
|
288 |
if (debugAddress != null && debugAddress.length () > 0) { |
289 |
String debugArgument = "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=" + debugAddress; |
290 |
commandLine.createVmArgument().setLine(debugArgument); |
291 |
} |
292 |
} |
293 |
|
294 |
|
275 |
// add runnerproperties file sys property |
295 |
// add runnerproperties file sys property |
276 |
Environment.Variable runnerProperties = new Environment.Variable(); |
296 |
Environment.Variable runnerProperties = new Environment.Variable(); |
277 |
runnerProperties.setKey(JUnitTestRunner.TESTRUNNER_PROPERTIES_FILENAME_KEY); |
297 |
runnerProperties.setKey(JUnitTestRunner.TESTRUNNER_PROPERTIES_FILENAME_KEY); |