AdbStopServerPreparer
public
class
AdbStopServerPreparer
extends BaseTargetPreparer
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.adb.AdbStopServerPreparer | |
用于在运行 adb 测试之前和之后停止主机上 adb 服务器的目标准备器。
此准备器会停止并重启主机上的 adb,因此应谨慎使用。它通常应与 SemaphoreTokenTargetPreparer 搭配使用,以避免其他测试并发运行。
摘要
常量 | |
|---|---|
String |
ADB_BINARY_KEY
|
公共构造函数 | |
|---|---|
AdbStopServerPreparer()
|
|
公共方法 | |
|---|---|
void
|
setUp(TestInformation testInfo)
|
void
|
tearDown(TestInformation testInfo, Throwable e)
|
受保护的方法 | |
|---|---|
File
|
findAdbLog()
|
常量
ADB_BINARY_KEY
public static final String ADB_BINARY_KEY
常量值: "adb_path"
公共构造函数
AdbStopServerPreparer
public AdbStopServerPreparer ()
公共方法
setUp
public void setUp (TestInformation testInfo)
| 参数 | |
|---|---|
testInfo |
TestInformation |
| 抛出 | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| 参数 | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| 抛出 | |
|---|---|
DeviceNotAvailableException |
|
受保护的方法
findAdbLog
protected File findAdbLog ()
| 返回 | |
|---|---|
File |
|