lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject lucene-solr:master: LUCENE-8169: Migrate build to use OpenClover 4.2.1 for checking code coverage
Date Sun, 11 Feb 2018 09:49:18 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 9e9ed0d7b -> 1922e5b95


LUCENE-8169: Migrate build to use OpenClover 4.2.1 for checking code coverage


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1922e5b9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1922e5b9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1922e5b9

Branch: refs/heads/master
Commit: 1922e5b956fa0257a46c4beac113b045bc3cf819
Parents: 9e9ed0d
Author: Uwe Schindler <uschindler@apache.org>
Authored: Sun Feb 11 10:49:01 2018 +0100
Committer: Uwe Schindler <uschindler@apache.org>
Committed: Sun Feb 11 10:49:01 2018 +0100

----------------------------------------------------------------------
 build.xml                                       |   2 +-
 lucene/CHANGES.txt                              |   3 +
 lucene/build.xml                                |   2 -
 lucene/common-build.xml                         |  33 ++----
 lucene/tools/clover/README.txt                  | 108 -------------------
 lucene/tools/clover/clover.license              |   5 -
 .../tools/src/groovy/patch-mrjar-classes.groovy |   5 +
 solr/build.xml                                  |   2 -
 8 files changed, 16 insertions(+), 144 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index b5d3015..0036052 100755
--- a/build.xml
+++ b/build.xml
@@ -491,7 +491,7 @@ File | Project Structure | Platform Settings | SDKs):
     <wc-checker failonmodifications="${is.jenkins.build}"/>
   </target>
 
-  <target name="run-clover" description="Runs all tests to measure coverage and generates
report (pass &quot;ANT_OPTS=-Xmx1536M&quot; as environment)" depends="clean">
+  <target name="run-clover" description="Runs all tests to measure coverage and generates
report (pass &quot;ANT_OPTS=-Xmx2G&quot; as environment)" depends="clean">
     <antcall inheritAll="false">
       <param name="run.clover" value="true"/>
       <!-- must be 1, as clover does not like parallel test runs: -->

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 4552a11..2ae89e5 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -189,6 +189,9 @@ Other
 * LUCENE-8155: Add back support in smoke tester to run against later Java versions.
   (Uwe Schindler)
 
+* LUCENE-8169: Migrated build to use OpenClover 4.2.1 for checking code coverage.
+  (Uwe Schindler)
+
 Build
 
 * LUCENE-8168: Moved Groovy scripts in build files to separate files.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/lucene/build.xml
----------------------------------------------------------------------
diff --git a/lucene/build.xml b/lucene/build.xml
index f2ce68d..0061d29 100644
--- a/lucene/build.xml
+++ b/lucene/build.xml
@@ -353,8 +353,6 @@
 
     <!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->
     <delete dir="${src.export.dir}/tools/javadoc/java8"/>
-    <!-- Exclude clover license files incompatible with the ASL -->
-    <delete dir="${src.export.dir}/tools/clover"/>
 
     <!-- because we only package the "lucene/" folder, we have to adjust dir to work on:
-->
     <property name="local.src.export.dir" location="${src.export.dir}/lucene"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/lucene/common-build.xml
----------------------------------------------------------------------
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 539d206..43a6aa1 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -139,11 +139,11 @@
     <istrue value="${tests.asserts}"/>
   </condition>
 
-  <condition property="tests.heapsize" value="768M" else="512M">
+  <condition property="tests.heapsize" value="1024M" else="512M">
     <isset property="run.clover"/>
   </condition>
   
-  <condition property="tests.clover.args" value="-XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=192m"
else="">
+  <condition property="tests.clover.args" value="-XX:ReservedCodeCacheSize=192m -XX:MaxPermSize=256m
-Dclover.pertest.coverage=off" else="">
     <isset property="run.clover"/>
   </condition>
 
@@ -234,7 +234,6 @@
 
   <property name="filtered.pom.templates.dir" location="${common.dir}/build/poms"/>
 
-  <property name="clover.license.path" location="${common.dir}/tools/clover/clover.license"/>
   <property name="clover.db.dir" location="${common.dir}/build/clover/db"/>
   <property name="clover.report.dir" location="${common.dir}/build/clover/reports"/>
 
@@ -266,7 +265,7 @@
   </propertyset>
 
   <patternset id="lucene.local.src.package.patterns"
-              excludes="**/pom.xml,**/*.iml,**/*.jar,build/**,dist/**,benchmark/work/**,benchmark/temp/**,tools/javadoc/java8/**,tools/clover/**"
+              excludes="**/pom.xml,**/*.iml,**/*.jar,build/**,dist/**,benchmark/work/**,benchmark/temp/**,tools/javadoc/java8/**"
   />
 
   <!-- Default exclude sources and javadoc jars from Ivy fetch to save time and bandwidth
