ParentSandboxInvocationThực thi
public class ParentSandboxInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.sandbox.ParentSandboxInvocationExecution |
Phiên bản InvocationExecution
dành cho các hành động đặc biệt của lệnh gọi gốc khi chạy hộp cát.
Bản tóm tắt
Nhà thầu xây dựng công cộng | |
---|---|
ParentSandboxInvocationExecution () |
Phương pháp công khai | |
---|---|
void | doCleanUp ( IInvocationContext context, IConfiguration config, Throwable exception) Thực hiện bước dọn dẹp target_preparer và multi_target_preparer. |
void | doSetup ( TestInformation testInfo, IConfiguration config, ITestLogger listener) Thực hiện bước thiết lập target_preparer và multi_target_preparer. |
void | doTeardown ( TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception) Thực hiện bước phân tích target_preparer và multi_target_preparer. |
boolean | fetchBuild ( TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener) Thực hiện bước build_provider của lệnh gọi. |
void | reportLogs ( ITestDevice device, ITestLogger logger, TestInvocation.Stage stage) Báo cáo một số nhật ký thiết bị ở giai đoạn khác nhau 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 |
void | runTests ( TestInformation info, IConfiguration config, ITestInvocationListener listener) Chạy thử nghiệm. |
Phương pháp được bảo vệ | |
---|---|
IConfigurationFactory | getFactory () Trả về |
getLabPreparersToRun ( IConfiguration config, String deviceName) Truy xuất danh sách các trình chuẩn bị phòng thí nghiệm để chạy trên thiết bị này. | |
IRunUtil | getRunUtil () |
getTargetPreparersToRun ( IConfiguration config, String deviceName) Truy xuất danh sách các trình chuẩn bị mục tiêu để chạy trên thiết bị này. | |
boolean | prepareAndRunSandbox ( TestInformation info, IConfiguration config, ITestInvocationListener listener) Trả về trạng thái kết quả của việc chạy sandbox. |
Nhà thầu xây dựng công cộng
ParentSandboxInvocationThực thi
public ParentSandboxInvocationExecution ()
Phương pháp công khai
doCleanUp
public void doCleanUp (IInvocationContext context, IConfiguration config, Throwable exception)
Thực hiện bước dọn dẹp target_preparer và multi_target_preparer. Các thiết bị có dọn dẹp không.
Thông số | |
---|---|
context | IInvocationContext : IInvocationContext của lệnh gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
exception | Throwable : ngoại lệ ban đầu do quá trình chạy thử đưa ra. |
doSetup
public void doSetup (TestInformation testInfo, IConfiguration config, ITestLogger listener)
Thực hiện bước thiết lập target_preparer và multi_target_preparer. Có tất cả các thiết lập thiết bị cần thiết để chạy thử nghiệm hay không.
Thông số | |
---|---|
testInfo | TestInformation : TestInformation của lệnh gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
listener | ITestLogger : ITestLogger để báo cáo nhật ký lỗi thiết lập. |
Ném | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
doTeardown
public void doTeardown (TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)
Thực hiện bước phân tích target_preparer và multi_target_preparer. Các thiết bị có bị hỏng liên quan đến quá trình thiết lập hay không.
Thông số | |
---|---|
testInfo | TestInformation : TestInformation của lệnh gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
logger | ITestLogger : ITestLogger để báo cáo nhật ký. |
exception | Throwable : ngoại lệ ban đầu do quá trình chạy thử đưa ra. |
tìm nạpBuild
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
Thực hiện bước build_provider của lệnh gọi.
Thông số | |
---|---|
testInfo | TestInformation : TestInformation của lệnh gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
rescheduler | IRescheduler : IRescheduler , để sắp xếp 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. |
Trả lại | |
---|---|
boolean | Đúng nếu chúng tôi đã tải xuống bản dựng thành công, nếu không thì sai. |
Ném | |
---|---|
BuildRetrievalError | |
DeviceNotAvailableException |
báo cáoNhật ký
public void reportLogs (ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)
Báo cáo một số nhật ký thiết bị ở giai đoạn khác nhau của lệnh gọi. Ví dụ: logcat.
Thông số | |
---|---|
device | ITestDevice : Thiết bị báo cáo nhật ký. |
logger | ITestLogger : Trình ghi nhật ký. |
stage | TestInvocation.Stage : Giai đoạn của lệnh gọi mà chúng ta đang ở. |
runDevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
Gọi ITestDevice#postInvocationTearDown(Throwable)
cho từng phần thiết bị của lệnh gọi.
Thông số | |
---|---|
context | IInvocationContext : IInvocationContext của lệnh gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
exception | Throwable : ngoại lệ ban đầu do quá trình chạy thử nghiệm đưa 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ị của lệnh gọi.
Thông số | |
---|---|
context | IInvocationContext : IInvocationContext của lệnh gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
logger | ITestLogger : ITestLogger để báo cáo nhật ký. |
Ném | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
chạy thử nghiệm
public void runTests (TestInformation info, IConfiguration config, ITestInvocationListener listener)
Chạy thử nghiệm.
Thông số | |
---|---|
info | TestInformation : TestInformation để chạy thử nghiệm. |
config | IConfiguration : IConfiguration để chạy |
listener | ITestInvocationListener : ITestInvocationListener của kết quả kiểm tra |
Phương pháp được bảo vệ
getFactory
protected IConfigurationFactory getFactory ()
Trả về IConfigurationFactory
được sử dụng để tạo cấu hình.
Trả lại | |
---|---|
IConfigurationFactory |
getLabPreparersToRun
protectedgetLabPreparersToRun (IConfiguration config, String deviceName)
Truy xuất danh sách các trình chuẩn bị phòng thí nghiệm để chạy trên thiết bị này.
Được ghi đè trong các lớp hộp cát để hạn chế người chuẩn bị phòng thí nghiệm chạy bên trong hộp cát con
Thông số | |
---|---|
config | IConfiguration |
deviceName | String |
Trả lại | |
---|---|
getTargetPreparersToRun
protectedgetTargetPreparersToRun (IConfiguration config, String deviceName)
Truy xuất danh sách các trình chuẩn bị mục tiêu để chạy trên thiết bị này.
Được ghi đè trong các lớp hộp cát để hạn chế người chuẩn bị phòng thí nghiệm chạy bên trong hộp cát con
Thông số | |
---|---|
config | IConfiguration |
deviceName | String |
Trả lại | |
---|---|
chuẩn bịAndRunSandbox
protected boolean prepareAndRunSandbox (TestInformation info, IConfiguration config, ITestInvocationListener listener)
Trả về trạng thái kết quả của việc chạy sandbox.
Thông số | |
---|---|
info | TestInformation |
config | IConfiguration |
listener | ITestInvocationListener |
Trả lại | |
---|---|
boolean |