File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 </not >
9494 </condition >
9595
96- <taskdef uri =" antlib:org.jacoco.ant" resource =" org/jacoco/ant/antlib.xml" >
97- <classpath path =" ${ env.JACOCO_HOME } /jacocoant.jar" />
98- </taskdef >
96+ <!-- Check if JaCoCo is available -->
97+ <condition property =" jacoco.available" >
98+ <and >
99+ <isset property =" env.JACOCO_HOME" />
100+ <available file =" ${ env.JACOCO_HOME } /jacocoant.jar" />
101+ </and >
102+ </condition >
99103
100104 <!-- classpath to compiled wolfssl.jar, for running tests -->
101105 <path id =" classpath" >
430434 </junit >
431435 </target >
432436
433- <target name =" test-jacoco" depends =" build-test" >
437+ <target name =" jacoco-taskdef" if =" jacoco.available" >
438+ <taskdef uri =" antlib:org.jacoco.ant"
439+ resource =" org/jacoco/ant/antlib.xml" >
440+ <classpath path =" ${ env.JACOCO_HOME } /jacocoant.jar" />
441+ </taskdef >
442+ </target >
443+
444+ <target name =" test-jacoco"
445+ depends =" build-test, jacoco-taskdef"
446+ if =" jacoco.available" >
434447 <jacoco : coverage destfile =" ${ build.dir } /jacoco.exec" >
435448 <junit printsummary =" yes" showoutput =" yes" haltonfailure =" yes" fork =" true" >
436449 <classpath >
460473 </jacoco : coverage >
461474 </target >
462475
463- <target name =" coverage-report" >
476+ <target name =" coverage-report"
477+ depends =" jacoco-taskdef"
478+ if =" jacoco.available" >
464479 <jacoco : report >
465480 <executiondata >
466481 <file file =" ${ build.dir } /jacoco.exec" />
You can’t perform that action at this time.
0 commit comments