AdbStopServerPreparer
public
class
AdbStopServerPreparer
extends BaseTargetPreparer
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.adb.AdbStopServerPreparer | |
目标准备程序,用于在运行 adb 测试之前和之后停止主机上的 adb 服务器。
使用此准备程序时应谨慎,因为它会停止并重启主机上的 adb。它通常应与 SemaphoreTokenTargetPreparer 紧密相关,以避免其他测试同时运行。
摘要
字段 | |
|---|---|
public
static
final
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
公共构造函数
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 |
|