lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r924207 - in /lucene/java/trunk: ./ backwards/ backwards/src/ contrib/analyzers/common/ contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/
Date Wed, 17 Mar 2010 10:24:07 GMT
Author: uschindler
Date: Wed Mar 17 10:24:07 2010
New Revision: 924207

URL: http://svn.apache.org/viewvc?rev=924207&view=rev
Log:
LUCENE-2326: Removed SVN checkouts for backwards tests. The backwards branch is now included
in the svn repository using "svn copy" after release.

Added:
    lucene/java/trunk/backwards/
    lucene/java/trunk/backwards/backwards-readme.txt   (with props)
    lucene/java/trunk/backwards/src/
      - copied from r923483, lucene/java/branches/lucene_3_0_back_compat_tests/src/
Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/build.xml
    lucene/java/trunk/common-build.xml
    lucene/java/trunk/contrib/analyzers/common/build.xml
    lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/
  (props changed)
    lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=924207&r1=924206&r2=924207&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Wed Mar 17 10:24:07 2010
@@ -238,9 +238,13 @@ Optimizations
 
 Build
 
- * LUCENE-2124: Moved the JDK-based collation support from contrib/collation 
-   into core, and moved the ICU-based collation support into contrib/icu.  
-   (Robert Muir)
+* LUCENE-2124: Moved the JDK-based collation support from contrib/collation 
+  into core, and moved the ICU-based collation support into contrib/icu.  
+  (Robert Muir)
+
+* LUCENE-2326: Removed SVN checkouts for backwards tests. The backwards branch
+  is now included in the svn repository using "svn copy" after release.
+  (Uwe Schindler)
 
 Test Cases
 

Added: lucene/java/trunk/backwards/backwards-readme.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/backwards/backwards-readme.txt?rev=924207&view=auto
==============================================================================
--- lucene/java/trunk/backwards/backwards-readme.txt (added)
+++ lucene/java/trunk/backwards/backwards-readme.txt Wed Mar 17 10:24:07 2010
@@ -0,0 +1,13 @@
+This folder contains the src/ folder of the previous Lucene major version.
+
+The test-backwards ANT task compiles the core classes of the previous version and its tests
+against these class files. After that the compiled test classes are run against the new
+lucene-core.jar file.
+
+After branching a new Lucene major version (branch name "lucene_X_Y") do the following:
+
+* svn rm backwards/src/
+* svn cp https://svn.apache.org/repos/asf/lucene/java/branches/lucene_X_Y/src/ backwards/src/
+* Check that everything is correct: The backwards folder should contain a src/ folder
+  that now contains java, test, demo,.... The files should be the ones from the branch.
+* Run "ant test-backwards"

Propchange: lucene/java/trunk/backwards/backwards-readme.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/java/trunk/backwards/backwards-readme.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?rev=924207&r1=924206&r2=924207&view=diff
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Wed Mar 17 10:24:07 2010
@@ -33,10 +33,6 @@
     <pathelement location="${build.dir}/classes/java"/>
   </path>
 
-  <path id="backwards.classpath">
-    <pathelement location="${build.dir}/${backwards.branch}/classes/java"/>
-  </path>
-
   <path id="demo.classpath">
     <path refid="classpath"/>
     <pathelement location="${build.dir}/classes/demo"/>
@@ -58,7 +54,7 @@
 
   <patternset id="src.dist.patterns"
               includes="src/,build.xml,*build*.xml,docs/,*.txt,contrib/,*pom.xml*,lib/"
-              excludes="contrib/db/*/lib/,contrib/*/ext-libs/,src/site/build/,contrib/benchmark/temp/**,contrib/benchmark/work/**"
+              excludes="contrib/db/*/lib/,contrib/*/ext-libs/,src/site/build/,contrib/benchmark/temp/,contrib/benchmark/work/,contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/data/"
   />
   <patternset id="binary.build.dist.patterns"
               includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/,contrib/*/*.jar,contrib/*/*.war,
contrib/*/*/*.jar"
@@ -79,91 +75,58 @@
   <target name="test" depends="test-core, test-contrib, test-backwards"
           description="Runs all unit tests (core, contrib and back-compat)"
   />
+
+  <path id="backwards.compile.classpath">
+    <pathelement location="${build.dir.backwards}/classes/java"/>
+  </path>
 	
-  <path id="backwards.test.classpath">
+  <path id="backwards.test.compile.classpath">
     <path refid="junit-path"/>
-    <pathelement location="${build.dir}/${backwards.branch}/${backwards.branch}.jar"/>
+    <pathelement location="${build.dir.backwards}/classes/java"/>
   </path>
 	
   <path id="backwards.junit.classpath">
     <path refid="junit-path"/>
-    <pathelement location="${build.dir}/${backwards.branch}/classes/test"/>
+    <pathelement location="${build.dir.backwards}/classes/test"/>
     <pathelement location="${build.dir}/${final.name}.jar"/>
     <pathelement path="${java.class.path}"/>
   </path>
 
