Documentation ¶
Overview ¶
Package atutil provides a higher level Autotest interface than the autotest package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminTask ¶
type AdminTask struct { Type AdminTaskType Host string ResultsDir string }
AdminTask represents an admin task to run. AdminTask implements AutoservJob.
func (*AdminTask) AutoservArgs ¶
func (t *AdminTask) AutoservArgs() *autotest.AutoservArgs
AutoservArgs returns arguments for autoserv.
type AdminTaskType ¶
type AdminTaskType int
AdminTaskType is an enum used in AdminTask to determine what type of admin task to run.
const ( // NoTask can be used as a null AdminTaskType value. NoTask AdminTaskType = iota // Verify tasks Verify // Cleanup tasks Cleanup // Reset tasks Reset // Repair tasks Repair )
func (AdminTaskType) String ¶
func (i AdminTaskType) String() string
type AutoservJob ¶
type AutoservJob interface {
AutoservArgs() *autotest.AutoservArgs
}
AutoservJob describes the interface a job object needs to be passed to RunAutoserv.
type HostTest ¶
type HostTest struct { HostlessTest Hosts []string LocalOnlyHostInfo bool ParentJobID int RequireSSP bool TestSourceBuild string }
HostTest represents a host test to run. HostTest implements AutoservJob.
func (*HostTest) AutoservArgs ¶
func (t *HostTest) AutoservArgs() *autotest.AutoservArgs
AutoservArgs returns arguments for autoserv.
type HostlessTest ¶
type HostlessTest struct { Args string ClientTest bool ControlFile string ControlName string ExecutionTag string Keyvals map[string]string Name string Owner string ResultsDir string }
HostlessTest represents a hostless test to run. HostlessTest implements AutoservJob.
func (*HostlessTest) AutoservArgs ¶
func (t *HostlessTest) AutoservArgs() *autotest.AutoservArgs
AutoservArgs returns arguments for autoserv.
func (*HostlessTest) JobKeyvals ¶
func (t *HostlessTest) JobKeyvals() map[string]string
JobKeyvals returns the keyvals for the job.
type MainJob ¶
MainJob describes the overall job, which dictates certain job global settings for running autoserv.
type Provision ¶
Provision represents a provision task to run. Provision implements AutoservJob.
func (*Provision) AutoservArgs ¶
func (p *Provision) AutoservArgs() *autotest.AutoservArgs
AutoservArgs returns arguments for autoserv.
type Result ¶
type Result struct { osutil.RunResult // Exit is the exit status for the autoserv command, if // autoserv was run. Exit int TestsFailed int }
Result contains information about RunAutoserv results.
func RunAutoserv ¶
func RunAutoserv(ctx context.Context, m *MainJob, j AutoservJob, w io.Writer) (r *Result, err error)
RunAutoserv runs an autoserv task.
This function always returns a non-nil Result, but some fields may not be meaningful. For example, Result.Exit will be 0 even if autoserv could not be run. In this case, Result.Started will be false and an error will also returned.
Output is written to the Writer.
Result.TestsFailed may not be set, depending on AutoservJob. An error is not returned for test failures.