GoogleTradefedSandbox

public class GoogleTradefedSandbox
extends TradefedSandbox

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


การปรับแต่งภายในของ TradefedSandbox เพื่อใช้ในโครงสร้างพื้นฐานของห้องทดลอง ซึ่งจะ ตอบสนองความต้องการในการดาวน์โหลดเวอร์ชันที่เหมาะสมซึ่งเชื่อมโยงกับบิลด์ เราอาจย้ายฟีเจอร์นี้ไปยัง AOSP ได้หากวันหนึ่งเราสามารถใช้ AOSP API เพื่อดาวน์โหลดบิลด์ได้

สรุป

เครื่องมือสร้างสาธารณะ

GoogleTradefedSandbox()

เมธอดสาธารณะ

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 เป็นอนุกรม

เครื่องมือสร้างสาธารณะ

GoogleTradefedSandbox

public GoogleTradefedSandbox ()

เมธอดสาธารณะ

createClasspath

public String createClasspath (File workingDir)

Google Tradefed Sandbox จะใช้เฉพาะไฟล์ JAR ภายในไดเรกทอรีการทำงานเท่านั้น

พารามิเตอร์
workingDir File: ไดเรกทอรีการทำงานปัจจุบันของแซนด์บ็อกซ์

การคืนสินค้า
String คลาสพาธที่จะใช้

ส่ง
ConfigurationException

createThinLauncherConfig

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

โหมดพิเศษที่ไม่ได้เชื่อมต่อกับการเรียกใช้หลัก: เมื่อไม่พบการกำหนดค่าใน องค์ประกอบหลัก เราจะกลับไปใช้ตัวเรียกใช้แบบบางเพื่อพยายามตั้งค่าแซนด์บ็อกซ์ด้วยข้อมูลที่ทราบในปัจจุบัน และเติมไดเรกทอรีการทำงานเพื่อสร้างการกำหนดค่าอย่างสมบูรณ์ใน ไดเรกทอรีที่มีการควบคุมเวอร์ชัน

พารามิเตอร์
args String: อาร์กิวเมนต์บรรทัดคำสั่งเดิม

keyStoreClient IKeyStoreClient: ไคลเอ็นต์ Keystore ปัจจุบันที่จะใช้สร้างการกำหนดค่า

runUtil IRunUtil: IRunUtil ปัจจุบันเพื่อเรียกใช้คำสั่งโฮสต์

globalConfig File: การกำหนดค่าส่วนกลางที่จะใช้เพื่อเรียกใช้กระบวนการย่อยของ TF

การคืนสินค้า
IConfiguration ไฟล์ที่ชี้ไปยัง XML การกำหนดค่าของ TF สำหรับออบเจ็กต์ NON_VERSIONED แสดงผล null หากสร้างการกำหนดค่า Thin Launcher ไม่ได้

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

ส่ง
BuildRetrievalError
ConfigurationException
IOException

getTradefedSandboxEnvironment

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

พารามิเตอร์
context IInvocationContext

nonVersionedConfig IConfiguration

logger ITestLogger

args String

การคืนสินค้า
File

ส่ง
Exception

tearDown

public void tearDown ()

ล้างสถานะ ไฟล์ หรือสภาพแวดล้อมที่อาจมีการเปลี่ยนแปลง

วิธีการที่ได้รับการป้องกัน

dumpGlobalConfig

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

ส่งออกการกำหนดค่าส่วนกลางที่กรองจากออบเจ็กต์บางรายการ

พารามิเตอร์
config IConfiguration

exclusionPatterns Set

การคืนสินค้า
File

ส่ง
ConfigurationException
IOException

prepareContext

protected File prepareContext (IInvocationContext context, 
                IConfiguration config)

เตรียมและทำให้ IInvocationContext เป็นอนุกรม

พารามิเตอร์
context IInvocationContext: IInvocationContext ที่ต้องเตรียม

config IConfiguration: IConfiguration ของแซนด์บ็อกซ์

การคืนสินค้า
File IInvocationContext

ส่ง
IOException