You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/10/26 01:52:11 UTC

svn commit: r1188975 - in /lucene/dev/trunk/lucene: common-build.xml src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java

Author: rmuir
Date: Tue Oct 25 23:52:10 2011
New Revision: 1188975

URL: http://svn.apache.org/viewvc?rev=1188975&view=rev
Log:
LUCENE-3452: add tests.lockdir (default in build.xml is build/, falls back to java.io.tmpdir)

Modified:
    lucene/dev/trunk/lucene/common-build.xml
    lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java

Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1188975&r1=1188974&r2=1188975&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Tue Oct 25 23:52:10 2011
@@ -133,6 +133,7 @@
   <property name="build.dir" location="build"/>
   <!-- Needed in case a contrib needs the original build, also for compile-tools to be called from contrib -->
   <property name="common.build.dir" location="${common.dir}/build"/>
+  <property name="tests.lockdir" location="${common.build.dir}"/>
   <property name="dist.dir" location="dist"/>
   <property name="maven.dist.dir" location="dist/maven"/>
   <property name="m2.repository.url" value="file://${maven.dist.dir}"/>
@@ -546,6 +547,8 @@
 	
 	      <!-- allow tests to control debug prints -->
 	      <sysproperty key="tests.verbose" value="${tests.verbose}"/>
+              <!-- directory for formatter lock -->
+	      <sysproperty key="tests.lockdir" value="${tests.lockdir}"/>
               <!-- set the codec tests should run with -->
 	      <sysproperty key="tests.codec" value="${tests.codec}"/>
               <!-- set the codec provider tests should run with -->

Modified: lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java?rev=1188975&r1=1188974&r2=1188975&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java (original)
+++ lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java Tue Oct 25 23:52:10 2011
@@ -66,7 +66,8 @@ public class LuceneJUnitResultFormatter 
   private static final org.apache.lucene.store.Lock lock;
 
   static {
-    File lockDir = new File(System.getProperty("java.io.tmpdir"),
+    File lockDir = new File(
+        System.getProperty("tests.lockdir", System.getProperty("java.io.tmpdir")),
         "lucene_junit_lock");
     lockDir.mkdirs();
     if (!lockDir.exists()) {