Set ANDROID_SDK_ROOT for android box tests

This commit is contained in:
Mikhael Bogdanov
2021-01-29 14:29:19 +01:00
parent 4a50dc9074
commit 3e1fabd46c
@@ -121,8 +121,11 @@ public class Emulator {
public void startEmulator() {
startServer();
System.out.println("Starting emulator...");
RunUtils.executeOnSeparateThread(new RunUtils.RunSettings(getStartCommand(), null, false, "START: ", true));
System.out.println("Starting emulator with ANDROID_HOME/ANDROID_SDK_ROOT: " + pathManager.getAndroidSdkRoot());
GeneralCommandLine startCommand = getStartCommand();
startCommand.withEnvironment("ANDROID_SDK_ROOT", pathManager.getAndroidSdkRoot());
startCommand.withEnvironment("ANDROID_HOME", pathManager.getAndroidSdkRoot());
RunUtils.executeOnSeparateThread(new RunUtils.RunSettings(startCommand, null, false, "START: ", true));
printLog();
}
@@ -144,9 +147,6 @@ public class Emulator {
bootCheckCommand.addParameter("shell");
bootCheckCommand.addParameter("getprop");
bootCheckCommand.addParameter("sys.boot_completed");
System.out.println("Setting ANDROID_HOME/ANDROID_SDK_ROOT:" + pathManager.getAndroidSdkRoot());
bootCheckCommand.withEnvironment("ANDROID_SDK_ROOT", pathManager.getAndroidSdkRoot());
bootCheckCommand.withEnvironment("ANDROID_HOME", pathManager.getAndroidSdkRoot());
int counter = 0;
RunResult execute = RunUtils.execute(bootCheckCommand);