TradefedSandbox

public class TradefedSandbox
extends Object implements ISandbox

java.lang.Object
com.android.tradefed.sandbox.TradefedSandbox


מיכל ארגז חול שיכול להריץ הזמנה של פדרציה מסחרית. TODO: אפשר להעביר אפשרויות לארגז החול.

סיכום

שדות

public static final String SANDBOX_ENABLED

בנאים ציבוריים

TradefedSandbox ()

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

String createClasspath (File workingDir)

צור נתיב class המבוסס על הסביבה וספריית העבודה המוחזרת על ידי ISandbox.getTradefedSandboxEnvironment(com.android.tradefed.invoker.IInvocationContext, com.android.tradefed.config.IConfiguration, String[]) .

IConfiguration createThinLauncherConfig (String[] args, IKeyStoreClient keyStoreClient, IRunUtil runUtil, File globalConfig)

מצב מיוחד מנותק מההפעלה הראשית: כאשר נראה שתצורה לא קיימת באב, אנו חוזרים ל-thin launcher שבו אנו מנסים להגדיר את ארגז החול עם המידע המוכר כעת ולמלא את ספריית העבודה כדי ליצור את התצורה במלואה ב-dir הגרסה. .

File getTradefedSandboxEnvironment ( IInvocationContext context, IConfiguration nonVersionedConfig, ITestLogger logger, String[] args)
Exception prepareEnvironment ( IInvocationContext context, IConfiguration config, ITestInvocationListener listener)

הכן את הסביבה עבור ארגז החול לפעול כראוי.

CommandResult run ( TestInformation info, IConfiguration config, ITestLogger logger)

הפעל את ארגז החול עם הסביבה שהוגדרה.

void tearDown ()

נקה את כל המצבים, הקבצים או הסביבה שאולי השתנו.

שיטות מוגנות

File dumpGlobalConfig ( IConfiguration config, exclusionPatterns) dumpGlobalConfig ( IConfiguration config, exclusionPatterns)

זרוק את התצורה הגלובלית שסוננה מכמה אובייקטים.

String getJava ()
Exception prepareConfiguration ( IInvocationContext context, IConfiguration config, ITestInvocationListener listener)

הכן את IConfiguration שתועבר לתהליך המשנה ותניע את ביצוע המכולה.

File prepareContext ( IInvocationContext context, IConfiguration config)

הכן והצג בסידרה את IInvocationContext .

שדות

SANDBOX_ENABLED

public static final String SANDBOX_ENABLED

בנאים ציבוריים

TradefedSandbox

public TradefedSandbox ()

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

createClasspath

public String createClasspath (File workingDir)

צור נתיב class המבוסס על הסביבה וספריית העבודה המוחזרת על ידי ISandbox.getTradefedSandboxEnvironment(com.android.tradefed.invoker.IInvocationContext, com.android.tradefed.config.IConfiguration, String[]) .

פרמטרים
workingDir File : ספריית העבודה הנוכחית עבור ארגז החול.

החזרות
String נתיב הכיתה שיש להשתמש בו.

זורק
ConfigurationException

createThinLauncherConfig

public IConfiguration createThinLauncherConfig (String[] args, 
                IKeyStoreClient keyStoreClient, 
                IRunUtil runUtil, 
                File globalConfig)

מצב מיוחד מנותק מההפעלה הראשית: כאשר נראה שתצורה לא קיימת באב, אנו חוזרים ל-thin launcher שבו אנו מנסים להגדיר את ארגז החול עם המידע המוכר כעת ולמלא את ספריית העבודה כדי ליצור את התצורה במלואה ב-dir הגרסה. .

פרמטרים
args String : שורת הפקודה המקורית args.

keyStoreClient IKeyStoreClient : לקוח מאגר המפתחות הנוכחי לשימוש ליצירת תצורות.

runUtil IRunUtil : ה- IRunUtil הנוכחי להפעלת פקודות מארח.

globalConfig File : התצורה הגלובלית לשימוש להפעלת תהליכי משנה של TF.

החזרות
IConfiguration קובץ המצביע על תצורת XML של TF עבור אובייקטים NON_VERSIONED. מחזירה null אם לא ניתן ליצור תצורת משגר דקה.

getTradefedSandboxEnvironment

public File getTradefedSandboxEnvironment (IInvocationContext context, 
                IConfiguration nonVersionedConfig, 
                ITestLogger logger, 
                String[] args)

פרמטרים
context IInvocationContext

nonVersionedConfig IConfiguration

logger ITestLogger

args String

החזרות
File

להכין סביבה

public Exception prepareEnvironment (IInvocationContext context, 
                IConfiguration config, 
                ITestInvocationListener listener)

הכן את הסביבה עבור ארגז החול לפעול כראוי.

פרמטרים
context IInvocationContext : ההזמנה הנוכחית IInvocationContext .

config IConfiguration : IConfiguration להפעלת הפקודה.

listener ITestInvocationListener : ה- ITestInvocationListener הקורא הנוכחי שבו יש להעביר את התוצאות הסופיות.

החזרות
Exception Exception המכיל את הכישלון. או Null אם זה מצליח.

לָרוּץ

public CommandResult run (TestInformation info, 
                IConfiguration config, 
                ITestLogger logger)

הפעל את ארגז החול עם הסביבה שהוגדרה.

פרמטרים
info TestInformation : ה- TestInformation המתאר את ההזמנה

config IConfiguration : IConfiguration להפעלת הפקודה.

logger ITestLogger : ITestLogger שבו אנו יכולים לרשום קבצים.

החזרות
CommandResult CommandResult עם הסטטוס של ריצת ארגז החול ויומנים.

לקרוע

public void tearDown ()

נקה את כל המצבים, הקבצים או הסביבה שאולי השתנו.

שיטות מוגנות

dumpGlobalConfig

protected File dumpGlobalConfig (IConfiguration config, 
                 exclusionPatterns)

זרוק את התצורה הגלובלית שסוננה מכמה אובייקטים.

פרמטרים
config IConfiguration

exclusionPatterns

החזרות
File

זורק
ConfigurationException

getJava

protected String getJava ()

החזרות
String

להכין תצורה

protected Exception prepareConfiguration (IInvocationContext context, 
                IConfiguration config, 
                ITestInvocationListener listener)

הכן את IConfiguration שתועבר לתהליך המשנה ותניע את ביצוע המכולה.

פרמטרים
context IInvocationContext : IInvocationContext הנוכחי.

config IConfiguration : IConfiguration שיש להכין.

listener ITestInvocationListener : ההפעלה הנוכחית ITestInvocationListener .

החזרות
Exception חריג אם משהו השתבש, ריק אחרת.

להכיןקונטקסט

protected File prepareContext (IInvocationContext context, 
                IConfiguration config)

הכן והצג בסידרה את IInvocationContext .

פרמטרים
context IInvocationContext : ה- IInvocationContext שיש להכין.

config IConfiguration : IConfiguration של ארגז החול.

החזרות
File IInvocationContext המסודר.

זורק
IOException