為配合主幹穩定開發模型,並確保生態系統的平台穩定性,我們將自 2026 年起,在第 2 季和第 4 季將原始碼發布至 AOSP。如要建構及貢獻 AOSP,請使用 android-latest-release。android-latest-release 資訊清單分支版本一律會參照推送至 Android 開放原始碼計畫的最新版本。詳情請參閱「Android 開放原始碼計畫變更」。
Google 會運用 AI 技術將內容翻譯成你偏好的語言,但可能會出錯。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
GoogleTradefedSandbox
public
class
GoogleTradefedSandbox
extends TradefedSandbox
實驗室基礎架構中使用的 TradefedSandbox 內部專業化。這可滿足與建構作業相關聯的正確版本下載需求。如果有一天我們能透過 AOSP API 下載建構版本,或許就能將這項功能移至 AOSP。
摘要
公用方法 |
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()
清理可能已變更的任何狀態、檔案或環境。
|
公用建構函式
GoogleTradefedSandbox
public GoogleTradefedSandbox ()
公用方法
createClasspath
public String createClasspath (File workingDir)
Google Tradefed Sandbox 只會使用工作目錄中的 JAR。
| 參數 |
workingDir |
File:沙箱的目前工作目錄。 |
createThinLauncherConfig
public IConfiguration createThinLauncherConfig (String[] args,
IKeyStoreClient keyStoreClient,
IRunUtil runUtil,
File globalConfig)
特殊模式與主要執行作業中斷連線:如果設定未顯示在父項中,我們會改用精簡啟動器,嘗試使用目前已知的資訊設定沙箱,並填入工作目錄,在版本目錄中完整建立設定。
| 參數 |
args |
String:原始指令列引數。 |
keyStoreClient |
IKeyStoreClient:目前用來建立設定的金鑰儲存區用戶端。 |
runUtil |
IRunUtil:目前要執行主機指令的 IRunUtil。 |
globalConfig |
File:用於執行 TF 子程序的全域設定。 |
| 傳回 |
IConfiguration |
指向 NON_VERSIONED 物件的 TF 設定 XML 的檔案。如果無法建立精簡啟動器設定,則傳回空值。 |
discoverTests
public Map<String, List<String>> discoverTests (IInvocationContext context,
IConfiguration nonVersionedConfig,
ITestLogger logger)
| 參數 |
context |
IInvocationContext |
nonVersionedConfig |
IConfiguration |
logger |
ITestLogger |
| 傳回 |
Map<String, List<String>> |
|
getTradefedSandboxEnvironment
public File getTradefedSandboxEnvironment (IInvocationContext context,
IConfiguration nonVersionedConfig,
ITestLogger logger,
String[] args)
| 參數 |
context |
IInvocationContext |
nonVersionedConfig |
IConfiguration |
logger |
ITestLogger |
args |
String |
tearDown
public void tearDown ()
清理可能已變更的任何狀態、檔案或環境。
受保護的方法
dumpGlobalConfig
protected File dumpGlobalConfig (IConfiguration config,
Set<String> exclusionPatterns)
從部分物件篩選並傾印全域設定。
| 參數 |
config |
IConfiguration |
exclusionPatterns |
Set |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2026-06-22 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2026-06-22 (世界標準時間)。"],[],[]]