Update android test dependency to android 4.4.2 cause of missed test result problem on 4.1.2

This commit is contained in:
Mikhael Bogdanov
2016-05-02 15:03:15 +03:00
parent 249d08a66e
commit 09509b6d18
4 changed files with 13 additions and 18 deletions
@@ -18,13 +18,13 @@ repositories {
}
android {
compileSdkVersion 16
compileSdkVersion 19
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "org.jetbrains.kotlin.android.tests"
minSdkVersion 16
targetSdkVersion 16
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "1.0"
testApplicationId "org.jetbrains.kotlin.android.tests.gradle"
@@ -42,7 +42,7 @@ public class SDKDownloader {
private static final String PLATFORM_TOOLS = "23.0.1";
private static final String SDK_TOOLS = "25.1.1";
public static final String BUILD_TOOLS = "23.0.3";
private static final int ANDROID_VERSION = 16;
private static final int ANDROID_VERSION = 19;
public SDKDownloader(PathManager pathManager) {
@@ -57,12 +57,12 @@ public class SDKDownloader {
}
public void downloadPlatform() {
download("https://dl-ssl.google.com/android/repository/android-" + ANDROID_VERSION + "_r05.zip", platformZipPath); //Same for all platforms
download("https://dl-ssl.google.com/android/repository/android-" + ANDROID_VERSION + "_r04.zip", platformZipPath); //Same for all platforms
}
private void downloadAbi() {
download("https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-" + ANDROID_VERSION + "_r04.zip", armImage); //Same for all platforms
download("https://dl.google.com/android/repository/sys-img/android/sysimg_x86-" + ANDROID_VERSION + "_r02.zip", x86Image); //Same for all platforms
download("https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-" + ANDROID_VERSION + "_r03.zip", armImage); //Same for all platforms
download("https://dl.google.com/android/repository/sys-img/android/sysimg_x86-" + ANDROID_VERSION + "_r03.zip", x86Image); //Same for all platforms
}
public void downloadPlatformTools() {
@@ -111,7 +111,7 @@ public class SDKDownloader {
public void unzipAll() {
String androidSdkRoot = pathManager.getAndroidSdkRoot();
unzip(platformZipPath, pathManager.getPlatformFolderInAndroidSdk());
new File(pathManager.getPlatformFolderInAndroidSdk() + "/android-4.1.2").renameTo(new File(pathManager.getPlatformFolderInAndroidSdk() + "/android-16"));
new File(pathManager.getPlatformFolderInAndroidSdk() + "/android-4.4.2").renameTo(new File(pathManager.getPlatformFolderInAndroidSdk() + "/android-" + ANDROID_VERSION));
unzip(armImage, androidSdkRoot + "/system-images/android-" + ANDROID_VERSION + "/default/");
unzip(x86Image, androidSdkRoot + "/system-images/android-" + ANDROID_VERSION + "/default/");
@@ -131,8 +131,7 @@ public class Emulator {
startServer();
System.out.println("Starting emulator...");
RunUtils.executeOnSeparateThread(new RunUtils.RunSettings(getStartCommand(), null, false, "START: ", true));
//disabled cause of missed test results
//printLog();
printLog();
}
public void printLog() {
@@ -140,7 +139,9 @@ public class Emulator {
commandLine.addParameter("logcat");
commandLine.addParameter("-v");
commandLine.addParameter("time");
commandLine.addParameter("*:I");
commandLine.addParameter("-s");
commandLine.addParameter("dalvikvm:W");
commandLine.addParameter("TestRunner:I");
RunUtils.executeOnSeparateThread(new RunUtils.RunSettings(commandLine, null, false, "LOGCAT: ", true));
}
@@ -174,13 +175,6 @@ public class Emulator {
public void stopEmulator() {
System.out.println("Stopping emulator...");
try {
//added cause of missed test results
Thread.sleep(40000);
}
catch (InterruptedException e) {
e.printStackTrace();
}
GeneralCommandLine command = createAdbCommand();
command.addParameter("-s");
@@ -31,6 +31,7 @@ public class PermissionManager {
if (!SystemInfo.isWindows) {
RunUtils.execute(generateChmodCmd(pathManager.getAntBinDirectory() + "/ant"));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getToolsFolderInAndroidSdk()));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getToolsFolderInAndroidSdk() + "/bin64"));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getBuildToolsFolderInAndroidSdk() + "/" + SDKDownloader.BUILD_TOOLS));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getPlatformToolsFolderInAndroidSdk()));
RunUtils.execute(generateChmodCmd(pathManager.getGradleBinFolder() + "/gradle"));