mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 07:54:11 -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) {
|
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("cmd.exe");
|
||||||
params.add("start");
|
params.add("start");
|
||||||
params.add("/C");
|
params.add("/C");
|
||||||
|
@ -261,6 +263,10 @@ public class TeaVMTestRunner extends Runner implements Filterable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addFirefoxCommand(List<String> params) {
|
private void addFirefoxCommand(List<String> params) {
|
||||||
|
if (isMacos()) {
|
||||||
|
params.add("/Applications/Firefox.app/Contents/MacOS/firefox");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isWindows()) {
|
if (isWindows()) {
|
||||||
params.add("cmd.exe");
|
params.add("cmd.exe");
|
||||||
params.add("/C");
|
params.add("/C");
|
||||||
|
@ -273,6 +279,10 @@ public class TeaVMTestRunner extends Runner implements Filterable {
|
||||||
return System.getProperty("os.name").toLowerCase().startsWith("windows");
|
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) {
|
private Process browserTemplate(String name, String url, BiConsumer<String, List<String>> paramsBuilder) {
|
||||||
File temp;
|
File temp;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user