You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

junit.xml 2.9 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0"?>
  2. <project name="junit-test" basedir="." default="outputTests">
  3. <property name="showoutput" value="false" />
  4. <path id="test">
  5. <pathelement path="${java.class.path}" />
  6. <pathelement location="../../../../../build/testcases" />
  7. </path>
  8. <target name="cleanup">
  9. <delete file="testlog.txt"/>
  10. </target>
  11. <target name="testForkedOutput">
  12. <junit fork="yes" haltonerror="true" haltonfailure="true"
  13. showoutput="${showoutput}">
  14. <test name="org.example.junit.Output" />
  15. <classpath refid="test" />
  16. </junit>
  17. </target>
  18. <target name="testNonForkedOutput">
  19. <junit fork="false" haltonerror="true" haltonfailure="true"
  20. showoutput="${showoutput}">
  21. <test name="org.example.junit.Output" />
  22. <classpath refid="test" />
  23. </junit>
  24. </target>
  25. <target name="testForkedThreadedOutput">
  26. <junit fork="yes" haltonerror="true" haltonfailure="true"
  27. showoutput="${showoutput}">
  28. <test name="org.example.junit.ThreadedOutput" />
  29. <classpath refid="test" />
  30. </junit>
  31. </target>
  32. <target name="testNonForkedThreadedOutput">
  33. <junit fork="false" haltonerror="true" haltonfailure="true"
  34. showoutput="${showoutput}">
  35. <test name="org.example.junit.ThreadedOutput" />
  36. <classpath refid="test" />
  37. </junit>
  38. </target>
  39. <target name="outputTests"
  40. depends="testForkedOutput,testNonForkedOutput,testForkedThreadedOutput,testNonForkedThreadedOutput" />
  41. <target name="crash">
  42. <junit fork="true" errorproperty="crashed">
  43. <test name="org.apache.tools.ant.taskdefs.optional.junit.VmCrash"/>
  44. <classpath refid="test" />
  45. </junit>
  46. </target>
  47. <target name="nocrash">
  48. <junit fork="true" errorproperty="crashed">
  49. <test name="org.apache.tools.ant.taskdefs.optional.junit.NoVmCrash"/>
  50. <classpath refid="test" />
  51. </junit>
  52. </target>
  53. <target name="timeout">
  54. <junit fork="true" errorproperty="timeout" timeout="1000">
  55. <test name="org.apache.tools.ant.taskdefs.optional.junit.Sleeper"/>
  56. <classpath refid="test" />
  57. </junit>
  58. </target>
  59. <target name="notimeout">
  60. <junit fork="true" errorproperty="timeout" timeout="15000">
  61. <test name="org.apache.tools.ant.taskdefs.optional.junit.Sleeper"/>
  62. <classpath refid="test" />
  63. </junit>
  64. </target>
  65. <target name="capture">
  66. <property name="fork" value="false"/>
  67. <junit fork="${fork}">
  68. <test
  69. name="org.apache.tools.ant.taskdefs.optional.junit.Printer"
  70. outfile="testlog"/>
  71. <formatter type="plain"/>
  72. <classpath refid="test"/>
  73. </junit>
  74. </target>
  75. <target name="captureToSummary">
  76. <property name="fork" value="true"/>
  77. <junit fork="${fork}" printSummary="withOutAndErr">
  78. <test name="org.apache.tools.ant.taskdefs.optional.junit.Printer"/>
  79. <classpath refid="test"/>
  80. </junit>
  81. </target>
  82. </project>