This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 171050
Collapse All | Expand All

(-)a/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-debug-snippet.xml (-1 / +4 lines)
Lines 68-73 Link Here
68
    </target>
68
    </target>
69
    <target name="-prepare-execution" depends="-init-debug-args">
69
    <target name="-prepare-execution" depends="-init-debug-args">
70
        <macrodef name="junit-debug-template">
70
        <macrodef name="junit-debug-template">
71
            <!-- This macros is intended to be used in conjunction with the
72
            org.apache.tools.ant.module.spi.AntLogger. Note, the last task
73
            deletes just created test report. -->
71
            <element name="extra-args" implicit="yes" optional="yes"/>
74
            <element name="extra-args" implicit="yes" optional="yes"/>
72
            <sequential>
75
            <sequential>
73
                <translate-classpath classpath="${classpath}" targetProperty="classpath-translated" />
76
                <translate-classpath classpath="${classpath}" targetProperty="classpath-translated" />
Lines 103-109 Link Here
103
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
106
                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
104
                    </syspropertyset>
107
                    </syspropertyset>
105
                </java>
108
                </java>
106
                <!-- cannot delete ${test.result.file} yet, will be parsed soon; XXX deleteOnExit? -->
109
                <delete file="${test.result.file}" deleteonexit="true" />
107
            </sequential>
110
            </sequential>
108
        </macrodef>
111
        </macrodef>
109
    </target>
112
    </target>
(-)a/java.source.ant/src/org/netbeans/modules/java/source/ant/resources/junit-snippet.xml (-3 / +13 lines)
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>

Return to bug 171050