-  <available property="backwards.available" file="${backwards.dir}/${backwards.branch}/src"/>
+  <available property="backwards.available" file="${backwards.dir}/src"/>
   
-  <target name="init-backwards-checkout" unless="backwards.available" description="Creates
the sparse svn checkout for backwards branch.">
-    <sequential>
-      <echo>Initial SVN checkout for '${backwards.branch}'...</echo>
-      <mkdir dir="${backwards.dir}"/>
-      <exec dir="${backwards.dir}" executable="${svn.exe}" failifexecutionfails="false"
failonerror="true">
-        <arg line="checkout --trust-server-cert --non-interactive -r ${backwards.rev}
--depth empty https://svn.apache.org/repos/asf/lucene/java/branches/${backwards.branch} ${backwards.branch}"/>
-      </exec>
-      <exec dir="${backwards.dir}" executable="${svn.exe}" failifexecutionfails="false"
failonerror="true">
-        <arg line="update --trust-server-cert --non-interactive -r ${backwards.rev} --set-depth
infinity ${backwards.branch}/src"/>
-      </exec>
-    </sequential>
+  <!-- remove this -->
+  <target name="test-tag" depends="test-backwards" description="deprecated"/>
+  
+  <target name="test-backwards-message" unless="backwards.available">
+<echo level="warning">WARNING: Backwards compatibility tests can only be run from SVN
checkout.
+The source distribution does not contain sources of the previous Lucene Java version.</echo>
   </target>
 
-  <target name="download-backwards" depends="init-backwards-checkout" description="Downloads
a previous Lucene version.">
+  <target name="test-backwards" depends="compile-core, jar-core, test-backwards-message"
+  	description="Runs tests of a previous Lucene version." if="backwards.available">
     <sequential>
-      <echo>Update backwards branch '${backwards.branch}' to revision ${backwards.rev}...</echo>
-      <exec dir="${backwards.dir}" executable="${svn.exe}" failifexecutionfails="false"
failonerror="true">
-        <arg line="update --trust-server-cert --non-interactive -r ${backwards.rev} ${backwards.branch}"/>
-      </exec>
-    </sequential>
-  </target>
-	
-  <!-- remove this -->
-  <target name="test-tag" depends="test-backwards" description="deprecated"/>
+      <mkdir dir="${build.dir.backwards}"/>	  
 
-  <target name="test-backwards" depends="download-backwards, compile-core, jar-core"
-  	description="Runs tests of a previous Lucene version.">
-	<sequential>
-    <available property="backwards.tests.available" file="${backwards.dir}/${backwards.branch}/src/test"
/>
-
-	  <fail unless="backwards.tests.available">
-	  	Backwards branch '${backwards.branch}' could not be found in directory '${backwards.dir}'.
-	  </fail>
-	  <mkdir dir="${build.dir}/${backwards.branch}"/>	  
-
-	  <!-- first compile branch classes -->
-	  <compile
-	    srcdir="${backwards.dir}/${backwards.branch}/src/java"
-	    destdir="${build.dir}/${backwards.branch}/classes/java"
-      javac.source="${javac.source.backwards}" javac.target="${javac.target.backwards}">
-	  <classpath refid="backwards.classpath"/>
-	  </compile>
-
-	  <!-- compile jar for branch -->
-      <jarify basedir="${build.dir}/${backwards.branch}/classes/java"
-			  destfile="${build.dir}/${backwards.branch}/${backwards.branch}.jar" />
-		  	
-	  <!-- compile branch tests against branch jar -->	
-	  <compile-test-macro srcdir="${backwards.dir}/${backwards.branch}/src/test" destdir="${build.dir}/${backwards.branch}/classes/test"
-			  			  test.classpath="backwards.test.classpath" javac.source="${javac.source.backwards}"
javac.target="${javac.target.backwards}"/>
-		
-	  <!-- run branch tests against trunk jar -->
-      <test-macro dataDir="${backwards.dir}/${backwards.branch}/src/test" 
-      			  tempDir="${build.dir}/${backwards.branch}"
-      			  junit.classpath="backwards.junit.classpath"
+      <!-- first compile branch classes -->
+      <compile
+        srcdir="${backwards.dir}/src/java"
+        destdir="${build.dir.backwards}/classes/java"
+        javac.source="${javac.source.backwards}" javac.target="${javac.target.backwards}"
+      >
+        <classpath refid="backwards.compile.classpath"/>
+      </compile>
+          
+      <!-- compile branch tests against branch classpath -->	
+      <compile-test-macro srcdir="${backwards.dir}/src/test" destdir="${build.dir.backwards}/classes/test"
+                  test.classpath="backwards.test.compile.classpath" javac.source="${javac.source.backwards}"
javac.target="${javac.target.backwards}"/>
+      
+      <!-- run branch tests against trunk jar -->
+      <test-macro dataDir="${backwards.dir}/src/test" 
+              tempDir="${build.dir.backwards}/test"
+              junit.classpath="backwards.junit.classpath"
               junit.output.dir="${junit.output.dir.backwards}" />
