テストマッピング
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_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) パラメータ化されたメインライン テストのマッチャーを取得するヘルパー。 |
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
テストソース
public static final String TEST_SOURCES
パブリックコンストラクター
テストマッピング
public TestMapping (Path path, Path testMappingsDir)
TEST_MAPPING ファイルへのパスからTestMapping
オブジェクトを作成するコンストラクター。
パラメーター | |
---|---|
path | Path : TEST_MAPPING ファイルへのERROR(/Path) 。 |
testMappingsDir | Path : ビルドのすべての TEST_MAPPING ファイルのフォルダーへのERROR(/Path) 。 |
パブリックメソッド
抽出テストマッピングZip
public static File extractTestMappingsZip (File testMappingsZip)
zip ファイルを抽出し、解凍されたファイルの内容を含むディレクトリを返します。
パラメーター | |
---|---|
testMappingsZip | File : 抽出するテスト マッピング zip のERROR(/File) 。 |
戻り値 | |
---|---|
File | テスト マッピング zip の一時ディレクトリを指しているERROR(/File) 。 |
すべてのテストを取得
public staticgetAllTests (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 |
テストを取得する
publicgetTests (String testGroup, disabledTests, boolean hostOnly, keywords)
特定のグループの TEST_MAPPING ファイルに設定されているすべてのテストを取得するヘルパー。
パラメーター | |
---|---|
testGroup | String : テストグループのString 。 |
disabledTests | String のセット。 |
hostOnly | boolean : ホスト上で実行され、デバイスを必要としないテストのみを返す場合は true。 false を指定すると、デバイスの実行が必要なテストが返されます。 |
keywords | String 列のセット。 |
戻り値 | |
---|---|
テスト情報のSet<TestInfo> 。 |
テストを取得する
public staticgetTests (IBuildInfo buildInfo, String testGroup, boolean hostOnly, keywords)
すべての TEST_MAPPING ファイル内のすべてのテストを検索するヘルパー。これは、スイートの実行で特定のグループの 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 | 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 | List<String> 。 |