diff options
author | Robby <robby@santoslab.org> | 2018-03-16 11:04:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-16 11:04:33 -0500 |
commit | 43d23037c7f0d659ff6ad5e78dc71cfd3ed083ec (patch) | |
tree | 3233c8e6270ed7552e35599e1e354887a0e41b45 | |
parent | 712f331d24d0934cd9c653a12be7e47e1fff1f5d (diff) | |
download | mill-43d23037c7f0d659ff6ad5e78dc71cfd3ed083ec.tar.gz mill-43d23037c7f0d659ff6ad5e78dc71cfd3ed083ec.tar.bz2 mill-43d23037c7f0d659ff6ad5e78dc71cfd3ed083ec.zip |
Test mill (client/server) non-interactive on Windows and set jna.nosys=true as default (#229)
* If unspecified, set the jna.nosys property to true on non-interactive (client/server) mode.
* Run publishLocal and release (interactive) on AppVeyor and use the resulting mill to test mill (non-interactive).
-rw-r--r-- | .appveyor.yml | 5 | ||||
-rw-r--r-- | clientserver/src/mill/clientserver/Client.java | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 73ca0542..4af291c0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -30,7 +30,8 @@ cache: install: - cmd: SET PATH=%JAVA_HOME%\bin;C:\bin;C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH% - cmd: java -version - - bash -lc "mkdir /c/bin && curl -Lo /c/bin/mill https://github.com/lihaoyi/mill/releases/download/0.1.6/0.1.6" + - bash -lc "mkdir /c/bin && curl -Lo /c/bin/mill https://github.com/lihaoyi/mill/releases/download/0.1.6/0.1.6-2-712f33" build_script: - - bash -lc "cd /c/mill && mill -i all main.test scalajslib.test" + - bash -lc "cd /c/mill && mill -i all __.publishLocal release" + - bash -lc "cd /c/mill && out/release/dest/mill all main.test scalajslib.test"
\ No newline at end of file diff --git a/clientserver/src/mill/clientserver/Client.java b/clientserver/src/mill/clientserver/Client.java index 248d3de1..eab8c5b5 100644 --- a/clientserver/src/mill/clientserver/Client.java +++ b/clientserver/src/mill/clientserver/Client.java @@ -15,8 +15,7 @@ import java.util.Iterator; import java.util.Properties; public class Client { - - static void initServer(String lockBase) throws IOException,URISyntaxException{ + static void initServer(String lockBase, boolean setJnaNoSys) throws IOException,URISyntaxException{ ArrayList<String> selfJars = new ArrayList<String>(); ClassLoader current = Client.class.getClassLoader(); while(current != null){ @@ -44,6 +43,9 @@ public class Client { String k = keys.next(); if (k.startsWith("MILL_")) l.add("-D" + k + "=" + props.getProperty(k)); } + if (setJnaNoSys) { + l.add("-Djna.nosys=true"); + } l.add("-cp"); l.add(String.join(File.pathSeparator, selfJars)); l.add("mill.ServerMain"); @@ -55,6 +57,10 @@ public class Client { .start(); } public static void main(String[] args) throws Exception{ + boolean setJnaNoSys = System.getProperty("jna.nosys") == null; + if (setJnaNoSys) { + System.setProperty("jna.nosys", "true"); + } int index = 0; while (index < 5) { index += 1; @@ -73,7 +79,7 @@ public class Client { @Override public void run() { try{ - initServer(lockBase); + initServer(lockBase, setJnaNoSys); }catch(Exception e){ throw new RuntimeException(e); } |