Apache Solr open-source search software
LUCENE-3452: add tests.lockdir (default in build.xml is build/, falls back to java.io.tmpdir)
Robert Muir19768f6e5a57
diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex f4ffe13f5a2..eee39cb525d 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -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 -->diff --git a/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java b/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.javaindex a03f780dafc..c67b9bc4c66 100644--- a/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java+++ b/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java@@ -66,7 +66,8 @@ public class LuceneJUnitResultFormatter implements JUnitResultFormatter {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()) {