-->
@@ -573,7 +572,7 @@
   </target>
   
   <target name="-mrjar-check" depends="patch-mrjar-classes">
-    <zipfileset id="mrjar-patched-files" prefix="META-INF/versions/9" dir="${build.dir}/classes/java9"/>
+    <zipfileset id="mrjar-patched-files" prefix="META-INF/versions/9" dir="${build.dir}/classes/java9"
erroronmissingdir="false"/>
     <condition property="has-mrjar-patched-files">
       <resourcecount refid="mrjar-patched-files" when="greater" count="0" />
     </condition>
@@ -1612,27 +1611,8 @@ ${tests-output}/junit4-*.suites     - per-JVM executed suites
   <target name="clover" depends="-clover.disable,-clover.load,-clover.classpath,-clover.setup"/>
   
   <target name="-clover.load" depends="ivy-availability-check,ivy-configure" if="run.clover"
unless="clover.loaded">
-    <available file="${clover.license.path}" property="clover.license.available" />
-    <fail unless="clover.license.available"><![CDATA[.
-
-  #########################################################################
-  Atlassian Clover License not found!
-  
-  Current License path: ${clover.license.path}
-
-  To use Atlassian Clover with Lucene build, you need a proper license
-  and let the system property 'clover.license.path' point to it.
-  You can pass it to ANT with:
-  
-  $ ant -Dclover.license.path=/path/to/clover.license -Drun.clover=true ...
-  
-  Apache Lucene/Solr source checkouts from Git already contain the
-  file, but source distributions cannot because of legal reasons.
-  #########################################################################
-  
-]]></fail>
-    <echo>Code coverage with Atlassian Clover enabled.</echo>
-    <ivy:cachepath organisation="com.atlassian.clover" module="clover" revision="4.0.4"
+    <echo>Code coverage with OpenClover enabled.</echo>
+    <ivy:cachepath organisation="org.openclover" module="clover" revision="4.2.1"
       inline="true" conf="master" pathid="clover.classpath"/>
     <taskdef resource="cloverlib.xml" classpathref="clover.classpath" />
     <mkdir dir="${clover.db.dir}"/>
@@ -1654,6 +1634,7 @@ ${tests-output}/junit4-*.suites     - per-JVM executed suites
       </fileset>
       <testsources dir="${tests.src.dir}" erroronmissingdir="no">
         <include name="org/apache/**/*.java" />
+        <exclude name="**/TestOpenNLP*Factory.java"/><!-- https://jira.atlassian.com/browse/CLOV-1984
-->
       </testsources>
     </clover-setup>
   </target>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/lucene/tools/clover/README.txt
