我在運行Android 2.2的模擬器上運行Android CTS Android測試計劃。Android CTS在模擬器上顯示ShellCommandUnresponsiveException
但大多數測試用例顯示超時,錯誤顯示com.android.ddmlib.ShellCommandUnresponsiveException。
有什麼辦法可以解決這個問題嗎?
我在運行Android 2.2的模擬器上運行Android CTS Android測試計劃。Android CTS在模擬器上顯示ShellCommandUnresponsiveException
但大多數測試用例顯示超時,錯誤顯示com.android.ddmlib.ShellCommandUnresponsiveException。
有什麼辦法可以解決這個問題嗎?
設置shell命令超時5分鐘(而不是5秒:-))更
diff --git a/tools/host/src/com/android/cts/TestDevice.java b/tools/host/src/com/android/cts/TestDevice.java
index 65ff969..b8578bc 100644
--- a/tools/host/src/com/android/cts/TestDevice.java
+++ b/tools/host/src/com/android/cts/TestDevice.java
@@ -18,6 +18,7 @@ package com.android.cts;
import com.android.ddmlib.Client;
import com.android.ddmlib.ClientData;
+import com.android.ddmlib.DdmPreferences;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.IShellOutputReceiver;
import com.android.ddmlib.MultiLineReceiver;
@@ -143,6 +144,7 @@ public class TestDevice implements DeviceObserver {
mDeviceInfo = new DeviceParameterCollector();
mPackageActionTimer = new PackageActionTimer();
mObjectSync = new ObjectSync();
+ DdmPreferences.setTimeOut(300000);
}
有點筆記新手跟我一樣:
make cts
cts.jar
來替換庫存的一個。此問題修復了CTS超時問題,因爲某些adb命令需要超過20秒才能在我的MotoA953設備上返回(其中之一爲am instrument -w -e bundle true android.tests.devicesetup/android.tests.getinfo.DeviceInfoInstrument
)。
讀取補丁很困難。請考慮格式化它。除此之外,你的解決方案似乎也適合我。謝謝。 – Robert 2011-02-02 19:58:58