mirror of https://github.com/apache/lucene.git
LUCENE-4445: Fix clover to correcty instrument all packages, improve permgen
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1391382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c65bdde36f
commit
09720113f8
|
@ -51,7 +51,8 @@
|
|||
</ant>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="test-core, test-modules, test-backwards"
|
||||
<!-- "-clover.load" is *not* a useless dependency. do not remove -->
|
||||
<target name="test" depends="-clover.load, test-core, test-modules, test-backwards"
|
||||
description="Runs all unit tests (core, modules and back-compat)"
|
||||
/>
|
||||
|
||||
|
|
|
@ -1138,7 +1138,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
|
||||
<!-- note: order here is important, the taskdef depends on test-framework
|
||||
jars so we just order it after compile-test to ensure that -->
|
||||
<target name="test" depends="compile-test,install-junit4-taskdef,clover,validate" description="Runs unit tests">
|
||||
<target name="test" depends="clover,compile-test,install-junit4-taskdef,validate" description="Runs unit tests">
|
||||
<mkdir dir="${junit.output.dir}"/>
|
||||
<test-macro threadNum="${tests.jvms}" />
|
||||
</target>
|
||||
|
@ -1146,9 +1146,9 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
<!--
|
||||
See http://issues.apache.org/jira/browse/LUCENE-721
|
||||
-->
|
||||
<target name="clover" depends="-clover.disable,-clover.setup" description="Instrument the Unit tests using Clover. To use, specify -Drun.clover=true on the command line."/>
|
||||
<target name="clover" depends="-clover.disable,-clover.load,-clover.classpath,-clover.setup" description="Instrument the Unit tests using Clover. To use, specify -Drun.clover=true on the command line."/>
|
||||
|
||||
<target name="-clover.setup" if="run.clover" unless="clover.loaded">
|
||||
<target name="-clover.load" if="run.clover" unless="clover.loaded">
|
||||
<available file="${clover.license.path}" property="clover.license.available" />
|
||||
<fail unless="clover.license.available"><![CDATA[.
|
||||
|
||||
|
@ -1173,6 +1173,18 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
inline="true" conf="master" type="jar" pathid="clover.classpath"/>
|
||||
<taskdef resource="cloverlib.xml" classpathref="clover.classpath" />
|
||||
<mkdir dir="${clover.db.dir}"/>
|
||||
<!-- This is a hack, instead of setting "clover.loaded" to "true", we set it
|
||||
to the stringified classpath. So it can be passed down to subants,
|
||||
and reloaded by "-clover.classpath" task (see below): -->
|
||||
<pathconvert property="clover.loaded" refid="clover.classpath"/>
|
||||
</target>
|
||||
|
||||
<target name="-clover.classpath" if="run.clover">
|
||||
<!-- redefine the clover classpath refid for tests by using the hack above: -->
|
||||
<path id="clover.classpath" path="${clover.loaded}"/>
|
||||
</target>
|
||||
|
||||
<target name="-clover.setup" if="run.clover">
|
||||
<clover-setup initString="${clover.db.dir}/coverage.db" encoding="${build.encoding}">
|
||||
<fileset dir="${src.dir}" erroronmissingdir="no">
|
||||
<include name="org/apache/**/*.java" />
|
||||
|
@ -1181,7 +1193,6 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
|||
<include name="org/apache/**/*.java" />
|
||||
</testsources>
|
||||
</clover-setup>
|
||||
<property name="clover.loaded" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-clover.disable" unless="run.clover">
|
||||
|
|
|
@ -32,19 +32,13 @@
|
|||
</path>
|
||||
|
||||
<!--
|
||||
Specialize compile-core to depend on lucene-core compilation,
|
||||
and *not* to depend on clover; clover already includes the
|
||||
test-framework sources in each module's test instrumentation.
|
||||
Specialize compile-core to depend on lucene-core and lucene-codecs compilation.
|
||||
-->
|
||||
<target name="compile-core" depends="init,compile-lucene-core,compile-codecs"
|
||||
description="Compiles test-framework classes">
|
||||
<compile srcdir="${src.dir}" destdir="${build.dir}/classes/java">
|
||||
<classpath refid="classpath"/>
|
||||
</compile>
|
||||
<copy todir="${build.dir}/classes/java">
|
||||
<fileset dir="${src.dir}/../resources" erroronmissingdir="no"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="compile-core" depends="init,compile-lucene-core,compile-codecs,common.compile-core"
|
||||
description="Compiles test-framework classes"/>
|
||||
|
||||
<!-- redefine the clover setup, because we dont want to run clover for the test-framework -->
|
||||
<target name="-clover.setup" if="run.clover"/>
|
||||
|
||||
<target name="javadocs-core" depends="javadocs"/>
|
||||
<target name="javadocs" depends="init,javadocs-lucene-core,javadocs-lucene-codecs">
|
||||
|
|
|
@ -131,8 +131,9 @@
|
|||
depends="compile-core, compile-contrib"/>
|
||||
<target name="test" description="Validate, then run core, solrj, and contrib unit tests."
|
||||
depends="test-core, test-contrib"/>
|
||||
<!-- "-clover.load" is *not* a useless dependency. do not remove -->
|
||||
<target name="test-core" description="Runs the core and solrj unit tests."
|
||||
depends="test-solr-core, test-solrj"/>
|
||||
depends="-clover.load, test-solr-core, test-solrj"/>
|
||||
<target name="pitest" description="Validate, then run core, solrj, and contrib unit tests."
|
||||
depends="pitest-core, pitest-contrib"/>
|
||||
<target name="compile-test" description="Compile unit tests."
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
</compile>
|
||||
</target>
|
||||
|
||||
<!-- redefine the clover setup, because we dont want to run clover for the test-framework -->
|
||||
<target name="-clover.setup" if="run.clover"/>
|
||||
|
||||
<!-- Override common-solr.javadocs to include JUnit links -->
|
||||
<!-- and to copy the built javadocs to ${dest}/docs/api/test-framework -->
|
||||
<target name="javadocs"
|
||||
|
|
Loading…
Reference in New Issue