ShardHelper

public class ShardHelper
extends Object implements IShardHelper

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


Helper class that handles creating the shards and scheduling them for an invocation.

Summary

Public constructors

ShardHelper()

Public methods

boolean shardConfig(IConfiguration config, IInvocationContext context, IRescheduler rescheduler)

Attempt to shard the configuration into sub-configurations, to be re-scheduled to run on multiple resources in parallel.

Protected methods

IGlobalConfiguration getGlobalConfiguration()

Returns the current global configuration.

void validateOptions(IConfiguration config)

Runs the IConfiguration#validateOptions(boolean) on the config.

Public constructors

ShardHelper

public ShardHelper ()

Public methods

shardConfig

public boolean shardConfig (IConfiguration config, 
                IInvocationContext context, 
                IRescheduler rescheduler)

Attempt to shard the configuration into sub-configurations, to be re-scheduled to run on multiple resources in parallel.

A successful shard action renders the current config empty, and invocation should not proceed.

Parameters
config IConfiguration: the current IConfiguration.

context IInvocationContext: the IInvocationContext holding the tests information.

rescheduler IRescheduler: the IRescheduler

Returns
boolean true if test was sharded. Otherwise return false

Protected methods

getGlobalConfiguration

protected IGlobalConfiguration getGlobalConfiguration ()

Returns the current global configuration.

Returns
IGlobalConfiguration

validateOptions

protected void validateOptions (IConfiguration config)

Runs the IConfiguration#validateOptions(boolean) on the config.

Parameters
config IConfiguration

Throws
ConfigurationException