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