mirror of https://github.com/apache/lucene.git
SOLR-2452: Put back Solr-specific clover properties & targets
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1144847 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c5636fac7d
commit
afda0fa29c
|
@ -172,6 +172,65 @@
|
|||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- Clover targets -->
|
||||
<target name="clover" depends="clover.setup, clover.info"
|
||||
description="Instrument the Unit tests using Clover. Requires a Clover license and clover.jar in the ANT classpath. To use, specify -Drun.clover=true on the command line."/>
|
||||
|
||||
<target name="clover.setup" if="clover.enabled">
|
||||
<taskdef resource="cloverlib.xml"/>
|
||||
<mkdir dir="${clover.db.dir}"/>
|
||||
<clover-setup initString="${clover.db.dir}/solr_coverage.db">
|
||||
<fileset dir="core/src/java"/>
|
||||
<fileset dir="solrj/src/java"/>
|
||||
<fileset dir="contrib/analysis-extras/src/java"/>
|
||||
<fileset dir="contrib/clustering/src/java"/>
|
||||
<fileset dir="contrib/dataimporthandler/src/java"/>
|
||||
<fileset dir="contrib/dataimporthandler-extras/src/java"/>
|
||||
<fileset dir="contrib/extraction/src/java"/>
|
||||
<fileset dir="contrib/uima/src/java"/>
|
||||
<testsources dir="test-framework/src/java"/>
|
||||
<testsources dir="core/src/test"/>
|
||||
<testsources dir="solrj/src/test"/>
|
||||
<testsources dir="contrib/analysis-extras/src/test" />
|
||||
<testsources dir="contrib/clustering/src/test" />
|
||||
<testsources dir="contrib/dataimporthandler/src/test" />
|
||||
<testsources dir="contrib/dataimporthandler-extras/src/test" />
|
||||
<testsources dir="contrib/extraction/src/test" />
|
||||
<testsources dir="contrib/uima/src/test" />
|
||||
</clover-setup>
|
||||
</target>
|
||||
|
||||
<target name="clover.info" unless="clover.present">
|
||||
<echo>
|
||||
Clover not found. Code coverage reports disabled.
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<target name="clover.check">
|
||||
<fail unless="clover.present">
|
||||
##################################################################
|
||||
Clover not found.
|
||||
Please make sure clover.jar is in ANT_HOME/lib, or made available
|
||||
to Ant using other mechanisms like -lib or CLASSPATH.
|
||||
##################################################################
|
||||
</fail>
|
||||
</target>
|
||||
|
||||
<!-- Run after Junit tests. -->
|
||||
<target name="generate-clover-reports" depends="clover.check, clover">
|
||||
<mkdir dir="${clover.report.dir}"/>
|
||||
<clover-report>
|
||||
<current outfile="${clover.report.dir}/clover.xml"
|
||||
title="${fullnamever}">
|
||||
<format type="xml"/>
|
||||
</current>
|
||||
<current outfile="${clover.report.dir}" title="${fullnamever}">
|
||||
<format type="html"/>
|
||||
</current>
|
||||
</clover-report>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<!-- ===================== DISTRIBUTION-RELATED TASKS ======================== -->
|
||||
<!-- ========================================================================= -->
|
||||
|
|
|
@ -48,6 +48,16 @@
|
|||
<property name="tests.threadspercpu" value="2"/>
|
||||
<property name="tests.cleanthreads.sysprop" value="perClass"/>
|
||||
|
||||
<property name="clover.db.dir" location="${dest}/tests/clover/db"/>
|
||||
<property name="clover.report.dir" location="${dest}/tests/clover/reports"/>
|
||||
<available property="clover.present" classname="com.cenqua.clover.tasks.CloverReportTask"/>
|
||||
<condition property="clover.enabled">
|
||||
<and>
|
||||
<isset property="run.clover"/>
|
||||
<isset property="clover.present"/>
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
<path id="additional.dependencies">
|
||||
<fileset dir="${common-solr.dir}/lib" includes="**/*.jar"/>
|
||||
<fileset dir="${common-solr.dir}/example/lib" includes="**/*.jar"/>
|
||||
|
|
Loading…
Reference in New Issue