You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rj...@apache.org on 2014/09/05 04:14:09 UTC

svn commit: r1622595 - in /lucene/dev/branches/branch_4x: ./ dev-tools/ dev-tools/scripts/ lucene/ lucene/core/src/test/org/apache/lucene/index/

Author: rjernst
Date: Fri Sep  5 02:14:08 2014
New Revision: 1622595

URL: http://svn.apache.org/r1622595
Log:
LUCENE-5902: Add bumpVersion.py script (merged 1622546 from trunk)

Added:
    lucene/dev/branches/branch_4x/dev-tools/scripts/bumpVersion.py
      - copied unchanged from r1622546, lucene/dev/trunk/dev-tools/scripts/bumpVersion.py
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/CreateBackwardsCompatibilityIndex.java   (with props)
Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/dev-tools/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/common-build.xml   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java

Modified: lucene/dev/branches/branch_4x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/CHANGES.txt?rev=1622595&r1=1622594&r2=1622595&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/lucene/CHANGES.txt Fri Sep  5 02:14:08 2014
@@ -63,6 +63,8 @@ Build
 * LUCENE-5909: Smoke tester now has better command line parsing and
   optionally also runs on Java 8.  (Ryan Ernst, Uwe Schindler)
 
+* LUCENE-5902: Add bumpVersion.py script to manage version increase after release branch is cut.
+
 ======================= Lucene 4.10.0 ======================
 
 New Features

Modified: lucene/dev/branches/branch_4x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/common-build.xml?rev=1622595&r1=1622594&r2=1622595&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/common-build.xml Fri Sep  5 02:14:08 2014
@@ -889,6 +889,25 @@
         <property name="tests.iters" value="" />
         <property name="tests.dups"  value="1" />
 
+        <!-- turn on security manager? -->
+        <condition property="java.security.manager" value="org.apache.lucene.util.TestSecurityManager">
+          <or>
+            <not>
+              <isset property="tests.useSecurityManager"/>
+            </not>
+            <istrue value="${tests.useSecurityManager}"/>
+          </or>
+        </condition>
+
+        <loadresource property="tests.explicitclass">
+          <string value="${tests.class}" />
+          <filterchain>
+            <replaceregex pattern="\." replace="/" flags="g" />
+            <replaceregex pattern="\*" replace="**" flags="g" />
+            <replaceregex pattern="$" replace=".class" />
+          </filterchain>
+        </loadresource>
+
         <!-- Pick the random seed now (unless already set). -->
         <junit4:pickseed property="tests.seed" />
 
@@ -1008,7 +1027,9 @@
             <!-- Restrict access to certain Java features and install security manager: -->
             <sysproperty key="junit4.tempDir" file="@{workDir}/temp" />
             <sysproperty key="clover.db.dir" file="${clover.db.dir}" />
-            <sysproperty key="java.security.manager" value="org.apache.lucene.util.TestSecurityManager" />
+            <syspropertyset>
+                <propertyref prefix="java.security.manager"/>
+            </syspropertyset>
             <sysproperty key="java.security.policy" file="${common.dir}/tools/junit4/tests.policy" />
 
             <sysproperty key="tests.LUCENE_VERSION" value="${version.base}"/>
@@ -1140,6 +1161,7 @@
               <fileset dir="@{testsDir}">
                 <include name="**/Test*.class" />
                 <include name="**/*Test.class" />
+                <include name="${tests.explicitclass}" />
                 <exclude name="**/*$*" />
               </fileset>
             </junit4:duplicate>

