You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2012/02/08 18:27:24 UTC
svn commit: r1241997 - in /lucene/dev/branches/branch_3x: ./ lucene/
lucene/build.xml lucene/common-build.xml lucene/test-framework/build.xml
lucene/tools/build.xml solr/
Author: sarowe
Date: Wed Feb 8 17:27:23 2012
New Revision: 1241997
URL: http://svn.apache.org/viewvc?rev=1241997&view=rev
Log:
LUCENE-3753: Clover fixes: Added non-clover-invoking compile-core target specializations to the lucene/test-framework and lucene/tools modules, since these classes have no tests, and lucene/test-framework sources are already included in every other module's clover instrumentation; and moved generate-clover-reports from lucene/common-build.xml to lucene/build.xml, since it doesn't need to be shared elsewhere.
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/build.xml
lucene/dev/branches/branch_3x/lucene/common-build.xml
lucene/dev/branches/branch_3x/lucene/test-framework/build.xml
lucene/dev/branches/branch_3x/lucene/tools/build.xml
lucene/dev/branches/branch_3x/solr/ (props changed)
Modified: lucene/dev/branches/branch_3x/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/build.xml?rev=1241997&r1=1241996&r2=1241997&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/build.xml Wed Feb 8 17:27:23 2012
@@ -148,6 +148,44 @@
<target name="compile-core" depends="compile-lucene-core"/>
+ <!--
+ Run after Junit tests.
+ -->
+ <target name="generate-clover-reports" depends="clover.check, clover">
+ <mkdir dir="${clover.report.dir}"/>
+ <!-- This extra path is needed, because from a top-level ant run, the contrib tests would be not visible (report generation is only done on top-level not via subants) -->
+ <fileset dir="contrib" id="clover.contrib.test.src.files">
+ <include name="**/test/**/*.java"/>
+ </fileset>
+ <fileset dir="${tests-framework.src.dir}" id="clover.test-framework.src.files">
+ <include name="**/*.java" />
+ </fileset>
+ <fileset dir="${tests.src.dir}" id="clover.test.src.files">
+ <include name="**/*.java" />
+ </fileset>
+ <fileset dir="${build.dir}" id="clover.test.result.files">
+ <include name="**/test/TEST-*.xml" />
+ <!-- do not include BW tests -->
+ <exclude name="backwards/**"/>
+ </fileset>
+ <clover-report>
+ <current outfile="${clover.report.dir}" title="${final.name}" numThreads="0">
+ <format type="html" filter="assert"/>
+ <testsources refid="clover.test.src.files"/>
+ <testsources refid="clover.test-framework.src.files"/>
+ <testsources refid="clover.contrib.test.src.files"/>
+ <testresults refid="clover.test.result.files"/>
+ </current>
+ <current outfile="${clover.report.dir}/clover.xml" title="${final.name}">
+ <format type="xml" filter="assert"/>
+ <testsources refid="clover.test.src.files"/>
+ <testsources refid="clover.test-framework.src.files"/>
+ <testsources refid="clover.contrib.test.src.files"/>
+ <testresults refid="clover.test.result.files"/>
+ </current>
+ </clover-report>
+ </target>
+
<!-- ================================================================== -->
<!-- D O C U M E N T A T I O N -->
<!-- ================================================================== -->
Modified: lucene/dev/branches/branch_3x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/common-build.xml?rev=1241997&r1=1241996&r2=1241997&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/common-build.xml Wed Feb 8 17:27:23 2012
@@ -673,43 +673,6 @@
##################################################################
</fail>
</target>
- <!--
- Run after Junit tests.
- -->
- <target name="generate-clover-reports" depends="clover.check, clover">
- <mkdir dir="${clover.report.dir}"/>
- <!-- This extra path is needed, because from a top-level ant run, the contrib tests would be not visible (report generation is only done on top-level not via subants) -->
- <fileset dir="contrib" id="clover.contrib.test.src.files">
- <include name="**/test/**/*.java"/>
- </fileset>
- <fileset dir="${tests-framework.src.dir}" id="clover.test-framework.src.files">
- <include name="**/*.java" />
- </fileset>
- <fileset dir="${tests.src.dir}" id="clover.test.src.files">
- <include name="**/*.java" />
- </fileset>
- <fileset dir="${build.dir}" id="clover.test.result.files">
- <include name="**/test/TEST-*.xml" />
- <!-- do not include BW tests -->
- <exclude name="backwards/**"/>
- </fileset>
- <clover-report>
- <current outfile="${clover.report.dir}" title="${final.name}" numThreads="0">
- <format type="html" filter="assert"/>
- <testsources refid="clover.test.src.files"/>
- <testsources refid="clover.test-framework.src.files"/>
- <testsources refid="clover.contrib.test.src.files"/>
- <testresults refid="clover.test.result.files"/>
- </current>
- <current outfile="${clover.report.dir}/clover.xml" title="${final.name}">
- <format type="xml" filter="assert"/>
- <testsources refid="clover.test.src.files"/>
- <testsources refid="clover.test-framework.src.files"/>
- <testsources refid="clover.contrib.test.src.files"/>
- <testresults refid="clover.test.result.files"/>
- </current>
- </clover-report>
- </target>
<target name="generate-test-reports" description="Generates test reports">
<mkdir dir="${junit.reports}"/>
Modified: lucene/dev/branches/branch_3x/lucene/test-framework/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/test-framework/build.xml?rev=1241997&r1=1241996&r2=1241997&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/test-framework/build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/test-framework/build.xml Wed Feb 8 17:27:23 2012
@@ -30,7 +30,20 @@
<path refid="ant-path"/>
</path>
- <target name="compile-core" depends="compile-lucene-core,common.compile-core" />
+ <!--
+ 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.
+ -->
+ <target name="compile-core" depends="init,compile-lucene-core"
+ 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="javadocs-core" depends="javadocs"/>
<target name="javadocs">
Modified: lucene/dev/branches/branch_3x/lucene/tools/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/tools/build.xml?rev=1241997&r1=1241996&r2=1241997&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/tools/build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/tools/build.xml Wed Feb 8 17:27:23 2012
@@ -24,7 +24,16 @@
<import file="../common-build.xml"/>
- <target name="javadocs"/> <!-- to make common-build.xml happy -->
-
<path id="classpath"/>
+
+ <!--
+ Specialize compile-core to not depend on clover, to exclude a
+ classpath reference when compiling, and to not attempt to copy
+ non-existent resource files to the build output directory.
+ -->
+ <target name="compile-core" depends="init" description="Compiles tools classes">
+ <compile srcdir="${src.dir}" destdir="${build.dir}/classes/java"/>
+ </target>
+
+ <target name="javadocs"/> <!-- to make common-build.xml happy -->
</project>