ExecutableTargetTest

public class ExecutableTargetTest
extends ExecutableBaseTest implements IDeviceTest

java.lang.Object
   ↳ com.android.tradefed.testtype.binary.ExecutableBaseTest
     ↳ com.android.tradefed.testtype.binary.ExecutableTargetTest


כלי להרצת בדיקות של קובץ הפעלה שפועל ביעד. ה-runner מטמיע את IDeviceTest כי הבינארי פועל במכשיר.

סיכום

ערכים קבועים

String DEVICE_LOST_ERROR

String ROOT_LOST_ERROR

‫Constructors ציבוריים

ExecutableTargetTest()

‫methods ציבוריים

String findBinary(String binary)

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

boolean getCollectTestsOnly()
ITestDevice getDevice()

משיגים את המכשיר שנבדק.

void runBinary(String binaryPath, ITestInvocationListener listener, TestDescription description)

להריץ בפועל את הקובץ הבינארי בנתיב שצוין.

void setDevice(ITestDevice device)

מזריקים את המכשיר שנבדק.

FailureDescription shouldAbortRun(TestDescription description)

בודקים אם צריך לסיים את ה-testRun מוקדם.

שיטות מוגנות

void checkCommandResult(CommandResult result, ITestInvocationListener listener, TestDescription description)

בודקים את התוצאה של פקודת הבדיקה.

boolean doesRunBinaryGenerateTestResults()
boolean doesRunBinaryGenerateTestRuns()
boolean getSkipBinaryCheck()

ערכים קבועים

DEVICE_LOST_ERROR

public static final String DEVICE_LOST_ERROR

ערך קבוע: "Device was lost prior to %s; aborting run."

ROOT_LOST_ERROR

public static final String ROOT_LOST_ERROR

ערך קבוע: "Root access was lost prior to %s; aborting run."

‫constructors ציבוריים

ExecutableTargetTest

public ExecutableTargetTest ()

‫methods ציבוריים

findBinary

public String findBinary (String binary)

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

פרמטרים
binary ‫String: הנתיב של הקובץ הבינארי או פשוט השם של הקובץ הבינארי.

החזרות
String הנתיב לקובץ הבינארי, או null אם הוא לא נמצא.

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException

getCollectTestsOnly

public boolean getCollectTestsOnly ()

החזרות
boolean

getDevice

public ITestDevice getDevice ()

משיגים את המכשיר שנבדק.

החזרות
ITestDevice ‫ITestDevice

runBinary

public void runBinary (String binaryPath, 
                ITestInvocationListener listener, 
                TestDescription description)

להריץ בפועל את הקובץ הבינארי בנתיב שצוין.

פרמטרים
binaryPath ‫String: הנתיב של הקובץ הבינארי.

listener ‫ITestInvocationListener: מאזין שאליו מדווחים את התוצאות.

description ‫TestDescription: הבדיקה שמתבצעת.

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException
IOException

setDevice

public void setDevice (ITestDevice device)

מזריקים את המכשיר שנבדק.

פרמטרים
device ‫ITestDevice: ITestDevice שבו רוצים להשתמש

shouldAbortRun

public FailureDescription shouldAbortRun (TestDescription description)

בודקים אם צריך לסיים את ה-testRun מוקדם.

פרמטרים
description ‫TestDescription: הבדיקה שמתבצעת.

החזרות
FailureDescription ‫FailureDescription אם צריך להפסיק את לולאת ההפעלה.

שיטות מוגנות

checkCommandResult

protected void checkCommandResult (CommandResult result, 
                ITestInvocationListener listener, 
                TestDescription description)

בודקים את התוצאה של פקודת הבדיקה.

פרמטרים
result ‫CommandResult: תוצאת הבדיקה של הפקודה CommandResult

listener ITestInvocationListener: ITestInvocationListener

description ‫TestDescription: הבדיקה שמתבצעת.

doesRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

החזרות
boolean

doesRunBinaryGenerateTestRuns

protected boolean doesRunBinaryGenerateTestRuns ()

החזרות
boolean

getSkipBinaryCheck

protected boolean getSkipBinaryCheck ()

החזרות
boolean