TestMapping

public class TestMapping
extends Object

java.lang.Object
com.android.tradefed.util.testmapping.TestMapping


TEST_MAPPING ファイルを読み込むためのクラス。

概要

ネストされたクラス

class TestMapping.NoTestRuntimeException

 

定数

String TEST_MAPPINGS_ZIP

String TEST_SOURCES

フィールド

public static final Pattern MAINLINE_REGEX

パブリック コンストラクタ

TestMapping()

空の TestMapping オブジェクトを初期化するコンストラクタ。

TestMapping(List<String> testMappingRelativePaths, boolean ignoreTestMappingImports)

TestMapping オブジェクトを作成するコンストラクタ。

パブリック メソッド

static File extractTestMappingsZip(File testMappingsZip)

zip ファイルを抽出して、解凍されたファイルの内容を含むディレクトリを返します。

Map<String, Set<TestInfo>> getAllTests(File testMappingsDir)

指定されたディレクトリの TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。

static Matcher getMainlineTestModuleName(TestInfo info)

パラメータ化されたメインライン テストのマッチャーを取得するヘルパー。

Set<TestInfo> getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch, List<String> extraZipNames, Set<String> matchedPatternPaths)

指定されたアーティファクトに基づいて、すべての TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。

Set<TestInfo> getTests(IBuildInfo buildInfo, String testGroup, boolean hostOnly, Set<String> keywords, Set<String> ignoreKeywords, boolean exactKeywordMatch)

デバイスビルドのアーティファクトに基づいて、すべての TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。

void listTestMappingFiles(Path testMappingDir, Path testMappingsRootDir, Set<Path> filePaths)

すべてのテスト マッピング ファイルを一覧表示し、すべての親ディレクトリと関連するインポート パスを検索するヘルパー。

定数

TEST_MAPPINGS_ZIP

public static final String TEST_MAPPINGS_ZIP

定数値: "test_mappings.zip"

TEST_SOURCES

public static final String TEST_SOURCES

定数値: "Test Sources"

フィールド

MAINLINE_REGEX

public static final Pattern MAINLINE_REGEX

パブリック コンストラクタ

TestMapping

public TestMapping ()

空の TestMapping オブジェクトを初期化するコンストラクタ。

TestMapping

public TestMapping (List<String> testMappingRelativePaths, 
                boolean ignoreTestMappingImports)

TestMapping オブジェクトを作成するコンストラクタ。

パラメータ
testMappingRelativePaths List: TEST_MAPPING ファイル パスへの ERROR(/List)

ignoreTestMappingImports boolean: インポートを無視する ERROR(/boolean)

パブリック メソッド

extractTestMappingsZip

public static File extractTestMappingsZip (File testMappingsZip)

zip ファイルを抽出して、解凍されたファイルの内容を含むディレクトリを返します。

パラメータ
testMappingsZip File: 抽出するテスト マッピング zip の File

戻り値
File テスト マッピング zip の一時ディレクトリを指す File

getAllTests

public Map<String, Set<TestInfo>> getAllTests (File testMappingsDir)

指定されたディレクトリの TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。

パラメータ
testMappingsDir File: すべてのテスト マッピング ファイルを含むディレクトリの File

戻り値
Map<String, Set<TestInfo>> 指定されたディレクトリとその子 ディレクトリ内のテストの Map<String, Set<TestInfo>>

getMainlineTestModuleName

public static Matcher getMainlineTestModuleName (TestInfo info)

パラメータ化されたメインライン テストのマッチャーを取得するヘルパー。

パラメータ
info TestInfo

戻り値
Matcher パラメータ化されたメインライン テストの Matcher

例外
ConfigurationException

getTests

public Set<TestInfo> getTests (IBuildInfo buildInfo, 
                String testGroup, 
                boolean hostOnly, 
                Set<String> keywords, 
                Set<String> ignoreKeywords, 
                boolean exactKeywordMatch, 
                List<String> extraZipNames, 
                Set<String> matchedPatternPaths)

指定されたアーティファクトに基づいて、すべての TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。スイートの実行で、特定のグループ(プリサブミットなど)の TEST_MAPPING ファイル内のすべてのテストを実行する必要がある場合に 必要です。

パラメータ
buildInfo IBuildInfo: ビルドを記述する IBuildInfo

testGroup String: テストグループの String

hostOnly boolean: ホストで実行され、デバイスを必要としないテストのみを返す場合は true。デバイスを必要とするテストを返す場合は false。

keywords Set: テスト マッピング スイートで実行するテストをフィルタリングするときに照合する String のセット。

ignoreKeywords Set: 無視するキーワードの String のセット。

exactKeywordMatch boolean

extraZipNames List: マージされる追加の test_mappings.zip の名前の String のセット。

matchedPatternPaths Set:パターンに一致するファイル パスへの ERROR(/Set)

戻り値
Set<TestInfo> ビルド アーティファクト test_mappings.zip に設定されたテストの Set<TestInfo>

getTests

public Set<TestInfo> getTests (IBuildInfo buildInfo, 
                String testGroup, 
                boolean hostOnly, 
                Set<String> keywords, 
                Set<String> ignoreKeywords, 
                boolean exactKeywordMatch)

デバイスビルドのアーティファクトに基づいて、すべての TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。

パラメータ
buildInfo IBuildInfo: ビルドを記述する IBuildInfo

testGroup String: テストグループの String

hostOnly boolean: ホストで実行され、デバイスを必要としないテストのみを返す場合は true。デバイスを必要とするテストを返す場合は false。

keywords Set: テスト マッピング スイートで実行するテストをフィルタリングするときに照合する String のセット。

ignoreKeywords Set: 無視するキーワードの String のセット。

exactKeywordMatch boolean

戻り値
Set<TestInfo> ビルド アーティファクト test_mappings.zip に設定されたテストの Set<TestInfo>

listTestMappingFiles

public void listTestMappingFiles (Path testMappingDir, 
                Path testMappingsRootDir, 
                Set<Path> filePaths)

すべてのテスト マッピング ファイルを一覧表示し、すべての親ディレクトリと関連するインポート パスを検索するヘルパー。

パラメータ
testMappingDir Path: TEST_MAPPING ファイルの親ディレクトリへの Path

testMappingsRootDir Path: ビルドのすべての TEST_MAPPING ファイルのフォルダへの Path

filePaths Set: すべての TEST_MAPPING パスを保存する ERROR(/Set)