测试映射
public class TestMapping
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.testmapping.TestMapping |
用于加载TEST_MAPPING文件的类。
概要
领域 | |
---|---|
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文件中查找所有测试。 |
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 | setTestMappingPaths ( relativePaths) setTestMappingPaths ( relativePaths) 在TEST_MAPPINGS_ZIP内设置TEST_MAPPING路径以限制加载TEST_MAPPING。 |
领域
TEST_SOURCES
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) 。 |
公开方法
extractTestMappingsZip
public static File extractTestMappingsZip (File testMappingsZip)
解压缩一个zip文件并返回包含解压缩文件内容的目录。
参量 | |
---|---|
testMappingsZip | File :要提取的测试映射zip的ERROR(/File) 。 |
退货 | |
---|---|
File | 指向测试映射zip的temp目录的ERROR(/File) 。 |
getAllTests
public staticgetAllTests (File testMappingsDir)
帮助程序可从给定目录的TEST_MAPPING文件中查找所有测试。
参量 | |
---|---|
testMappingsDir | File : ERROR(/File) 包含所有测试映射文件的目录。 |
退货 | |
---|---|
给定目录及其子目录中测试的Map<String, Set<TestInfo>> 。 |
getTests
publicgetTests (String testGroup, disabledTests, boolean hostOnly, keywords)
帮手获取在给定组的TEST_MAPPING文件中设置的所有测试。
参量 | |
---|---|
testGroup | String :测试组的String 。 |
disabledTests | String 。 |
hostOnly | boolean :如果仅返回在主机上运行且不需要设备的测试,则为true。如果为false,则返回需要设备运行的测试。 |
keywords | String 。 |
退货 | |
---|---|
测试信息的Set<TestInfo> 。 |
getTests
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> 。 |
setTestMappingPaths
public static void setTestMappingPaths (relativePaths)
在TEST_MAPPINGS_ZIP内设置TEST_MAPPING路径以限制加载TEST_MAPPING。
参量 | |
---|---|
relativePaths | List<String> 。 |