ShardHelper

public class ShardHelper
extends Object implements IShardHelper

java.lang.Object
   ↳ com.android.tradefed.invoker.shard.ShardHelper


用于处理创建分片并将其调度为调用的辅助类。

摘要

字段

public static final String LAST_SHARD_DETECTOR

public static final String SHARED_TEST_INFORMATION

公共构造函数

ShardHelper()

公共方法

boolean shardConfig(IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

尝试将配置分片为子配置,以便重新调度在多个资源上并行运行。

受保护的方法

IGlobalConfiguration getGlobalConfiguration()

返回当前的全局配置。

void validateOptions(TestInformation testInfo, IConfiguration config)

对配置运行 IConfiguration#validateOptions()

字段

LAST_SHARD_DETECTOR

public static final String LAST_SHARD_DETECTOR

SHARED_TEST_INFORMATION

public static final String SHARED_TEST_INFORMATION

公共构造函数

ShardHelper

public ShardHelper ()

公共方法

shardConfig

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

尝试将配置分片为子配置,以便重新调度在多个资源上并行运行。

成功的分片操作会使当前配置变为空,并且调用不应继续。

参数
config IConfiguration:当前的 IConfiguration

testInfo TestInformation:存储测试信息的 TestInformation

rescheduler IReschedulerIRescheduler

logger ITestLogger

返回
boolean 如果测试已分片,则为 true。否则返回 false

受保护的方法

getGlobalConfiguration

protected IGlobalConfiguration getGlobalConfiguration ()

返回当前的全局配置。

返回
IGlobalConfiguration

validateOptions

protected void validateOptions (TestInformation testInfo, 
                IConfiguration config)

对配置运行 IConfiguration#validateOptions()

参数
testInfo TestInformation

config IConfiguration