GoogleTradefedSandbox

public class GoogleTradefedSandbox
extends TradefedSandbox

java.lang.Object
   ↳ com.android.tradefed.sandbox.TradefedSandbox
     ↳ com.google.android.tradefed.sandbox.GoogleTradefedSandbox


התמחות פנימית של TradefedSandbox לשימוש בתשתית של ה-Lab. הכתובת הזו מיועדת להורדה של הגרסה המתאימה שמשויכת ל-build. יכול להיות שנוכל להעביר את זה ל-AOSP אם יום אחד נוכל להסתמך על AOSP API כדי להוריד גרסאות build.

סיכום

‫constructors ציבוריים

GoogleTradefedSandbox()

‫methods ציבוריים

String createClasspath(File workingDir)

ב-Google Tradefed Sandbox נעשה שימוש רק בקובצי ה-jar שבספריית העבודה.

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

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

Map<String, List<String>> discoverTests(IInvocationContext context, IConfiguration nonVersionedConfig, ITestLogger logger)
IFolderBuildInfo fetchSandboxExtraArtifacts(IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
File getTradefedSandboxEnvironment(IInvocationContext context, IConfiguration nonVersionedConfig, ITestLogger logger, String[] args)
void tearDown()

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

שיטות מוגנות

File dumpGlobalConfig(IConfiguration config, Set<String> exclusionPatterns)

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

File prepareContext(IInvocationContext context, IConfiguration config)

מכינים את IInvocationContext ומבצעים סריאליזציה.

‫constructors ציבוריים

GoogleTradefedSandbox

public GoogleTradefedSandbox ()

‫methods ציבוריים

createClasspath

public String createClasspath (File workingDir)

ב-Google Tradefed Sandbox נעשה שימוש רק בקובצי ה-jar שבספריית העבודה.

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

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

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

createThinLauncherConfig

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

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

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

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

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

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

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

discoverTests

public Map<String, List<String>> discoverTests (IInvocationContext context, 
                IConfiguration nonVersionedConfig, 
                ITestLogger logger)

פרמטרים
context IInvocationContext

nonVersionedConfig IConfiguration

logger ITestLogger

החזרות
Map<String, List<String>>

fetchSandboxExtraArtifacts

public IFolderBuildInfo fetchSandboxExtraArtifacts (IInvocationContext context, 
                IConfiguration nonVersionedConfig, 
                String[] args)

פרמטרים
context IInvocationContext

nonVersionedConfig IConfiguration

args String

החזרות
IFolderBuildInfo

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

getTradefedSandboxEnvironment

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

פרמטרים
context IInvocationContext

nonVersionedConfig IConfiguration

logger ITestLogger

args String

החזרות
File

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

tearDown

public void tearDown ()

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

שיטות מוגנות

dumpGlobalConfig

protected File dumpGlobalConfig (IConfiguration config, 
                Set<String> exclusionPatterns)

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

פרמטרים
config IConfiguration

exclusionPatterns Set

החזרות
File

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

prepareContext

protected File prepareContext (IInvocationContext context, 
                IConfiguration config)

מכינים את IInvocationContext ומבצעים סריאליזציה.

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

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

החזרות
File ה-IInvocationContext שעבר סריאליזציה.

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