テストマッピング

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, matchedPatternPaths) TestMapping (Path path, Path testMappingsDir, matchedPatternPaths)

TEST_MAPPING ファイルへのパスからTestMappingオブジェクトを作成するコンストラクター。

公開メソッド

static File extractTestMappingsZip (File testMappingsZip)

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

static getAllTests (File testMappingsDir)

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

static Matcher getMainlineTestModuleName ( TestInfo info)

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

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

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

getTests (String testGroup, disabledTests, boolean hostOnly, keywords) getTests (String testGroup, disabledTests, boolean hostOnly, keywords) getTests (String testGroup, disabledTests, boolean hostOnly, keywords)

特定のグループの TEST_MAPPING ファイルに設定されたすべてのテストを取得するためのヘルパー。

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

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

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

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

static void setIgnoreTestMappingImports (boolean ignoreTestMappingImports)

TestMapping 内で mIgnoreTestMappingImports を設定します。

static void setTestMappingPaths ( relativePaths) setTestMappingPaths ( relativePaths)

TEST_MAPPINGS_ZIP 内に TEST_MAPPING パスを設定して、TEST_MAPPING の読み込みを制限します。

田畑

MAINLINE_REGEX

public static final Pattern MAINLINE_REGEX

TEST_SOURCES

public static final String TEST_SOURCES

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

テストマッピング

public TestMapping (Path path, 
                Path testMappingsDir, 
                 matchedPatternPaths)

TEST_MAPPING ファイルへのパスからTestMappingオブジェクトを作成するコンストラクター。

パラメーター
path Path : TEST_MAPPING ファイルへのERROR(/Path)

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

matchedPatternPaths : ERROR(/Set ) ERROR(/Set )を、パターンに一致するファイル パスに追加します。

公開メソッド

extractTestMappingsZip

public static File extractTestMappingsZip (File testMappingsZip)

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

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

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

getAllTests

public static  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

getTests

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

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

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

testGroup String : テスト グループのERROR(/String)

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

keywords : テスト マッピング スイートで実行するテストをフィルター処理するときに一致するERROR(/String)のセット。

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

matchedPatternPaths : ERROR(/Set ) ERROR(/Set )を、パターンに一致するファイル パスに追加します。

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

getTests

public  getTests (String testGroup, 
                 disabledTests, 
                boolean hostOnly, 
                 keywords)

特定のグループの TEST_MAPPING ファイルに設定されたすべてのテストを取得するためのヘルパー。

パラメーター
testGroup String : テスト グループのERROR(/String)

disabledTests : 無効なテストの名前のERROR(/String)のセット。

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

keywords : テスト マッピング スイートで実行するテストをフィルター処理するときに一致するERROR(/String)のセット。

戻り値
テスト情報のSet<TestInfo>

getTests

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

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

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

testGroup String : テスト グループのERROR(/String)

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

keywords : テスト マッピング スイートで実行するテストをフィルター処理するときに一致するERROR(/String)のセット。

戻り値
ビルド アーティファクト 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 : A ERROR(/Set ) ERROR(/Set )すべての TEST_MAPPING パスを格納します。

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>