diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index f4ffe13f5a2..eee39cb525d 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -133,6 +133,7 @@
+
@@ -546,6 +547,8 @@
+
+
diff --git a/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java b/lucene/src/test-framework/org/apache/lucene/util/LuceneJUnitResultFormatter.java
index 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()) {