ParentSandboxInvocationExecution
public class ParentSandboxInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.sandbox.ParentSandboxInvocationExecution |
Phiên bản của InvocationExecution
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 công cộng | |
---|---|
ParentSandboxInvocationExecution () |
Phương thức 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 chia nhỏ 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ời gọi. |
void | reportLogs ( ITestDevice device, ITestLogger logger, TestInvocation.Stage stage) Báo cáo một số nhật ký thiết bị ở các 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 người 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 người 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 công cộng
ParentSandboxInvocationExecution
public ParentSandboxInvocationExecution ()
Phương thức công khai
làmCleanUp
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ời gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
exception | Throwable : ngoại lệ ban đầu được ném ra bởi quá trình chạy thử nghiệm. |
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. Tất cả thiết lập thiết bị cần thiết để chạy thử nghiệm.
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 chia nhỏ target_preparer và multi_target_preparer. Các thiết bị có bị hỏng liên quan đến thiết lập 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 được ném ra bởi quá trình chạy thử nghiệm. |
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ời 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 , để 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. |
trả lại | |
---|---|
boolean | Đúng nếu chúng tôi đã tải xuống bản dựng thành công, sai nếu không. |
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ị ở các 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 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ời gọi.
Thông số | |
---|---|
context | IInvocationContext : IInvocationContext của lời gọi. |
config | IConfiguration : IConfiguration của lần chạy thử nghiệm này. |
exception | Throwable : ngoại lệ ban đầu được đưa ra bởi thử nghiệm đang chạy 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ời 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 người chuẩn bị phòng thí nghiệm để chạy trên thiết bị này.
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 người chuẩn bị mục tiêu để chạy trên thiết bị này.
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 |