Fix Android tests
This commit is contained in:
+10
-1
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.jet.compiler;
|
package org.jetbrains.jet.compiler;
|
||||||
|
|
||||||
|
import com.intellij.util.PlatformUtils;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -181,9 +182,11 @@ public class CodegenTestsOnAndroidRunner {
|
|||||||
|
|
||||||
PermissionManager.setPermissions(pathManager);
|
PermissionManager.setPermissions(pathManager);
|
||||||
|
|
||||||
antRunner.packLibraries();
|
String platformPrefixProperty = System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, "Idea");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
antRunner.packLibraries();
|
||||||
|
|
||||||
emulator.createEmulator();
|
emulator.createEmulator();
|
||||||
emulator.startEmulator();
|
emulator.startEmulator();
|
||||||
|
|
||||||
@@ -207,6 +210,12 @@ public class CodegenTestsOnAndroidRunner {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
if (platformPrefixProperty != null) {
|
||||||
|
System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, platformPrefixProperty);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
System.clearProperty(PlatformUtils.PLATFORM_PREFIX_KEY);
|
||||||
|
}
|
||||||
emulator.finishEmulatorProcesses();
|
emulator.finishEmulatorProcesses();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user