----------------------------------------------------------------------
diff --git a/lucene/tools/clover/README.txt b/lucene/tools/clover/README.txt
deleted file mode 100644
index 62f1de9..0000000
--- a/lucene/tools/clover/README.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-################################################
-  DOCUMENTATION ABOUT ATLASSIAN CLOVER LICENSE
-################################################
-
-From: sales@atlassian.com [mailto:sales@atlassian.com] 
-Sent: Wednesday, September 25, 2013 5:09 PM
-To: uschindler@apache.org
-Cc: npellow@atlassian.com
-Subject: RE: Fwd: New Clover License for Apache - {844535}
-
-Hey Uwe,
-
-Thanks for getting back.
-I found the license using the key you provided - thanks for that! I've renewed the license
for another year and added you as a technical contact. 
-
-Cheers,
-Amber
-
-Clover 100+ Machines: Open Source License	Apache	 27 Jun 2014
-
-SEN:	 SEN-2304226 
-Technical Contact:	Mike Mccandless (mikemccand@apache.org), Uwe Schindler (uschindler@apache.org)
-Billing Contact:	Mike Mccandless (mikemccand@apache.org) 
-Licensed To:	 Apache
-
-History:	
-27 Jun 2012	 Purchase of Clover 100+ Machines: Open Source License	
-27 Jun 2013	 Maintenance Renewal	
- 
----------------------------------------------------------------------------------
-
-From: Nicholas Muldoon <nmuldoon@atlassian.com>
-To: Ted Yu <yuzhihong@gmail.com>
-Cc: Enis Soztutar <enis@hortonworks.com>, Todd Lipcon <todd@cloudera.com>
-Content-Type: multipart/alternative; boundary=047d7b10cff34cee0f04c376df70
-X-Gm-Message-State: ALoCoQmzowRKrtL3txnON+W+U2vn7gwwWSn/U5dvchuTV0Nn3xaMoAojvbPal5TBkC6foBnuHPWU
-
---047d7b10cff34cee0f04c376df70
-Content-Type: text/plain; charset=ISO-8859-1
-
-Hi Ted,
-
-Please find a renewed license below - Clover 3 compatible. Should you have
-any difficulty please let me know.
-
-[license]
-
-Thanks Ted, have a great day, thanks for your support,
-Nicholas
-
-
-On Fri, Dec 18, 2009 at 1:33 AM, Nicholas Muldoon <nmuldoon@atlassian.com> wrote:
----------------------------------------------------------------------------------
-
-Hi,
-Atlassian are excited to be presenting Apache with a site license for Clover
-2.6.
-
-This Clover license can be used for any code that is under an org.apache
-package. Further, this license can be used by any developer on their machine
-in conjunction with our Eclipse or IntelliJ plugins for development on an
-org.apache project.
-
-[license]
-
-
-On Sat, Dec 19, 2009 at 10:38 PM, Nick Pellow <npellow@atlassian.com> wrote:
----------------------------------------------------------------------------------
-Hi Mike,
-
-That would be great if you could forward this to committers@apache.org.
-The license is available to anyone working on the org.apache.* be it 
-in IDEA/Eclipse/Ant/Maven locally, or on a central build server.
-
-Since the license will only instrument and report coverage on 
-org.apache packages, please mention that it is fine to commit this 
-license to each project if it makes running builds easier. ie just 
-check out the project and run with Clover, without the need for the 
-extra step of locating and installing the clover license.
-
-Cheers,
-Nick
-
-> On 19/12/2009, at 1:11 AM, Michael McCandless wrote:
->
->> Woops, I meant "The only restriction is that it will only test 
->> coverage of packages under org.apache", below.
->>
->> Mike
->>
->> On Fri, Dec 18, 2009 at 9:05 AM, Michael McCandless 
->> <lucene@mikemccandless.com> wrote:
->>>
->>> Since this generous offer extends beyond Lucene...
->>>
->>> I'd like to forward this to committers@apache.org, pointing to where 
->>> the license is available
->>>
->>> (https://svn.apache.org/repos/private/committers/donated-licenses/cl
->>> over/2.6.x), explaining that Lucene upgraded (providing the link to 
->>> our coverage report), etc.
->>>
->>> But I wanted to confirm with you all first: is this OK?  This 
->>> license may be used by anyone?  The only restriction is that it will 
->>> only test coverage of packages under org.apache.lucene?
->>>
->>> I can draft something up and run it by you all first, if this makes 
->>> sense...

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/lucene/tools/clover/clover.license
----------------------------------------------------------------------
diff --git a/lucene/tools/clover/clover.license b/lucene/tools/clover/clover.license
deleted file mode 100644
index 1a46f87..0000000
--- a/lucene/tools/clover/clover.license
+++ /dev/null
@@ -1,5 +0,0 @@
-nRQNWtwTDKNQARUudFdtDsicMRPIUONPsMvQXbqMkHLoFB
-mi2Kv8XgEIr0AKkpEyRKsl2L2KSZDO6fk1Eio5G7RKZiUc
-OoroXsoPoMPqOQrNrPRTtnNpPOMmMOnnOoTsXVsTvXXvQp
-moNnmqmUUnqmptmqummmmmUUnqmptmqummmmmUU1mXZebU
-Unmmmm

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/lucene/tools/src/groovy/patch-mrjar-classes.groovy
----------------------------------------------------------------------
diff --git a/lucene/tools/src/groovy/patch-mrjar-classes.groovy b/lucene/tools/src/groovy/patch-mrjar-classes.groovy
index 07f285c..1ba6a98 100644
--- a/lucene/tools/src/groovy/patch-mrjar-classes.groovy
+++ b/lucene/tools/src/groovy/patch-mrjar-classes.groovy
@@ -32,6 +32,11 @@ def mappings = [
   'org/apache/lucene/util/FutureArrays': 'java/util/Arrays',
 ];
 
+if (properties['run.clover'] != null) {
+  task.log("Disabled class file remapping for Java 9, because Clover code coverage is enabled.",
Project.MSG_INFO);
+  return;
+}
+
 File inputDir = new File(properties['build.dir'], 'classes/java');
 File outputDir = new File(properties['build.dir'], 'classes/java9');
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1922e5b9/solr/build.xml
----------------------------------------------------------------------
diff --git a/solr/build.xml b/solr/build.xml
index 9b0bdab..400c711 100644
--- a/solr/build.xml
+++ b/solr/build.xml
@@ -488,8 +488,6 @@
 
     <!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->
     <delete dir="${src.export.dir}/lucene/tools/javadoc/java8"/>
-    <!-- Exclude clover license files incompatible with the ASL -->
-    <delete dir="${src.export.dir}/lucene/tools/clover"/>
 
     <build-changes changes.src.file="${src.export.dir}/solr/CHANGES.txt"
                    changes.target.dir="${src.export.dir}/solr/docs/changes"


Mime
View raw message