ParentSandboxInvocationExecution
public
class
ParentSandboxInvocationExecution
extends InvocationExecution
| java.lang.Object | ||
| ↳ | com.android.tradefed.invoker.InvocationExecution | |
| ↳ | com.android.tradefed.invoker.sandbox.ParentSandboxInvocationExecution | |
גרסה של InvocationExecution לפעולות מיוחדות של קריאה לפונקציה הראשית כשמריצים ארגז חול.
סיכום
constructors ציבוריים | |
|---|---|
ParentSandboxInvocationExecution()
|
|
methods ציבוריים | |
|---|---|
void
|
doCleanUp(IInvocationContext context, IConfiguration config, Throwable exception)
מבצעים את שלב הניקוי של target_preparer ו-multi_target_preparer. |
void
|
doSetup(TestInformation testInfo, IConfiguration config, ITestLogger listener)
מריצים את שלב ההגדרה של target_preparer ו-multi_target_preparer. |
void
|
doTeardown(TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)
מבצעים את שלב הניקוי של target_preparer ו-multi_target_preparer. |
boolean
|
fetchBuild(TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
מריצים את השלב build_provider של הקריאה. |
void
|
reportLogs(ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)
לדווח על חלק מיומני המכשיר בשלב אחר של ההפעלה. |
void
|
runDevicePostInvocationTearDown(IInvocationContext context, IConfiguration config, Throwable exception)
מפעילים את |
void
|
runDevicePreInvocationSetup(IInvocationContext context, IConfiguration config, ITestLogger logger)
מפעילים את |
void
|
runTests(TestInformation info, IConfiguration config, ITestInvocationListener listener)
מריצים את הבדיקה. |
שיטות מוגנות | |
|---|---|
IConfigurationFactory
|
getFactory()
הפונקציה מחזירה את |
List<ITargetPreparer>
|
getLabPreparersToRun(IConfiguration config, String deviceName)
אחזור רשימה של מכיני מעבדה להפעלה במכשיר הזה. |
IRunUtil
|
getRunUtil()
|
List<ITargetPreparer>
|
getTargetPreparersToRun(IConfiguration config, String deviceName)
אחזור רשימה של מכיני יעדים להפעלה במכשיר הזה. |
boolean
|
prepareAndRunSandbox(TestInformation info, IConfiguration config, ITestInvocationListener listener)
הפונקציה מחזירה את סטטוס התוצאה של הרצת ארגז החול. |
constructors ציבוריים
ParentSandboxInvocationExecution
public ParentSandboxInvocationExecution ()
methods ציבוריים
doCleanUp
public void doCleanUp (IInvocationContext context, IConfiguration config, Throwable exception)
מבצעים את שלב הניקוי של target_preparer ו-multi_target_preparer. המכשירים מנקים את עצמם.
| פרמטרים | |
|---|---|
context |
IInvocationContext: ה-IInvocationContext של ההפעלה. |
config |
IConfiguration: IConfiguration של הרצת הבדיקה הזו. |
exception |
Throwable: החריגה המקורית שהופעלה על ידי הרצת הבדיקה. |
doSetup
public void doSetup (TestInformation testInfo, IConfiguration config, ITestLogger listener)
מריצים את שלב ההגדרה של target_preparer ו-multi_target_preparer. מגדיר את כל המכשירים שנדרשים להרצת הבדיקה.
| פרמטרים | |
|---|---|
testInfo |
TestInformation: ה-TestInformation של ההפעלה. |
config |
IConfiguration: IConfiguration של הרצת הבדיקה הזו. |
listener |
ITestLogger: ITestLogger כדי לדווח על יומני כשל בהגדרה. |
| הקפצת הודעות שגיאה (throw) | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
doTeardown
public void doTeardown (TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)
מבצעים את שלב הניקוי של target_preparer ו-multi_target_preparer. האם המכשירים מפורקים ומשויכים להגדרה.
| פרמטרים | |
|---|---|
testInfo |
TestInformation: ה-TestInformation של ההפעלה. |
config |
IConfiguration: IConfiguration של הרצת הבדיקה הזו. |
logger |
ITestLogger: ITestLogger לדיווח על יומנים. |
exception |
Throwable: החריגה המקורית שהופעלה על ידי הרצת הבדיקה. |
| הקפצת הודעות שגיאה (throw) | |
|---|---|
Throwable |
|
fetchBuild
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
מריצים את השלב build_provider של הקריאה.
| פרמטרים | |
|---|---|
testInfo |
TestInformation: ה-TestInformation של ההפעלה. |
config |
IConfiguration: IConfiguration של הרצת הבדיקה הזו. |
rescheduler |
IRescheduler: IRescheduler, לתזמון מחדש של חלקים מההפעלה לביצוע במשאבים אחרים |
listener |
ITestInvocationListener: ITestInvocation לדיווח על כשלים בהורדת גרסת Build. |
| החזרות | |
|---|---|
boolean |
True אם הורדנו את הגרסה בהצלחה, אחרת False. |
| הקפצת הודעות שגיאה (throw) | |
|---|---|
BuildRetrievalError |
|
DeviceNotAvailableException |
|
reportLogs
public void reportLogs (ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)
לדווח על חלק מיומני המכשיר בשלב אחר של ההפעלה. לדוגמה: logcat.
| פרמטרים | |
|---|---|
device |
ITestDevice: המכשיר שממנו ידווחו היומנים. |
logger |
ITestLogger: כלי הרישום של היומנים. |
stage |
TestInvocation.Stage: השלב של הקריאה שאנחנו נמצאים בו. |
runDevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
מפעילים את ITestDevice.postInvocationTearDown(Throwable) לכל מכשיר שכלול בהפעלה.
| פרמטרים | |
|---|---|
context |
IInvocationContext: ה-IInvocationContext של ההפעלה. |
config |
IConfiguration: IConfiguration של הרצת הבדיקה הזו. |
exception |
Throwable: החריגה המקורית שהופעלה על ידי הבדיקה, אם יש כזו. |
runDevicePreInvocationSetup
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
מפעילים את ERROR(ITestDevice.preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice.preInvocationSetup(IBuildInfo)) לכל מכשיר שכלול בהפעלה.
| פרמטרים | |
|---|---|
context |
IInvocationContext: ה-IInvocationContext של ההפעלה. |
config |
IConfiguration: IConfiguration של הרצת הבדיקה הזו. |
logger |
ITestLogger: ITestLogger לדיווח על יומנים. |
| הקפצת הודעות שגיאה (throw) | |
|---|---|
DeviceNotAvailableException |
|
TargetSetupError |
|
runTests
public void runTests (TestInformation info, IConfiguration config, ITestInvocationListener listener)
מריצים את הבדיקה.
| פרמטרים | |
|---|---|
info |
TestInformation: TestInformation להרצת בדיקות. |
config |
IConfiguration: ה-IConfiguration שרוצים להריץ |
listener |
ITestInvocationListener: ITestInvocationListener תוצאות הבדיקה |
| הקפצת הודעות שגיאה (throw) | |
|---|---|
Throwable |
|
שיטות מוגנות
getFactory
protected IConfigurationFactory getFactory ()
הפונקציה מחזירה את IConfigurationFactory ששימש ליצירת ההגדרות.
| החזרות | |
|---|---|
IConfigurationFactory |
|
getLabPreparersToRun
protected List<ITargetPreparer> getLabPreparersToRun (IConfiguration config, String deviceName)
אחזור רשימה של מכיני מעבדה להפעלה במכשיר הזה.
מוחלף בכיתות של ארגז חול כדי להגביל את ההרצה של קבצים להכנת שיעור Lab בתוך ארגז החול (sandbox) של הצאצא
| פרמטרים | |
|---|---|
config |
IConfiguration |
deviceName |
String |
| החזרות | |
|---|---|
List<ITargetPreparer> |
|
getTargetPreparersToRun
protected List<ITargetPreparer> getTargetPreparersToRun (IConfiguration config, String deviceName)
אחזור רשימה של מכיני יעדים להפעלה במכשיר הזה.
מוחלף בכיתות של ארגז חול כדי להגביל את ההרצה של קבצים להכנת שיעור Lab בתוך ארגז החול (sandbox) של הצאצא
| פרמטרים | |
|---|---|
config |
IConfiguration |
deviceName |
String |
| החזרות | |
|---|---|
List<ITargetPreparer> |
|
prepareAndRunSandbox
protected boolean prepareAndRunSandbox (TestInformation info, IConfiguration config, ITestInvocationListener listener)
הפונקציה מחזירה את סטטוס התוצאה של הפעלת ארגז החול.
| פרמטרים | |
|---|---|
info |
TestInformation |
config |
IConfiguration |
listener |
ITestInvocationListener |
| החזרות | |
|---|---|
boolean |
|
| הקפצת הודעות שגיאה (throw) | |
|---|---|
Throwable |
|