SandboxedInvocationExecution
public
class
SandboxedInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.sandbox.SandboxedInvocationExecution |
Thực thi hộp cát đặc biệt của lệnh gọi: Đây là InvocationExection khi chúng ta đang ở bên trong hộp cát đang chạy lệnh. Bản dựng phải có sẵn trong ngữ cảnh.
Tóm tắt
Hàm khởi tạo công khai | |
---|---|
SandboxedInvocationExecution()
|
Phương thức công khai | |
---|---|
void
|
cleanUpBuilds(IInvocationContext context, IConfiguration config)
Thực thi bước dọn dẹp build_provider. |
boolean
|
fetchBuild(TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
Thực thi bước build_provider của lệnh gọi. |
void
|
runDevicePostInvocationTearDown(IInvocationContext context, IConfiguration config, Throwable exception)
Gọi |
void
|
runDevicePreInvocationSetup(IInvocationContext context, IConfiguration config, ITestLogger logger)
Gọi |
Phương thức được bảo vệ | |
---|---|
|
getPreparersToRun(IConfiguration config, String deviceName)
Truy xuất danh sách trình chuẩn bị để chạy trên thiết bị này. |
void
|
logHostAdb(IConfiguration config, ITestLogger logger)
Thu thập nhật ký từ $TMPDIR/adb.$UID.log. |
Hàm khởi tạo công khai
SandboxedInvocationExecution
public SandboxedInvocationExecution ()
Phương thức công khai
cleanUpBuilds
public void cleanUpBuilds (IInvocationContext context, IConfiguration config)
Thực thi bước dọn dẹp build_provider. Liên kết với quá trình tìm nạp bản dựng.
Tham số | |
---|---|
context |
IInvocationContext : IInvocationContext của lệnh gọi. |
config |
IConfiguration : IConfiguration của lần chạy kiểm thử này.
|
fetchBuild
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
Thực thi bước build_provider của lệnh gọi.
Tham số | |
---|---|
testInfo |
TestInformation : TestInformation của lệnh gọi. |
config |
IConfiguration : IConfiguration của lần chạy kiểm thử này. |
rescheduler |
IRescheduler : IRescheduler , để lên lịch lại các phần của lệnh gọi để thực thi trên(các) tài nguyên khác |
listener |
ITestInvocationListener : ITestInvocation để báo cáo lỗi tải xuống bản dựng. |
Giá trị trả về | |
---|---|
boolean |
True nếu chúng ta tải bản dựng xuống thành công, false nếu không. |
Gửi | |
---|---|
BuildRetrievalError |
|
DeviceNotAvailableException |
runDevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
Gọi ITestDevice#postInvocationTearDown(Throwable)
cho từng phần thiết bị trong lệnh gọi.
Tham số | |
---|---|
context |
IInvocationContext : IInvocationContext của lệnh gọi. |
config |
IConfiguration : IConfiguration của lần chạy kiểm thử này. |
exception |
Throwable : ngoại lệ ban đầu do quá trình kiểm thử đang chạy gửi ra (nếu có).
|
runDevicePreInvocationSetup
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
Gọi ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))
cho từng phần thiết bị trong lệnh gọi.
Tham số | |
---|---|
context |
IInvocationContext : IInvocationContext của lệnh gọi. |
config |
IConfiguration : IConfiguration của lần chạy kiểm thử này. |
logger |
ITestLogger : ITestLogger để báo cáo nhật ký. |
Gửi | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
Phương thức được bảo vệ
getPreparersToRun
protectedgetPreparersToRun (IConfiguration config, String deviceName)
Truy xuất danh sách trình chuẩn bị để chạy trên thiết bị này.
Được ghi đè trong các lớp hộp cát để hạn chế việc chạy trình chuẩn bị phòng thí nghiệm bên trong hộp cát con
Tham số | |
---|---|
config |
IConfiguration |
deviceName |
String |
Giá trị trả về | |
---|---|
|
logHostAdb
protected void logHostAdb (IConfiguration config, ITestLogger logger)
Thu thập nhật ký từ $TMPDIR/adb.$UID.log.
Tham số | |
---|---|
config |
IConfiguration |
logger |
ITestLogger |