TestMapping
public
class
TestMapping
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.testmapping.TestMapping |
TEST_MAPPING ファイルを読み込むクラス。
概要
フィールド | |
---|---|
public
static
final
Pattern |
MAINLINE_REGEX
|
public
static
final
String |
TEST_SOURCES
|
パブリック コンストラクタ | |
---|---|
TestMapping(Path path, Path testMappingsDir)
TEST_MAPPING ファイルのパスで |
パブリック メソッド | |
---|---|
static
File
|
extractTestMappingsZip(File testMappingsZip)
zip ファイルを解凍し、解凍したファイルの内容を含むディレクトリを返します。 |
static
|
getAllTests(File testMappingsDir)
指定されたディレクトリの TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。 |
static
Matcher
|
getMainlineTestModuleName(TestInfo info)
パラメータ化された Mainline テストのマッチング パターンを取得するヘルパー。 |
|
getTests(String testGroup,
特定のグループの TEST_MAPPING ファイルで設定されているすべてのテストを取得するヘルパー。 |
static
|
getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly,
すべての TEST_MAPPING ファイル内のすべてのテストを見つけるヘルパー。 |
static
void
|
listTestMappingFiles(Path testMappingDir, Path testMappingsRootDir,
すべてのテスト マッピング ファイルを一覧表示し、すべての親ディレクトリと関連するインポートパスを検索するヘルパー。 |
static
void
|
setIgnoreTestMappingImports(boolean ignoreTestMappingImports)
TestMapping 内に mIgnoreTestMappingImports を設定します。 |
static
void
|
setTestMappingPaths(
TEST_MAPPINGS_ZIP 内に TEST_MAPPING パスを設定して、TEST_MAPPING の読み込みを制限します。 |
フィールド
MAINLINE_REGEX
public static final Pattern MAINLINE_REGEX
TEST_SOURCES
public static final String TEST_SOURCES
パブリック コンストラクタ
TestMapping
public TestMapping (Path path, Path testMappingsDir)
TEST_MAPPING ファイルのパスで TestMapping
オブジェクトを作成するコンストラクタ。
パラメータ | |
---|---|
path |
Path : TEST_MAPPING ファイルの ERROR(/Path) 。 |
testMappingsDir |
Path : ビルドのすべての TEST_MAPPING ファイルのフォルダへの ERROR(/Path) 。 |
パブリック メソッド
extractTestMappingsZip
public static File extractTestMappingsZip (File testMappingsZip)
zip ファイルを解凍し、解凍したファイルの内容を含むディレクトリを返します。
パラメータ | |
---|---|
testMappingsZip |
File : 抽出するテスト マッピングの ZIP の ERROR(/File) 。 |
戻り値 | |
---|---|
File |
テスト マッピング ZIP のテンポラリ ディレクトリを指す ERROR(/File) 。 |
getAllTests
public staticgetAllTests (File testMappingsDir)
指定されたディレクトリの TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。
パラメータ | |
---|---|
testMappingsDir |
File : すべてのテスト マッピング ファイルを含むディレクトリ ERROR(/File) 。 |
戻り値 | |
---|---|
|
指定されたディレクトリとその子ディレクトリにあるテストの Map<String, Set<TestInfo>> 。 |
getMainlineTestModuleName
public static Matcher getMainlineTestModuleName (TestInfo info)
パラメータ化された Mainline テストのマッチング ツールを取得するヘルパー。
パラメータ | |
---|---|
info |
TestInfo |
戻り値 | |
---|---|
Matcher |
パラメータ化された Mainline テスト用の ERROR(/Matcher) 。 |
例外 | |
---|---|
ConfigurationException |
getTests
publicgetTests (String testGroup, disabledTests, boolean hostOnly, keywords)
特定のグループの TEST_MAPPING ファイルで設定されているすべてのテストを取得するヘルパー。
パラメータ | |
---|---|
testGroup |
String : テストグループの String 。 |
disabledTests |
: 無効なテストの名前の String のセット。 |
hostOnly |
boolean : ホストで実行され、デバイスを必要としないテストのみを返す場合は true。実行にデバイスを必要とするテストを返す場合は false。 |
keywords |
: テスト マッピング スイートで実行するテストをフィルタリングするときに一致させる String のセット。 |
戻り値 | |
---|---|
|
テスト情報の Set<TestInfo> 。 |
getTests
public staticgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords)
すべての TEST_MAPPING ファイル内のすべてのテストを見つけるヘルパー。これは、スイートの実行で、特定のグループ(presubmit など)の TEST_MAPPING ファイル内のすべてのテストを実行する必要がある場合に必要です。
パラメータ | |
---|---|
buildInfo |
IBuildInfo : ビルドを記述する IBuildInfo 。 |
testGroup |
String : テストグループの String 。 |
hostOnly |
boolean : ホストで実行され、デバイスを必要としないテストのみを返す場合は true。実行にデバイスを必要とするテストを返す場合は false。 |
keywords |
|
戻り値 | |
---|---|
|
ビルド アーティファクト test_mappings.zip に設定されたテストの Set<TestInfo> 。 |
listTestMappingFiles
public static void listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir,filePaths)
すべてのテスト マッピング ファイルを一覧表示し、すべての親ディレクトリと関連インポート パスを検索するヘルパー。
パラメータ | |
---|---|
testMappingDir |
Path : TEST_MAPPING ファイルの親ディレクトリへの ERROR(/Path) 。 |
testMappingsRootDir |
Path : ビルドのすべての TEST_MAPPING ファイルのフォルダへの ERROR(/Path) 。 |
filePaths |
: すべての TEST_MAPPING パスを保存する ERROR(/Set 。 |
setIgnoreTestMappingImports
public static void setIgnoreTestMappingImports (boolean ignoreTestMappingImports)
TestMapping 内に mIgnoreTestMappingImports を設定します。
パラメータ | |
---|---|
ignoreTestMappingImports |
boolean : テスト マッピングでインポートを無視するかどうかを示すブール値。 |
setTestMappingPaths
public static void setTestMappingPaths (relativePaths)
TEST_MAPPINGS_ZIP 内に TEST_MAPPING パスを設定して、TEST_MAPPING の読み込みを制限します。
パラメータ | |
---|---|
relativePaths |
: TEST_MAPPINGS_ZIP を基準とした TEST_MAPPING パスの List<String> 。 |