ShardHelper

public class ShardHelper
extends Object

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


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

Summary

Public constructors

ShardHelper()

Public methods

static void cloneBuildInfos(IConfiguration fromConfig, IConfiguration toConfig, IInvocationContext context)

Helper to set the Sharded configuration build provider to the ExistingBuildProvider.

static boolean legacyShardConfig(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.

Public constructors

ShardHelper

ShardHelper ()

Public methods

cloneBuildInfos

void cloneBuildInfos (IConfiguration fromConfig, 
                IConfiguration toConfig, 
                IInvocationContext context)

Helper to set the Sharded configuration build provider to the ExistingBuildProvider.

Parameters
fromConfig IConfiguration: Original configuration
toConfig IConfiguration: cloned configuration recreated from the command line.
context IInvocationContext: invocation context

legacyShardConfig

boolean legacyShardConfig (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