DelegatedInvocationExecution

public class DelegatedInvocationExecution
extends InvocationExecution

java.lang.Object
   ↳ com.android.tradefed.invoker.InvocationExecution
     ↳ com.android.tradefed.invoker.DelegatedInvocationExecution


InvocationExecution שמעבירים את ההרצה לקובץ בינארי אחר של Tradefed.

סיכום

ערכים קבועים

String DELEGATED_MODE_VAR

אם הפעלת הפונקציה מתבצעת במצב מוקצה

Constructors ציבוריים

DelegatedInvocationExecution()

‫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.

void reportLogs(ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)

לדווח על חלק מיומני המכשיר בשלב אחר של ההפעלה.

void runDevicePostInvocationTearDown(IInvocationContext context, IConfiguration config, Throwable exception)

מפעילים את ITestDevice.postInvocationTearDown(Throwable) לכל מכשיר שכלול בהפעלה.

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)) לכל מכשיר שכלול בהפעלה.

void runTests(TestInformation info, IConfiguration config, ITestInvocationListener listener)

מריצים את הבדיקה.

boolean shardConfig(IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

מנסים לפצל את ההגדרה להגדרות משנה, כדי לתזמן מחדש את ההרצה בכמה משאבים במקביל.

ערכים קבועים

DELEGATED_MODE_VAR

public static final String DELEGATED_MODE_VAR

אם הפעלת הפונקציה מתבצעת במצב מוקצה

ערך קבוע: "DELEGATED_MODE"

Constructors ציבוריים

DelegatedInvocationExecution

public DelegatedInvocationExecution ()

‫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 כדי לדווח על יומנים של כשלים בהגדרה.

זריקות
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: החריגה המקורית שהופעלה על ידי הרצת הבדיקה.

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 כדי לדווח על יומנים.

זריקות
DeviceNotAvailableException
TargetSetupError

runTests

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

מריצים את הבדיקה.

פרמטרים
info TestInformation: TestInformation להרצת בדיקות.

config IConfiguration: ה-IConfiguration שרוצים להריץ

listener ITestInvocationListener: ITestInvocationListener תוצאות הבדיקה

shardConfig

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

מנסים לפצל את ההגדרה להגדרות משנה, כדי לתזמן מחדש את ההרצה בכמה משאבים במקביל.

אם מספר הרסיסים גדול מ-1, המערכת פשוט תיצור הגדרות לכל רסיס על ידי הגדרת אינדקסים של רסיסים ותזמון מחדש שלהם. אם לא מוגדר מספר של שברים,המערכת תחזור לערך ברירת המחדל IShardHelper.shardConfig.

פרמטרים
config IConfiguration: IConfiguration הנוכחי.

testInfo TestInformation: TestInformation שמכיל את פרטי הבדיקות.

rescheduler IRescheduler: IRescheduler.

logger ITestLogger: ITestLogger שמשמש לרישום בקובץ יומן במהלך חלוקה למקטעים.

החזרות
boolean true אם הבדיקה פוצלה. אחרת, מחזירים את false