From 98a5a8137826c73a72fef1d198c775d72310176f Mon Sep 17 00:00:00 2001 From: markrmiller Date: Mon, 23 Jan 2017 00:22:39 -0500 Subject: [PATCH] SOLR-10024: If you use ExternalPaths#determineSourceHome with a custom tests.workDir, tests may not find the path. --- lucene/common-build.xml | 2 ++ .../src/java/org/apache/solr/util/ExternalPaths.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 44d7353815a..c1713865a30 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -1060,6 +1060,8 @@ + + diff --git a/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java b/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java index 3e91d8122a0..e5a83efc4aa 100644 --- a/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java +++ b/solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java @@ -63,7 +63,7 @@ public class ExternalPaths { } } catch (Exception e) { // If there is no "solr/conf" in the classpath, fall back to searching from the current directory. - file = new File("."); + file = new File(System.getProperty("tests.src.home", ".")); } File base = file.getAbsoluteFile(); while (!(new File(base, "solr/CHANGES.txt").exists()) && null != base) {