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

הקפצת הודעות שגיאה (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

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

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