SOLR-10024: If you use ExternalPaths#determineSourceHome with a custom tests.workDir, tests may not find the path.

This commit is contained in:
markrmiller 2017-01-23 00:22:39 -05:00
parent 72eaeab715
commit 98a5a81378
2 changed files with 3 additions and 1 deletions

View File

@ -1060,6 +1060,8 @@
<!-- turn jenkins blood red for hashmap bugs, even on jdk7 -->
<sysproperty key="jdk.map.althashing.threshold" value="0"/>
<sysproperty key="tests.src.home" value="${user.dir}" />
<!-- Only pass these to the test JVMs if defined in ANT. -->
<syspropertyset>
<propertyref prefix="tests.maxfailures" />

View File

@ -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) {