Documentation ¶
Overview ¶
Package minidriver provides function to run tests in an external bundle.
Index ¶
Constants ¶
const ( // HeartbeatInterval is interval for heartbeat messages. HeartbeatInterval = time.Second )
Variables ¶
var ErrNoTestRanInLastAttempt = errors.New("no test ran in the last attempt")
ErrNoTestRanInLastAttempt indicates no test was ran in the last attempt.
Functions ¶
func RunTestsWithRetry ¶
func RunTestsWithRetry(ctx context.Context, allTests []string, runTestsOnce runTestsOnceFunc, retryn int) ([]*resultsjson.Result, error)
RunTestsWithRetry runs tests in a loop. If runTestsOnce returns insufficient results, it calls beforeRetry, followed by runTestsOnce again to restart testing. Additionally, this will honor the retry CLI flag.
Types ¶
type Config ¶
type Config struct { Retries int ResDir string Devservers []string Target string LocalDataDir string LocalOutDir string LocalTempDir string LocalBundleDir string DownloadMode protocol.DownloadMode WaitUntilReady bool SystemServicesTimeout time.Duration WaitUntilReadyTimeout time.Duration CheckTestDeps bool TestVars map[string]string MaybeMissingVars string MsgTimeout time.Duration SwarmingTaskID string BuildBucketID string DebuggerPort int Proxy bool // DUTFeatures contains software/hardware features each DUT has, and runtime variables. // Its key for the map is the role of the DUT such as "cd1". // The role for primary DUT should be "". DUTFeatures map[string]*frameworkprotocol.DUTFeatures ForceSkips map[string]*protocol.ForceSkip Factory HandlersFactory BuildArtifactsURL string // Recursive specifies whether to run tests recursively. // This must be true to support remote fixture. Recursive bool }
Config provides configurations for running tests.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the main struct for running tests.
func (*Driver) RunLocalTests ¶
func (d *Driver) RunLocalTests(ctx context.Context, bundle string, tests []string, state *protocol.StartFixtureState) ([]*resultsjson.Result, error)
RunLocalTests runs external tests with retry.
type HandlersFactory ¶
type HandlersFactory func(ctx context.Context, cc *target.ConnCache) (context.Context, []processor.Handler)
HandlersFactory is a type which creates processor handlers.
func NewIntermediateHandlersFactory ¶
func NewIntermediateHandlersFactory(resDir string, counter *failfast.Counter, pass func(*protocol.RunTestsResponse) error, handle processor.HandleStack) HandlersFactory
NewIntermediateHandlersFactory creates a new factory. When tests are run recursively, intermediate component (i.e. remote bundle) will use this factory.
func NewRootHandlersFactory ¶
func NewRootHandlersFactory(resDir string, counter *failfast.Counter, client *reporting.RPCClient) HandlersFactory
NewRootHandlersFactory creates a new factory for CLI.
Directories ¶
Path | Synopsis |
---|---|
Package bundleclient provides a client of test bundles.
|
Package bundleclient provides a client of test bundles. |
Package diagnose implements diagnosis logic for run failures.
|
Package diagnose implements diagnosis logic for run failures. |
Package externalservers provides a utility to parse external servers information.
|
Package externalservers provides a utility to parse external servers information. |
Package failfast provides a utility to track test failures and fail fast.
|
Package failfast provides a utility to track test failures and fail fast. |
Package processor provides the test execution event processor.
|
Package processor provides the test execution event processor. |
Package servo is used to communicate with servo devices connected to DUTs.
|
Package servo is used to communicate with servo devices connected to DUTs. |
xmlrpc
Package xmlrpc implements the XML-RPC client library.
|
Package xmlrpc implements the XML-RPC client library. |
Package target is responsible for maintaining resources related to targets.
|
Package target is responsible for maintaining resources related to targets. |