diff options
author | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2012-12-28 13:54:23 +0100 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2012-12-28 13:54:23 +0100 |
commit | 47990a4a02bb738eedd7dce6a2f2dd10d5f28cc4 (patch) | |
tree | 6413669212ce5c34c5c8068038e50b1481df6743 /org.jacoco.ant.test | |
parent | 9c1b63dafd9be7316d3661aaa18aa3815160d19c (diff) | |
download | jacoco-47990a4a02bb738eedd7dce6a2f2dd10d5f28cc4.tar.gz |
Additional way to provide configuration options via classpath resource.
Diffstat (limited to 'org.jacoco.ant.test')
-rw-r--r-- | org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml index ba61b720..fd23caa7 100644 --- a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml +++ b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml @@ -8,7 +8,7 @@ http://www.eclipse.org/legal/epl-v10.html Contributors: - Brock Janiczak - initial API and implementation + Marc R. Hoffmann - initial API and implementation $Id: $ --> @@ -49,15 +49,32 @@ </jacoco:instrument> </target> - <target name="testInstrumentAndRun"> + <target name="testInstrumentAndRunWithConfigFile"> <jacoco:instrument destdir="${temp.dir}"> <fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/> </jacoco:instrument> <au:assertLogContains text="Instrumented 12 classes to ${temp.dir}"/> <au:assertFileExists file="${temp.dir}/org/jacoco/ant/InstrumentTaskTest.class" /> + <echo file="${temp.dir}/jacoco-agent.properties">destfile=${temp.dir}/test.exec</echo> <java classname="org.jacoco.ant.TestTarget" failonerror="true" fork="true"> - <sysproperty key="jacoco.destfile" file="${temp.dir}/test.exec"/> + <classpath> + <pathelement path="${org.jacoco.ant.instrumentTaskTest.agent.file}"/> + <pathelement path="${temp.dir}"/> + </classpath> + </java> + <au:assertFileExists file="${temp.dir}/test.exec" /> + </target> + + <target name="testInstrumentAndRunWithSystemProperties"> + <jacoco:instrument destdir="${temp.dir}"> + <fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/> + </jacoco:instrument> + <au:assertLogContains text="Instrumented 12 classes to ${temp.dir}"/> + <au:assertFileExists file="${temp.dir}/org/jacoco/ant/InstrumentTaskTest.class" /> + + <java classname="org.jacoco.ant.TestTarget" failonerror="true" fork="true"> + <sysproperty key="jacoco-agent.destfile" file="${temp.dir}/test.exec"/> <classpath> <pathelement path="${org.jacoco.ant.instrumentTaskTest.agent.file}"/> <pathelement path="${temp.dir}"/> |