|
327 | 327 | Testing Targets |
328 | 328 | *************** --> |
329 | 329 |
|
330 | | - <!-- The following targets test if the "quiet" and "oneline" formatters |
331 | | - are available, and if so, selects one of them. Otherwise, the "brief" |
332 | | - formatter is used. --> |
333 | | - <target name="init-test-check-quiet-formatter"> |
334 | | - <available property="quiet.present" classname="org.apache.tools.ant.taskdefs.optional.junit.QuietJUnitResultFormatter" /> |
335 | | - </target> |
336 | | - <target name="init-test-check-oneline-formatter"> |
337 | | - <available property="oneline.present" classname="org.apache.tools.ant.taskdefs.optional.junit.OneLineJUnitResultFormatter" /> |
338 | | - </target> |
339 | | - |
340 | | - <target name="init-test-set-quiet" |
341 | | - depends="init-test-check-quiet-formatter" |
342 | | - if="quiet.present"> |
343 | | - <property name="junit-formatter" value="quiet" /> |
344 | | - <property name="junit-haltonfailure" value="no" /> |
345 | | - </target> |
346 | | - |
347 | | - <target name="init-test-set-oneline" |
348 | | - depends="init-test-check-oneline-formatter" |
349 | | - if="oneline.present"> |
350 | | - <property name="junit-formatter" value="oneline" /> |
351 | | - <property name="junit-haltonfailure" value="no" /> |
352 | | - </target> |
353 | | - |
354 | | - <target name="init-test-set-brief" |
355 | | - depends="init-test-check-oneline-formatter" |
356 | | - unless="oneline.present"> |
357 | | - <property name="junit-formatter" value="brief" /> |
358 | | - <property name="junit-haltonfailure" value="yes" /> |
359 | | - </target> |
360 | | - |
361 | | - <target name="init-test" |
362 | | - depends="init-test-set-oneline, init-test-set-brief"> |
363 | | - </target> |
364 | | - |
365 | 330 | <target name="test" depends="test-15" description="Shortcut for 'test-15'"> |
366 | 331 | </target> |
367 | 332 |
|
|
417 | 382 | </and> |
418 | 383 | </selector> |
419 | 384 |
|
420 | | - <target name="do-test-15" depends="assert-15, resolve-java15-tools, init-test"> |
| 385 | + <target name="do-test-15" depends="assert-15, resolve-java15-tools"> |
421 | 386 | <echo message="Running all 5.0 tests matching '${test-filter-string}' under Java 5.0" /> |
422 | 387 | <junit haltonfailure="${junit-haltonfailure}" |
423 | 388 | failureproperty="do-test-15-failed" |
424 | 389 | fork="yes" |
425 | 390 | forkmode="perTest" |
426 | 391 | maxmemory="256M" |
427 | | - dir="${basedir}"> |
| 392 | + includeAntRuntime="yes" |
| 393 | + dir="${basedir}"> |
428 | 394 | <classpath> |
429 | 395 | <pathelement location="${java15-tools}" /> |
430 | 396 | <pathelement location="lib/buildlib/junit.jar" /> |
| 397 | + <pathelement location="lib/buildlib/plt-ant.jar" /> <!-- required for custom formatter --> |
431 | 398 | <pathelement location="${clover-jar}" /> |
432 | 399 | <pathelement location="classes/test" /> |
433 | 400 | <pathelement location="classes/base" /> |
434 | 401 | <pathelement location="classes/lib" /> |
435 | 402 | </classpath> |
436 | | - <formatter type="${junit-formatter}" usefile="false" /> |
| 403 | + <formatter classname="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" usefile="false" /> |
437 | 404 | <batchtest> |
438 | 405 | <fileset dir="classes/test"> |
439 | 406 | <selector refid="tests-to-run" /> |
|
444 | 411 | <fail if="do-test-15-failed" message="One or more unit tests failed."/> |
445 | 412 | </target> |
446 | 413 |
|
447 | | - <target name="do-test-14" depends="resolve-java14-exec, resolve-java14-tools, init-test"> |
| 414 | + <target name="do-test-14" depends="resolve-java14-exec, resolve-java14-tools"> |
448 | 415 | <echo message="Running all 1.4 tests matching '${test-spec}' under Java 1.4" /> |
449 | 416 | <echo message="WARNING: 1.4-compatible test classes are (intentionally) not checked for Java 5 API references." /> |
450 | 417 | <echo message="If such references exist, these tests will probably fail." /> |
|
458 | 425 | <classpath> |
459 | 426 | <pathelement location="${java14-tools}" /> |
460 | 427 | <pathelement location="lib/buildlib/junit.jar" /> |
| 428 | + <pathelement location="lib/buildlib/plt-ant.jar" /> <!-- required for custom formatter --> |
461 | 429 | <pathelement location="${clover-jar}" /> |
462 | 430 | <pathelement location="classes/test-14" /> |
463 | 431 | <pathelement location="classes/base-14" /> |
464 | 432 | <pathelement location="classes/lib-14" /> |
465 | 433 | </classpath> |
466 | | - <formatter type="${junit-formatter}" usefile="false" /> |
| 434 | + <formatter classname="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" usefile="false" /> |
467 | 435 | <batchtest> |
468 | 436 | <fileset dir="classes/test-14"> |
469 | 437 | <selector refid="tests-to-run" /> |
|
474 | 442 | <fail if="do-test-14-failed" message="One or more unit tests failed."/> |
475 | 443 | </target> |
476 | 444 |
|
477 | | - <target name="do-test-14-in-15" depends="assert-15, resolve-java15-tools, init-test"> |
| 445 | + <target name="do-test-14-in-15" depends="assert-15, resolve-java15-tools"> |
478 | 446 | <echo message="Running all 1.4 tests matching '${test-spec}' under Java 5.0" /> |
479 | 447 | <junit haltonfailure="${junit-haltonfailure}" |
480 | 448 | failureproperty="do-test-14-in-15-failed" |
|
485 | 453 | <classpath> |
486 | 454 | <pathelement location="${java15-tools}" /> |
487 | 455 | <pathelement location="lib/buildlib/junit.jar" /> |
| 456 | + <pathelement location="lib/buildlib/plt-ant.jar" /> <!-- required for custom formatter --> |
488 | 457 | <pathelement location="${clover-jar}" /> |
489 | 458 | <pathelement location="classes/test-14" /> |
490 | 459 | <pathelement location="classes/base-14" /> |
491 | 460 | <pathelement location="classes/lib-14" /> |
492 | 461 | </classpath> |
493 | | - <formatter type="${junit-formatter}" usefile="false" /> |
| 462 | + <formatter classname="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" usefile="false" /> |
494 | 463 | <batchtest> |
495 | 464 | <fileset dir="classes/test-14"> |
496 | 465 | <selector refid="tests-to-run" /> |
|
0 commit comments