DelegatedInvocationExecution

public class DelegatedInvocationExecution
extends InvocationExecution

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


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

סיכום

שדות

public static final String DELEGATED_MODE_VAR

אם הערך הזה קיים, ההפעלה מתבצעת במצב הענקת גישה

יוצרים ציבוריים

DelegatedInvocationExecution()

שיטות ציבוריות

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

אם הערך הזה קיים, ההפעלה מתבצעת במצב הענקת גישה

יוצרים ציבוריים

DelegatedInvocationExecution

public DelegatedInvocationExecution ()

שיטות ציבוריות

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