Lines 47-52
Link Here
|
47 |
<fail unless="run.test.single.method.supported">Execution of a single test method is not supported by this version of Ant.</fail> |
47 |
<fail unless="run.test.single.method.supported">Execution of a single test method is not supported by this version of Ant.</fail> |
48 |
</target> |
48 |
</target> |
49 |
<target name="-prepare-execution"> |
49 |
<target name="-prepare-execution"> |
|
|
50 |
<property name="test.result.dir" location="${java.io.tmpdir}"/> |
51 |
<property name="test.result.file" |
52 |
location="${test.result.dir}/TEST-${classname}.xml"/> |
50 |
<macrodef name="junit-template"> |
53 |
<macrodef name="junit-template"> |
51 |
<element name="test-spec" implicit="yes"/> |
54 |
<element name="test-spec" implicit="yes"/> |
52 |
<sequential> |
55 |
<sequential> |
Lines 59-64
Link Here
|
59 |
<jvmarg value="-ea"/> |
62 |
<jvmarg value="-ea"/> |
60 |
<jvmarg line="${run.jvmargs}"/> |
63 |
<jvmarg line="${run.jvmargs}"/> |
61 |
<formatter type="brief" usefile="false"/> |
64 |
<formatter type="brief" usefile="false"/> |
|
|
65 |
<formatter type="xml" /> |
62 |
<syspropertyset> |
66 |
<syspropertyset> |
63 |
<propertyref prefix="test-sys-prop."/> |
67 |
<propertyref prefix="test-sys-prop."/> |
64 |
<mapper from="test-sys-prop.*" to="*" type="glob"/> |
68 |
<mapper from="test-sys-prop.*" to="*" type="glob"/> |
Lines 70-82
Link Here
|
70 |
</target> |
74 |
</target> |
71 |
<target name="-test-class" depends="-prepare-execution" unless="methodname"> |
75 |
<target name="-test-class" depends="-prepare-execution" unless="methodname"> |
72 |
<junit-template> |
76 |
<junit-template> |
73 |
<test name="${classname}"/> |
77 |
<test name="${classname}" todir="${test.result.dir}"/> |
74 |
</junit-template> |
78 |
</junit-template> |
75 |
</target> |
79 |
</target> |
76 |
<target name="-test-method" depends="-check-run-test-single-method-supported,-prepare-execution" if="methodname"> |
80 |
<target name="-test-method" depends="-check-run-test-single-method-supported,-prepare-execution" if="methodname"> |
77 |
<junit-template> |
81 |
<junit-template> |
78 |
<test name="${classname}" methods="${methodname}"/> |
82 |
<test name="${classname}" methods="${methodname}" |
|
|
83 |
todir="${test.result.dir}"/> |
79 |
</junit-template> |
84 |
</junit-template> |
80 |
</target> |
85 |
</target> |
81 |
<target name="test" depends="-test-class,-test-method"/> |
86 |
<target name="test" depends="-test-class,-test-method" > |
|
|
87 |
<!-- This target is intended to be used in conjunction with the |
88 |
org.apache.tools.ant.module.spi.AntLogger. Note, the next task |
89 |
deletes just created test report. --> |
90 |
<delete file="${test.result.file}" deleteonexit="true" /> |
91 |
</target> |
82 |
</project> |
92 |
</project> |