Added: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/CreateBackwardsCompatibilityIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/CreateBackwardsCompatibilityIndex.java?rev=1622595&view=auto
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/CreateBackwardsCompatibilityIndex.java (added)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/CreateBackwardsCompatibilityIndex.java Fri Sep  5 02:14:08 2014
@@ -0,0 +1,59 @@
+package org.apache.lucene.index;
+
+/*
+ * 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 java.io.IOException;
+
+// This class exists only so it has a name that the junit runner will not pickup,
+// so these index creation "tests" can only be run explicitly
+public class CreateBackwardsCompatibilityIndex extends TestBackwardsCompatibility {
+
+  // These indexes will be created under directory /tmp/idx/.
+  //
+  // Be sure to create the indexes with the actual format:
+  //  ant test -Dtestcase=TestBackwardsCompatibility -Dversion=x.y.z -Dtests.codec=LuceneXY -Dtests.useSecurityManager=false
+  //
+  // Zip up the generated indexes:
+  //
+  //    cd /tmp/idx/index.cfs   ; zip index.<VERSION>.cfs.zip *
+  //    cd /tmp/idx/index.nocfs ; zip index.<VERSION>.nocfs.zip *
+  //
+  // Then move those 2 zip files to your trunk checkout and add them
+  // to the oldNames array.
+
+  public void testCreateCFS() throws IOException {
+    createIndex("index.cfs", true, false);
+  }
+
+  public void testCreateNonCFS() throws IOException {
+    createIndex("index.nocfs", false, false);
+  }
+
+  // These are only needed for the special upgrade test to verify
+  // that also single-segment indexes are correctly upgraded by IndexUpgrader.
+  // You don't need them to be build for non-4.0 (the test is happy with just one
+  // "old" segment format, version is unimportant:
+
+  public void testCreateSingleSegmentCFS() throws IOException {
+    createIndex("index.singlesegment.cfs", true, true);
+  }
+
+  public void testCreateSingleSegmentNoCFS() throws IOException {
+    createIndex("index.singlesegment.nocfs", false, true);
+  }
+}

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java?rev=1622595&r1=1622594&r2=1622595&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java Fri Sep  5 02:14:08 2014
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Random;
 
 import org.apache.lucene.analysis.MockAnalyzer;
+import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.document.BinaryDocValuesField;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.DoubleDocValuesField;
@@ -82,53 +83,6 @@ import org.junit.BeforeClass;
 @SuppressCodecs({"Lucene3x", "MockFixedIntBlock", "MockVariableIntBlock", "MockSep", "MockRandom", "Lucene40", "Lucene41", "Appending", "Lucene42", "Lucene45", "Lucene46", "Lucene49"})
 public class TestBackwardsCompatibility extends LuceneTestCase {
 
-  // Uncomment these cases & run them on an older Lucene version,
-  // to generate indexes to test backwards compatibility.  These
-  // indexes will be created under directory /tmp/idx/.
-  //
-  // However, you must first disable the Lucene TestSecurityManager,
-  // which will otherwise disallow writing outside of the build/
-  // directory - to do this, comment out the "java.security.manager"
-  // <sysproperty> under the "test-macro" <macrodef>.
-  //
-  // Be sure to create the indexes with the actual format:
-  //  ant test -Dtestcase=TestBackwardsCompatibility -Dversion=x.y.z
-  //      -Dtests.codec=LuceneXY -Dtests.postingsformat=LuceneXY -Dtests.docvaluesformat=LuceneXY
-  //
-  // Zip up the generated indexes:
-  //
-  //    cd /tmp/idx/index.cfs   ; zip index.<VERSION>.cfs.zip *
-  //    cd /tmp/idx/index.nocfs ; zip index.<VERSION>.nocfs.zip *
-  //
-  // Then move those 2 zip files to your trunk checkout and add them
-  // to the oldNames array.
-
-  /*
-  public void testCreateCFS() throws IOException {
-    createIndex("index.cfs", true, false);
-  }
-
-  public void testCreateNoCFS() throws IOException {
-    createIndex("index.nocfs", false, false);
-  }
-  */
-
-/*
-  // These are only needed for the special upgrade test to verify
-  // that also single-segment indexes are correctly upgraded by IndexUpgrader.
-  // You don't need them to be build for non-4.0 (the test is happy with just one
-  // "old" segment format, version is unimportant:
-  
-  public void testCreateSingleSegmentCFS() throws IOException {
-    createIndex("index.singlesegment.cfs", true, true);
-  }
-
-  public void testCreateSingleSegmentNoCFS() throws IOException {
-    createIndex("index.singlesegment.nocfs", false, true);
-  }
-
-*/  
-
   /*
   public void testCreateMoreTermsIndex() throws Exception {
     // we use a real directory name that is not cleaned up,