テストマッピング

public class TestMapping
extends Object

java.lang.オブジェクト
com.android.tradefed.util.testmapping.TestMapping


TEST_MAPPING ファイルをロードするためのクラス。

まとめ

田畑

public static final Pattern MAINLINE_REGEX

public static final String TEST_MAPPINGS_ZIP

public static final String TEST_SOURCES

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

TestMapping ()

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

TestMapping ( testMappingRelativePaths, boolean ignoreTestMappingImports) TestMapping ( testMappingRelativePaths, boolean ignoreTestMappingImports)

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

パブリックメソッド

static File extractTestMappingsZip (File testMappingsZip)

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

getAllTests (File testMappingsDir)

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

static Matcher getMainlineTestModuleName ( TestInfo info)

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

getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords)

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

getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords, extraZipNames, matchedPatternPaths) getTests ( IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords, ignoreKeywords, extraZipNames, matchedPatternPaths)

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

void listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir, filePaths) listTestMappingFiles (Path testMappingDir, Path testMappingsRootDir, filePaths)

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

田畑

MAINLINE_REGEX

public static final Pattern MAINLINE_REGEX

TEST_MAPPINGS_ZIP

public static final String TEST_MAPPINGS_ZIP

テストソース

public static final String TEST_SOURCES

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

テストマッピング

public TestMapping ()

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

テストマッピング

public TestMapping ( testMappingRelativePaths, 
                boolean ignoreTestMappingImports)

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

パラメーター
testMappingRelativePaths : ERROR(/List ) ERROR(/List )を TEST_MAPPING ファイル パスに追加します。

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

パブリックメソッド

抽出テストマッピングZip

public static File extractTestMappingsZip (File testMappingsZip)

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

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

戻り値
Fileテスト マッピング zip の一時ディレクトリを指しているERROR(/File)

すべてのテストを取得

public  getAllTests (File testMappingsDir)

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

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

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

getMainlineTestModuleName

public static Matcher getMainlineTestModuleName (TestInfo info)

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

パラメーター
info TestInfo

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

投げる
ConfigurationException

テストを取得する

public  getTests (IBuildInfo buildInfo, 
                String testGroup, 
                boolean hostOnly, 
                 keywords, 
                 ignoreKeywords)

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

パラメーター
buildInfo IBuildInfo : ビルドを説明するIBuildInfo

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

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

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

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

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

テストを取得する

public  getTests (IBuildInfo buildInfo, 
                String testGroup, 
                boolean hostOnly, 
                 keywords, 
                 ignoreKeywords, 
                 extraZipNames, 
                 matchedPatternPaths)

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

パラメーター
buildInfo IBuildInfo : ビルドを説明するIBuildInfo

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

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

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

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

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

matchedPatternPaths : ERROR(/Set ) ERROR(/Set )パターンに一致したファイル パスへ。

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

listTestMappingFiles

public void listTestMappingFiles (Path testMappingDir, 
                Path testMappingsRootDir, 
                 filePaths)

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

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

testMappingsRootDir Path : ビルドのすべての TEST_MAPPING ファイルのフォルダーへのERROR(/Path)

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