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)

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

パブリックメソッド

static File extractTestMappingsZip (File testMappingsZip)

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

static getAllTests (File testMappingsDir)

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

static Matcher getMainlineTestModuleName ( TestInfo info)

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

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

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

TestMapping

public TestMapping (Path path, 
                Path testMappingsDir)

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

パラメーター
path PathERROR(/Path) TEST_MAPPINGファイルへ。

testMappingsDir PathERROR(/Path)ビルドのすべてのTEST_MAPPINGファイルのフォルダに移動します。

パブリックメソッド

extractTestMappingsZip

public static File extractTestMappingsZip (File testMappingsZip)

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

パラメーター
testMappingsZip FileERROR(/File)のマッピングは、抽出物にジッパーのテスト。

戻り値
File ERROR(/File)マッピングはジップテストのための一時ディレクトリを指します。

getAllTests

public static  getAllTests (File testMappingsDir)

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

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

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

getMainlineTestModuleName

public static Matcher getMainlineTestModuleName (TestInfo info)

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

パラメーター
info TestInfo

戻り値
Matcher ERROR(/Matcher)パラメータ化メインライン・テストのために。

投げる
ConfigurationException

getTests

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

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

パラメーター
testGroup String :A Stringテストグループの。

disabledTests :一連のString無効テストの名前。

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

keywords :一連のStringをテストマッピングスイートで実行するテストをフィルタリングする際に照合します。

戻り値
A Set<TestInfo>テストに関する情報の。

getTests

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

すべてのTEST_MAPPINGファイルですべてのテストを見つけるヘルパー。これは、スイートの実行で、特定のグループのTEST_MAPPINGファイル内のすべてのテストを実行する必要がある場合に必要です(事前送信など)。

パラメーター
buildInfo IBuildInfoIBuildInfoビルドを記述する。

testGroup StringStringテストグループの。

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

keywords

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

listTestMappingFiles

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

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

パラメーター
testMappingDir PathERROR(/Path) TEST_MAPPINGファイルの親ディレクトリに移動します。

testMappingsRootDir PathERROR(/Path)ビルドのすべてのTEST_MAPPINGファイルのフォルダに移動します。

filePathsERROR(/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 :A List<String> TEST_MAPPINGS_ZIPに対してTEST_MAPPINGパスの。