Documentation ¶
Overview ¶
Package driver implements communications with local/remote executables related to Tast.
Index ¶
- Constants
- func ShouldRunTestsRecursively() bool
- type BundleEntity
- type Driver
- func (d *Driver) Close(ctx context.Context) error
- func (d *Driver) CollectSysInfo(ctx context.Context, initialSysInfo *protocol.SysInfoState) (retErr error)
- func (d *Driver) ConnCacheForTesting() *target.ConnCache
- func (d *Driver) ConnectionSpec() string
- func (d *Driver) DefaultTimeout() time.Duration
- func (d *Driver) DownloadPrivateBundles(ctx context.Context, dutInfo *protocol.DUTInfo) error
- func (d *Driver) Duplicate(ctx context.Context) (*Driver, error)
- func (d *Driver) GetDUTInfo(ctx context.Context) (*protocol.DUTInfo, error)
- func (d *Driver) GetSysInfoState(ctx context.Context) (*protocol.SysInfoState, error)
- func (d *Driver) GlobalRuntimeVars(ctx context.Context) ([]string, error)
- func (d *Driver) InitBootID() string
- func (d *Driver) ListLocalFixtures(ctx context.Context) ([]*BundleEntity, error)
- func (d *Driver) ListMatchedLocalTests(ctx context.Context, features *protocol.Features) ([]*BundleEntity, error)
- func (d *Driver) ListMatchedTests(ctx context.Context, features *protocol.Features) ([]*BundleEntity, error)
- func (d *Driver) ListRemoteFixtures(ctx context.Context) ([]*BundleEntity, error)
- func (d *Driver) ProxyCommand() string
- func (d *Driver) ReconnectIfNeeded(ctx context.Context, rebootBeforeReconnect bool) error
- func (d *Driver) RunTests(ctx context.Context, tests []*BundleEntity, ...) ([]*resultsjson.Result, error)
- func (d *Driver) SSHConn() *ssh.Conn
- func (d *Driver) Services() *Services
- func (d *Driver) StreamFile(ctx context.Context, src, dest string) error
- type Services
Constants ¶
const ( // SystemLogsDir is a result subdirectory where system logs are saved // by CollectSysInfo. SystemLogsDir = "system_logs" // CrashesDir is a result subdirectory where crash dumps are saved by // CollectSysInfo. CrashesDir = "crashes" )
const ( // SSHPingTimeout is the timeout for checking if SSH connection to DUT is open. SSHPingTimeout = target.SSHPingTimeout )
const TestRecursively = "TAST_TEST_RECURSIVELY"
TestRecursively is environment variable key which is set to "0" to disable recursive test running flow and support full remote fixtures. TODO(b/187957164): Remove this after migration has finished.
Variables ¶
This section is empty.
Functions ¶
func ShouldRunTestsRecursively ¶
func ShouldRunTestsRecursively() bool
ShouldRunTestsRecursively indicates if Tast tests should be run recursively (i.e. remote bundle invokes local bundle).
Types ¶
type BundleEntity ¶
type BundleEntity = drivercore.BundleEntity
BundleEntity is a pair of a ResolvedEntity and its bundle name.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements communications with local/remote executables related to Tast.
Driver maintains a connection to the target device. Getter methods related to a current connection are guaranteed to return immediately. Other methods may re-establish a connection to the target device, so you should get a fresh connection object after calling them.
func (*Driver) CollectSysInfo ¶
func (d *Driver) CollectSysInfo(ctx context.Context, initialSysInfo *protocol.SysInfoState) (retErr error)
CollectSysInfo collects the sysinfo, considering diff from the given initial sysinfo state.
func (*Driver) ConnCacheForTesting ¶
ConnCacheForTesting returns target.ConnCache the driver owns for testing.
func (*Driver) ConnectionSpec ¶
ConnectionSpec returns a connection spec as [<user>@]host[:<port>].
func (*Driver) DefaultTimeout ¶
DefaultTimeout returns the default timeout for connection operations.
func (*Driver) DownloadPrivateBundles ¶
DownloadPrivateBundles downloads and installs a private test bundle archive corresponding to the target version, if one has not been installed yet.
func (*Driver) GetDUTInfo ¶
GetDUTInfo retrieves various DUT information needed for test execution.
func (*Driver) GetSysInfoState ¶
GetSysInfoState collects the sysinfo state of the DUT.
func (*Driver) GlobalRuntimeVars ¶
GlobalRuntimeVars in driver class append result between local and remote.
func (*Driver) InitBootID ¶
InitBootID returns a boot ID string obtained on the first successful connection to the target device.
func (*Driver) ListLocalFixtures ¶
func (d *Driver) ListLocalFixtures(ctx context.Context) ([]*BundleEntity, error)
ListLocalFixtures enumerates all local fixtures.
func (*Driver) ListMatchedLocalTests ¶
func (d *Driver) ListMatchedLocalTests(ctx context.Context, features *protocol.Features) ([]*BundleEntity, error)
ListMatchedLocalTests enumerates local tests matched with the user-supplied patterns.
func (*Driver) ListMatchedTests ¶
func (d *Driver) ListMatchedTests(ctx context.Context, features *protocol.Features) ([]*BundleEntity, error)
ListMatchedTests enumerates tests matched with the user-supplied patterns.
func (*Driver) ListRemoteFixtures ¶
func (d *Driver) ListRemoteFixtures(ctx context.Context) ([]*BundleEntity, error)
ListRemoteFixtures enumerates all remote fixtures.
func (*Driver) ProxyCommand ¶
ProxyCommand returns the proxy command.
func (*Driver) ReconnectIfNeeded ¶
ReconnectIfNeeded ensures that the current connection is healthy, and otherwise it re-establishes a connection.
func (*Driver) RunTests ¶
func (d *Driver) RunTests(ctx context.Context, tests []*BundleEntity, dutInfos map[string]*protocol.DUTInfo, client *reporting.RPCClient, remoteDevservers []string) ([]*resultsjson.Result, error)
RunTests runs specified tests per bundle.
func (*Driver) SSHConn ¶
SSHConn returns ssh.Conn for the current connection. The return value may change after calling non-getter methods.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
drivercore
Package drivercore defines core data types for the driver package.
|
Package drivercore defines core data types for the driver package. |
runnerclient
Package runnerclient provides a client interface to tast test runners.
|
Package runnerclient provides a client interface to tast test runners. |
sshconfig
Package sshconfig provides functionality to parse SSH configuration and return real host information to users.
|
Package sshconfig provides functionality to parse SSH configuration and return real host information to users. |