mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix running tests in macOS (#689)
Co-authored-by: Zufar Fakhurtdinov <zufar.fakhurtdinov@delightex.com>
This commit is contained in:
parent
928a8631a8
commit
e801ff5b10
|
@ -250,7 +250,9 @@ public class TeaVMTestRunner extends Runner implements Filterable {
|
|||
}
|
||||
|
||||
private void addChromeCommand(List<String> params) {
|
||||
if (isWindows()) {
|
||||
if (isMacos()) {
|
||||
params.add("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome");
|
||||
} else if (isWindows()) {
|
||||
params.add("cmd.exe");
|
||||
params.add("start");
|
||||
params.add("/C");
|
||||
|
@ -261,6 +263,10 @@ public class TeaVMTestRunner extends Runner implements Filterable {
|
|||
}
|
||||
|
||||
private void addFirefoxCommand(List<String> params) {
|
||||
if (isMacos()) {
|
||||
params.add("/Applications/Firefox.app/Contents/MacOS/firefox");
|
||||
return;
|
||||
}
|
||||
if (isWindows()) {
|
||||
params.add("cmd.exe");
|
||||
params.add("/C");
|
||||
|
@ -273,6 +279,10 @@ public class TeaVMTestRunner extends Runner implements Filterable {
|
|||
return System.getProperty("os.name").toLowerCase().startsWith("windows");
|
||||
}
|
||||
|
||||
private boolean isMacos() {
|
||||
return System.getProperty("os.name").toLowerCase().startsWith("mac");
|
||||
}
|
||||
|
||||
private Process browserTemplate(String name, String url, BiConsumer<String, List<String>> paramsBuilder) {
|
||||
File temp;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user