lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r891897 - in /lucene/java/trunk: build.xml common-build.xml src/test/org/apache/lucene/TestAssertions.java
Date Thu, 17 Dec 2009 21:00:00 GMT
Author: uschindler
Date: Thu Dec 17 21:00:00 2009
New Revision: 891897

URL: http://svn.apache.org/viewvc?rev=891897&view=rev
Log:
LUCENE-1769: Improve clover analysis and separate core / bw tests. Also verify that assertions
are enabled.

Added:
    lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java   (with props)
Modified:
    lucene/java/trunk/build.xml
    lucene/java/trunk/common-build.xml

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?rev=891897&r1=891896&r2=891897&view=diff
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Thu Dec 17 21:00:00 2009
@@ -134,7 +134,8 @@
 	  <!-- run tag tests against trunk jar -->
       <test-macro dataDir="${tags.dir}/${tag}/src/test" 
       			  tempDir="${build.dir}/${tag}"
-      			  junit.classpath="tag.junit.classpath"/>
+      			  junit.classpath="tag.junit.classpath"
+              junit.output.dir="${junit.output.dir.tag}" />
   	</sequential>
   </target>	
 

Modified: lucene/java/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/common-build.xml?rev=891897&r1=891896&r2=891897&view=diff
==============================================================================
--- lucene/java/trunk/common-build.xml (original)
+++ lucene/java/trunk/common-build.xml Thu Dec 17 21:00:00 2009
@@ -95,7 +95,9 @@
   <property name="jflex.home" location="${common.dir}"/>
 
   <property name="junit.output.dir" location="${build.dir}/test"/>
+  <property name="junit.output.dir.tag" location="${build.dir}/bw-test"/>
   <property name="junit.reports" location="${build.dir}/test/reports"/>
+  <property name="junit.reports.tag" location="${build.dir}/bw-test/reports"/>
   <property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
   <property name="junit.excludes" value=""/>
 
@@ -507,16 +509,22 @@
     <fileset dir="src/test" 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 -->
+    </fileset>
     <clover-report>
        <current outfile="${clover.report.dir}" title="${final.name}">
           <format type="html"/>
           <testsources refid="clover.test.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"/>
           <testsources refid="clover.test.src.files"/>
           <testsources refid="clover.contrib.test.src.files"/>
+          <testresults refid="clover.test.result.files"/>
        </current>
     </clover-report>
   </target>
@@ -532,6 +540,17 @@
       </fileset>
       <report format="frames" todir="${junit.reports}"/>
     </junitreport>
+    
+    <mkdir dir="${junit.reports.tag}"/>
+    <junitreport todir="${junit.output.dir.tag}">
+      <!-- this fileset let's the task work for individual contribs,
+           as well as the project as a whole
+       -->
+      <fileset dir="${build.dir}">
+        <include name="**/bw-test/TEST-*.xml"/>
+      </fileset>
+      <report format="frames" todir="${junit.reports.tag}"/>
+    </junitreport>
   </target>
 
   <target name="jar" depends="jar-core">

Added: lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java?rev=891897&view=auto
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java (added)
+++ lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java Thu Dec 17 21:00:00 2009
@@ -0,0 +1,32 @@
+package org.apache.lucene;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestAssertions extends LuceneTestCase {
+
+  public void test() {
+    try {
+      assert Boolean.FALSE.booleanValue();
+      fail("assertions are not enabled!");
+    } catch (AssertionError e) {
+    }
+  }
+
+}

Propchange: lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/java/trunk/src/test/org/apache/lucene/TestAssertions.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL



Mime
View raw message