You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2013/11/26 23:10:19 UTC
svn commit: r1545865 - in /tomcat/tc7.0.x/trunk: ./ build.xml
Author: kkolinko
Date: Tue Nov 26 22:10:19 2013
New Revision: 1545865
URL: http://svn.apache.org/r1545865
Log:
Merged r1545863 from tomcat/trunk:
Fix Cobertura runs that were broken by r1545075
I do not know what exactly went wrong, but I suspect that re-declaring a <path> with the same id was overwriting the previous definition. Thus I moved those into separate <target> that executes conditionally.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/build.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1545863
Modified: tomcat/tc7.0.x/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1545865&r1=1545864&r2=1545865&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/build.xml (original)
+++ tomcat/tc7.0.x/trunk/build.xml Tue Nov 26 22:10:19 2013
@@ -1287,10 +1287,6 @@
description="The extension to use to distinguish the output"/>
<sequential>
- <!-- Define classpaths when Cobertura is turned off. -->
- <path id="cobertura.classpath" />
- <path id="tomcat.classes.cobertura.classpath" />
-
<junit printsummary="yes" fork="yes" dir="." showoutput="yes"
errorproperty="test.result.error"
failureproperty="test.result.failure"
@@ -1302,10 +1298,7 @@
<jvmarg value="${test.formatter}"/>
<jvmarg value="-Dapple.awt.UIElement=true"/>
- <!-- The Cobertura instrumented classes must appear first on the classpath -->
- <classpath refid="tomcat.classes.cobertura.classpath" />
- <classpath refid="tomcat.test.classpath" />
- <classpath refid="cobertura.classpath"/>
+ <classpath refid="tomcat.test.run.classpath" />
<sysproperty key="tomcat.test.temp" value="${test.temp}" />
<sysproperty key="tomcat.test.tomcatbuild" value="${tomcat.build}" />
@@ -1339,15 +1332,17 @@
</sequential>
</macrodef>
- <target name="cobertura-instrument" depends="compile,download-cobertura"
+ <target name="cobertura-disabled" unless="${test.cobertura}">
+ <!-- Define classpath used to run tests when Cobertura is turned off. -->
+ <path id="tomcat.test.run.classpath">
+ <path refid="tomcat.test.classpath" />
+ </path>
+ </target>
+
+ <target name="cobertura-instrument" depends="compile,download-cobertura,cobertura-disabled"
if="${test.cobertura}"
description="Adds Cobertura instrumentation to the compiled bytecode">
- <mkdir dir="${tomcat.classes.cobertura}"/>
-
- <path id="tomcat.classes.cobertura.classpath"
- location="${tomcat.classes.cobertura}" />
-
<path id="cobertura.classpath">
<fileset dir="${cobertura.home}">
<include name="cobertura-${cobertura.version}.jar" />
@@ -1376,6 +1371,13 @@
<auxClasspath path="${jdt.jar}" />
</cobertura-instrument>
+ <!-- Define classpath used to run tests -->
+ <!-- The Cobertura instrumented classes must appear first on the classpath -->
+ <path id="tomcat.test.run.classpath">
+ <path location="${tomcat.classes.cobertura}" />
+ <path refid="tomcat.test.classpath" />
+ <path refid="cobertura.classpath"/>
+ </path>
</target>
<target name="cobertura-report" if="${test.cobertura}"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org