-  	</sequential>
+    </sequential>
   </target>	
-
-	
-  <!-- remove this soon -->
-  <target name="clean-tags"
-    description="deprecated: removes the old 'tag' subdir">
-    <delete dir="${common.dir}/tags"/>
-  </target>
-
-  <target name="clean-backwards"
-    description="Removes contents of the '${backwards.dir}' directory">
-    <delete dir="${backwards.dir}"/>
-  </target>
 	
   <!-- ================================================================== -->
   <!-- J A R                                                              -->

Modified: lucene/java/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/common-build.xml?rev=924207&r1=924206&r2=924207&view=diff
==============================================================================
--- lucene/java/trunk/common-build.xml (original)
+++ lucene/java/trunk/common-build.xml Wed Mar 17 10:24:07 2010
@@ -42,8 +42,6 @@
   <property name="Name" value="Lucene"/>
   <property name="dev.version" value="3.1-dev"/>
   <property name="version" value="${dev.version}"/>
-  <property name="backwards.branch" value="lucene_3_0_back_compat_tests"/>
-  <property name="backwards.rev" value="922601"/>
   <property name="spec.version" value="${version}"/>	
   <property name="year" value="2000-${current.year}"/>
   <property name="final.name" value="lucene-${name}-${version}"/>
@@ -86,7 +84,6 @@
 
   <property name="src.dir" location="src/java"/>
   <property name="build.dir" location="build"/>
-  <property name="backwards.dir" location="backwards"/>
   <property name="dist.dir" location="dist"/>
   <property name="maven.dist.dir" location="dist/maven"/>
   <property name="m2.repository.url" value="file://${maven.dist.dir}"/>
@@ -95,10 +92,13 @@
   <property name="javacc.home" location="${common.dir}"/>
   <property name="jflex.home" location="${common.dir}"/>
 
+  <property name="backwards.dir" location="backwards"/>
+  <property name="build.dir.backwards" location="${build.dir}/backwards"/>
+
   <property name="junit.output.dir" location="${build.dir}/test"/>
-  <property name="junit.output.dir.backwards" location="${build.dir}/bw-test"/>
+  <property name="junit.output.dir.backwards" location="${build.dir.backwards}/test"/>
   <property name="junit.reports" location="${build.dir}/test/reports"/>
-  <property name="junit.reports.backwards" location="${build.dir}/bw-test/reports"/>
+  <property name="junit.reports.backwards" location="${build.dir.backwards}/test/reports"/>
   <property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
   <property name="junit.excludes" value=""/>
 
@@ -547,8 +547,8 @@
       <!-- 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 dir="${build.dir.backwards}">
+        <include name="**/test/TEST-*.xml"/>
       </fileset>
       <report format="frames" todir="${junit.reports.backwards}"/>
     </junitreport>

Modified: lucene/java/trunk/contrib/analyzers/common/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/build.xml?rev=924207&r1=924206&r2=924207&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/build.xml (original)
+++ lucene/java/trunk/contrib/analyzers/common/build.xml Wed Mar 17 10:24:07 2010
@@ -35,20 +35,4 @@
     <path refid="junit-path"/>
     <pathelement location="${build.dir}/classes/java"/>
   </path>	
-
-  <target name="compile-test" depends="download-snowball-vocab-tests, common.compile-test"
/>
-  <property name="snowball.vocab.rev" value="500"/>
-  <property name="snowball.vocab.url" 
-            value="svn://svn.tartarus.org/snowball/trunk/data"/>
-  <property name="snowball.vocab.dir" value="src/test/org/apache/lucene/analysis/snowball"/>
-		
-  <target name="download-snowball-vocab-tests" depends="compile-core"
-	      description="Downloads Snowball vocabulary tests">
-	<sequential>
-	  <mkdir dir="${snowball.vocab.dir}"/>
-	    <exec dir="${snowball.vocab.dir}" executable="${svn.exe}" failifexecutionfails="false"
failonerror="true">
-	      <arg line="checkout --trust-server-cert --non-interactive -r ${snowball.vocab.rev}
${snowball.vocab.url}"/>
-	    </exec>
-	</sequential>
-  </target>
 </project>

Propchange: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Wed Mar 17 10:24:07 2010
@@ -0,0 +1 @@
+data -r500 svn://svn.tartarus.org/snowball/trunk/data

Propchange: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/
            ('svn:ignore' removed)

Modified: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java?rev=924207&r1=924206&r2=924207&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java
(original)
+++ lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/snowball/TestSnowballVocab.java
Wed Mar 17 10:24:07 2010
@@ -44,7 +44,7 @@ public class TestSnowballVocab extends B
       dataRoot = getDataFile("data");
     } catch (IOException ioe) {
       dataRoot = null;
-      System.err.println("WARN: This test was disabled, as the svn checkout of snowball test
files is not supported on your system!");
+      System.err.println("WARN: This test was disabled, as the snowball test files are not
available!");
     }
   }
   



Mime
View raw message