Set ANDROID_HOME/ANDROID_SDK_ROOT for android box tests

In some cases emulator execution on TC fails cause of problem with pathes
This commit is contained in:
Mikhael Bogdanov
2021-01-29 07:47:08 +01:00
parent fd29fab971
commit 9459f8113f
@@ -144,6 +144,10 @@ public class Emulator {
bootCheckCommand.addParameter("shell"); bootCheckCommand.addParameter("shell");
bootCheckCommand.addParameter("getprop"); bootCheckCommand.addParameter("getprop");
bootCheckCommand.addParameter("sys.boot_completed"); 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; int counter = 0;
RunResult execute = RunUtils.execute(bootCheckCommand); RunResult execute = RunUtils.execute(bootCheckCommand);
while (counter < 20) { while (counter < 20) {