Lines 17-23
Link Here
|
17 |
--> |
17 |
--> |
18 |
<project name="JMeter" default="install" basedir="." |
18 |
<project name="JMeter" default="install" basedir="." |
19 |
xmlns:rat="antlib:org.apache.rat.anttasks" |
19 |
xmlns:rat="antlib:org.apache.rat.anttasks" |
20 |
xmlns="antlib:org.apache.tools.ant"> |
20 |
xmlns:jacoco="antlib:org.jacoco.ant" |
|
|
21 |
xmlns:if="ant:if" |
22 |
xmlns="antlib:org.apache.tools.ant" > |
21 |
<description> |
23 |
<description> |
22 |
|
24 |
|
23 |
N.B. To build JMeter from a release you need both the binary and source archives, |
25 |
N.B. To build JMeter from a release you need both the binary and source archives, |
Lines 331-336
Link Here
|
331 |
<!-- Directory where Optional 3rd party libraries live --> |
333 |
<!-- Directory where Optional 3rd party libraries live --> |
332 |
<property name="lib.opt" value="lib/opt"/> |
334 |
<property name="lib.opt" value="lib/opt"/> |
333 |
|
335 |
|
|
|
336 |
<!-- Directory where Jacoco libraries live --> |
337 |
<!-- I'm to lazy to fix this now, so I tag along with rat & checkstyle, |
338 |
which already live there. But: none of these should apear on the classpath |
339 |
of Jmeter, neither runtime, nor compiletime. These are only required on the |
340 |
Ant classpath, so judging from comments elsewhere, this is the wrong place. |
341 |
--> |
342 |
<property name="lib.coverage" location="lib/opt"/> |
343 |
|
334 |
<!-- Other stuff --> |
344 |
<!-- Other stuff --> |
335 |
<property name="extras.dir" value="extras"/> |
345 |
<property name="extras.dir" value="extras"/> |
336 |
|
346 |
|
Lines 892-897
Link Here
|
892 |
<classpath> |
902 |
<classpath> |
893 |
<pathelement location="${dest.jar.jmeter}/ApacheJMeter.jar"/> |
903 |
<pathelement location="${dest.jar.jmeter}/ApacheJMeter.jar"/> |
894 |
</classpath> |
904 |
</classpath> |
|
|
905 |
<jvmarg value="${jacocoagent}run_gui:java(server) org.apache.jmeter.NewDriver" if:set="jacocoagent" /> |
895 |
<sysproperty key="jmeter.home" value="${basedir}"/> |
906 |
<sysproperty key="jmeter.home" value="${basedir}"/> |
896 |
</java> |
907 |
</java> |
897 |
</target> |
908 |
</target> |
Lines 2457-2462
Link Here
|
2457 |
<fileset dir="${dest.jar}" includes="*.jar"/> |
2468 |
<fileset dir="${dest.jar}" includes="*.jar"/> |
2458 |
<path refid="classpath"/> |
2469 |
<path refid="classpath"/> |
2459 |
</classpath> |
2470 |
</classpath> |
|
|
2471 |
<jvmarg value="${jacocoagent}batchtest:daemon:java(server) -Djava.awt.headless=true org.apache.jmeter.NewDriver -j ${batchtestserver.out}/${batchtestserver.log} -Dserver_port=${rmi_port}" if:set="jacocoagent" /> |
2460 |
<sysproperty key="java.awt.headless" value="true"/> |
2472 |
<sysproperty key="java.awt.headless" value="true"/> |
2461 |
<!-- Bug 59723 --> |
2473 |
<!-- Bug 59723 --> |
2462 |
<!-- quieten the logging; this has to be done first --> |
2474 |
<!-- quieten the logging; this has to be done first --> |
Lines 2558-2563
Link Here
|
2558 |
<fileset dir="${dest.jar}" includes="*.jar"/> |
2570 |
<fileset dir="${dest.jar}" includes="*.jar"/> |
2559 |
<path refid="classpath"/> |
2571 |
<path refid="classpath"/> |
2560 |
</classpath> |
2572 |
</classpath> |
|
|
2573 |
<jvmarg value="${jacocoagent}batchtest:java(${taskname}) -Djava.awt.headless=false org.apache.jmeter.NewDriver -ttestfiles/${batchtest.name}.jmx ${remote}" if:set="jacocoagent" /> |
2561 |
<!-- Detect if non-GUI runs OK headless by forcing it to try using non-headless mode --> |
2574 |
<!-- Detect if non-GUI runs OK headless by forcing it to try using non-headless mode --> |
2562 |
<sysproperty key="user.language" value="en"/> |
2575 |
<sysproperty key="user.language" value="en"/> |
2563 |
<sysproperty key="user.region" value="US"/> |
2576 |
<sysproperty key="user.region" value="US"/> |
Lines 2755-2760
Link Here
|
2755 |
<path refid="classpath"/> |
2768 |
<path refid="classpath"/> |
2756 |
</classpath> |
2769 |
</classpath> |
2757 |
<jvmarg value="-server"/> |
2770 |
<jvmarg value="-server"/> |
|
|
2771 |
<jvmarg value="${jacocoagent}_test:java -Djava.awt.headless=${test.headless} org.apache.jorphan.test.AllTests" if:set="jacocoagent" /> |
2758 |
<jvmarg value="-Dfile.encoding=${test.encoding}"/> |
2772 |
<jvmarg value="-Dfile.encoding=${test.encoding}"/> |
2759 |
<sysproperty key="java.awt.headless" value="${test.headless}"/> |
2773 |
<sysproperty key="java.awt.headless" value="${test.headless}"/> |
2760 |
<sysproperty key="testsaveservice.saveout" value="${testsaveservice.saveout}" /> |
2774 |
<sysproperty key="testsaveservice.saveout" value="${testsaveservice.saveout}" /> |
Lines 2781-2786
Link Here
|
2781 |
printsummary="on"> |
2795 |
printsummary="on"> |
2782 |
<formatter type="${test.format}" usefile="yes"/> |
2796 |
<formatter type="${test.format}" usefile="yes"/> |
2783 |
<formatter type="xml"/> |
2797 |
<formatter type="xml"/> |
|
|
2798 |
<jvmarg value="${jacocoagent}run_gui:junit -Djava.awt.headless=${java.awt.headless} org.apache.jmeter.NewDriver" if:set="jacocoagent" /> |
2784 |
<jvmarg value="-Dfile.encoding=${test.encoding}"/> |
2799 |
<jvmarg value="-Dfile.encoding=${test.encoding}"/> |
2785 |
<!-- Allow headless to be passed in --> |
2800 |
<!-- Allow headless to be passed in --> |
2786 |
<jvmarg value="-Djava.awt.headless=${java.awt.headless}"/> |
2801 |
<jvmarg value="-Djava.awt.headless=${java.awt.headless}"/> |
Lines 3016-3021
Link Here
|
3016 |
<process_jarfile jarname="xmlpull"/> |
3031 |
<process_jarfile jarname="xmlpull"/> |
3017 |
<process_jarfile jarname="xpp3"/> |
3032 |
<process_jarfile jarname="xpp3"/> |
3018 |
<process_jarfile jarname="xstream"/> |
3033 |
<process_jarfile jarname="xstream"/> |
|
|
3034 |
<process_jarfile jarname="jacocoant" dest.dir="${lib.coverage}" /> |
3019 |
</target> |
3035 |
</target> |
3020 |
|
3036 |
|
3021 |
<target name="_process_doc_jars"> |
3037 |
<target name="_process_doc_jars"> |
Lines 3085-3090
Link Here
|
3085 |
</antcall> |
3101 |
</antcall> |
3086 |
</target> |
3102 |
</target> |
3087 |
|
3103 |
|
|
|
3104 |
<target name="_coverage.prepare" > |
3105 |
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"> |
3106 |
<classpath path="${lib.coverage}/${jacocoant.jar}"/> |
3107 |
</taskdef> |
3108 |
<jacoco:agent property="jacocoagent" |
3109 |
destfile="${build.dir}/jacoco.exec" |
3110 |
includes="org.apache.jmeter.*:org.apache.jorphan.*:org.apache.commons.cli.avalon.*:org.sl4j.impl.StaticLoggerBinder" |
3111 |
sessionid="" |
3112 |
/> |
3113 |
</target> |
3114 |
|
3115 |
<target name="_coverage.report" depends="_coverage.prepare, init-svnVersion, init-version"> |
3116 |
<jacoco:report> |
3117 |
|
3118 |
<executiondata> |
3119 |
<file file="${build.dir}/jacoco.exec"/> |
3120 |
</executiondata> |
3121 |
|
3122 |
<structure name="JMeter ${jmeter.version} ${implementation.version}"> |
3123 |
<classfiles> |
3124 |
<fileset dir="${build.components}"/> |
3125 |
<fileset dir="${build.core}"/> |
3126 |
<fileset dir="${build.functions}"/> |
3127 |
<fileset dir="${build.jorphan}"/> |
3128 |
<fileset dir="${build.junit}"/> |
3129 |
<fileset dir="${build.monitor.components}"/> |
3130 |
<fileset dir="${build.monitor.model}"/> |
3131 |
<fileset dir="${build.ftp}"/> |
3132 |
<fileset dir="${build.http}"/> |
3133 |
<fileset dir="${build.java}"/> |
3134 |
<fileset dir="${build.jdbc}"/> |
3135 |
<fileset dir="${build.jms}"/> |
3136 |
<fileset dir="${build.ldap}"/> |
3137 |
<fileset dir="${build.mail}"/> |
3138 |
<fileset dir="${build.mongodb}"/> |
3139 |
<fileset dir="${build.native}"/> |
3140 |
<fileset dir="${build.tcp}"/> |
3141 |
<fileset dir="${build.slf4j_logkit}"/> |
3142 |
<fileset dir="${build.test}"/> |
3143 |
</classfiles> |
3144 |
<sourcefiles encoding="${encoding}"> |
3145 |
<fileset dir="${src.components}"/> |
3146 |
<fileset dir="${src.core}"/> |
3147 |
<fileset dir="${src.functions}"/> |
3148 |
<fileset dir="${src.jorphan}"/> |
3149 |
<fileset dir="${src.junit}"/> |
3150 |
<fileset dir="${src.monitor.components}"/> |
3151 |
<fileset dir="${src.monitor.model}"/> |
3152 |
<fileset dir="${src.ftp}"/> |
3153 |
<fileset dir="${src.http}"/> |
3154 |
<fileset dir="${src.java}"/> |
3155 |
<fileset dir="${src.jdbc}"/> |
3156 |
<fileset dir="${src.jms}"/> |
3157 |
<fileset dir="${src.ldap}"/> |
3158 |
<fileset dir="${src.mail}"/> |
3159 |
<fileset dir="${src.mongodb}"/> |
3160 |
<fileset dir="${src.native}"/> |
3161 |
<fileset dir="${src.tcp}"/> |
3162 |
<fileset dir="${src.slf4j_logkit}"/> |
3163 |
<fileset dir="${src.test}"/> |
3164 |
</sourcefiles> |
3165 |
</structure> |
3166 |
|
3167 |
<html destdir="reports/coverage"/> |
3168 |
<xml destfile="reports/coverage/jmeter-coverage.xml"/> |
3169 |
<csv destfile="reports/coverage/jmeter-coverage.csv"/> |
3170 |
|
3171 |
</jacoco:report> |
3172 |
</target> |
3173 |
|
3174 |
<target name="coverage" depends="_coverage.prepare, test-both, _allbatchtests, _coverage.report"/> |
3175 |
|
3088 |
<target name="_check_exists" if="_check_exists"> |
3176 |
<target name="_check_exists" if="_check_exists"> |
3089 |
<fail message="Invalid call sequence - file.exists should not be defined" if="file.exists"/> |
3177 |
<fail message="Invalid call sequence - file.exists should not be defined" if="file.exists"/> |
3090 |
<available file="${file}" property="file.exists"/> |
3178 |
<available file="${file}" property="file.exists"/> |