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:14:58 UTC

svn commit: r1241986 - in /lucene/dev/trunk/lucene: build.xml common-build.xml test-framework/build.xml tools/build.xml

Author: sarowe
Date: Wed Feb  8 17:14:57 2012
New Revision: 1241986

URL: http://svn.apache.org/viewvc?rev=1241986&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/trunk/lucene/build.xml
    lucene/dev/trunk/lucene/common-build.xml
    lucene/dev/trunk/lucene/test-framework/build.xml
    lucene/dev/trunk/lucene/tools/build.xml

Modified: lucene/dev/trunk/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/build.xml?rev=1241986&r1=1241985&r2=1241986&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/build.xml (original)
+++ lucene/dev/trunk/lucene/build.xml Wed Feb  8 17:14:57 2012
@@ -143,6 +143,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/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1241986&r1=1241985&r2=1241986&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Wed Feb  8 17:14:57 2012
@@ -737,43 +737,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/trunk/lucene/test-framework/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/build.xml?rev=1241986&r1=1241985&r2=1241986&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/build.xml (original)
+++ lucene/dev/trunk/lucene/test-framework/build.xml Wed Feb  8 17:14:57 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/trunk/lucene/tools/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/tools/build.xml?rev=1241986&r1=1241985&r2=1241986&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/tools/build.xml (original)
+++ lucene/dev/trunk/lucene/tools/build.xml Wed Feb  8 17:14:57 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>