diff --git a/compiler/android-tests/src/org/jetbrains/jet/compiler/CodegenTestsOnAndroidRunner.java b/compiler/android-tests/src/org/jetbrains/jet/compiler/CodegenTestsOnAndroidRunner.java index ffb660c694a..b6effc86a55 100644 --- a/compiler/android-tests/src/org/jetbrains/jet/compiler/CodegenTestsOnAndroidRunner.java +++ b/compiler/android-tests/src/org/jetbrains/jet/compiler/CodegenTestsOnAndroidRunner.java @@ -16,6 +16,7 @@ package org.jetbrains.jet.compiler; +import com.intellij.util.PlatformUtils; import junit.framework.TestCase; import junit.framework.TestSuite; import org.jetbrains.annotations.NotNull; @@ -181,9 +182,11 @@ public class CodegenTestsOnAndroidRunner { PermissionManager.setPermissions(pathManager); - antRunner.packLibraries(); + String platformPrefixProperty = System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, "Idea"); try { + antRunner.packLibraries(); + emulator.createEmulator(); emulator.startEmulator(); @@ -207,6 +210,12 @@ public class CodegenTestsOnAndroidRunner { throw e; } finally { + if (platformPrefixProperty != null) { + System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, platformPrefixProperty); + } + else { + System.clearProperty(PlatformUtils.PLATFORM_PREFIX_KEY); + } emulator.finishEmulatorProcesses(); } }