mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +03:00
MacOS tests fix: new way of discovering work dir conflicts with tests execution. Fixed.
This commit is contained in:
@ -103,6 +103,7 @@
|
|||||||
|
|
||||||
<junit printsummary="yes" dir="${work.dir}" fork="true">
|
<junit printsummary="yes" dir="${work.dir}" fork="true">
|
||||||
<jvmarg value="-Djava.library.path=${java.additional.library.path}"/>
|
<jvmarg value="-Djava.library.path=${java.additional.library.path}"/>
|
||||||
|
<jvmarg value="-DWORK_DIR=."/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="bin"/>
|
<pathelement location="bin"/>
|
||||||
<pathelement location="test-bin"/>
|
<pathelement location="test-bin"/>
|
||||||
|
@ -168,10 +168,14 @@ public class BaseNoGui {
|
|||||||
File path = new File(System.getProperty("user.dir"));
|
File path = new File(System.getProperty("user.dir"));
|
||||||
|
|
||||||
if (OSUtils.isMacOS()) {
|
if (OSUtils.isMacOS()) {
|
||||||
try {
|
if (System.getProperty("WORK_DIR") != null) {
|
||||||
path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();
|
path = new File(System.getProperty("WORK_DIR"));
|
||||||
} catch (URISyntaxException e) {
|
} else {
|
||||||
throw new RuntimeException(e);
|
try {
|
||||||
|
path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();
|
||||||
|
} catch (URISyntaxException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user