Documentation
¶
Overview ¶
Package driver implements drivers to execute tests.
Package driver implements test drivers for Tast and Autotest tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Package driver implements drivers to execute tests.
Index ¶
- Constants
- func BuildNonXtsTestCommand(logger *log.Logger, testType string, tests []*api.TestCaseMetadata, ...) []string
- func BuildXtsTestCommand(logger *log.Logger, testType string, tests []*api.TestCaseMetadata, ...) []string
- func GenerateMoblyConfig(logger *log.Logger, dir string, serials []string, metadata []*api.Arg) (err error)
- func ParseArg(logger *log.Logger, arg *api.Arg, argMap paramMap) paramMap
- func ParseDeviceArg(logger *log.Logger, arg *api.Arg) deviceParamMap
- type AndroidDevice
- type BtReferenceDevice
- type ConfigParams
- type Controllers
- type CrosierDriver
- type Driver
- type GtestDriver
- type Labels
- type LuciJSONResult
- type MoblyDriver
- type MoblyTestConfig
- type Module
- type OpenWrtDevice
- type Reason
- type Result
- type TastDriver
- type TautoDriver
- type TestBed
- type TestParams
- type TradeFedTest
- type TradeFedTestFailure
- type TradefedDriver
- type TradefedTestCase
- type Type
Constants ¶
const ( GitMainALDev = "git_main-al-dev" GitMain = "git_main" )
const (
DTS = "dts"
)
const (
RawStatusKeyName = "raw_status"
)
Variables ¶
This section is empty.
Functions ¶
func BuildNonXtsTestCommand ¶
func BuildXtsTestCommand ¶
func GenerateMoblyConfig ¶
Types ¶
type AndroidDevice ¶
type AndroidDevice struct { Serial string `yaml:"serial"` Role string `yaml:"role"` Params paramMap `yaml:",inline"` }
func GenerateAndroidDevices ¶
func GenerateAndroidDevices(serials []string, androidParams deviceParamMap) []*AndroidDevice
type BtReferenceDevice ¶
type BtReferenceDevice struct { Hostname string `yaml:"hostname"` Username string `yaml:"username"` Password string `yaml:"password"` Params paramMap `yaml:",inline"` }
func GenerateBtReferenceDevices ¶
func GenerateBtReferenceDevices(serials []string, btReferenceParams deviceParamMap) []*BtReferenceDevice
type ConfigParams ¶
type ConfigParams struct { // Keyed by `test-params` TestParams paramMap // Values prefixed by `primary` or `secondary` will only apply to that device. // Keyed by `android-params` AndroidParams deviceParamMap // Values prefixed by `primary-<suffix>` or `secondary-<suffix>` will only apply to that device. // Keyed by `openwrt-params` OpenWrtParams deviceParamMap // Keyed by `btreference-params` BtReferenceParams deviceParamMap }
ConfigParams holds config parameters from ExecutionMetadata Keyed by `config-params`
func ParseMetadata ¶
func ParseMetadata(logger *log.Logger, metadata []*api.Arg) *ConfigParams
type Controllers ¶
type Controllers struct { OpenWrtDevices []*OpenWrtDevice `yaml:"OpenWrtDevice,omitempty"` AndroidDevices []*AndroidDevice `yaml:"AndroidDevice,omitempty"` BtReferenceDevice []*BtReferenceDevice `yaml:"BtReferenceDevice,omitempty"` }
type CrosierDriver ¶
type CrosierDriver struct {
// contains filtered or unexported fields
}
CrosierDriver runs gtest and report its results.
func NewCrosierDriver ¶
func NewCrosierDriver(logger *log.Logger) *CrosierDriver
NewCrosierDriver creates a new driver to run tests.
func (*CrosierDriver) Name ¶
func (td *CrosierDriver) Name() string
Name returns the name of the driver.
func (*CrosierDriver) RunTests ¶
func (td *CrosierDriver) RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error)
RunTests drives a test framework to execute tests.
type Driver ¶
type Driver interface { // RunTests drives a test framework to execute tests. RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error) // Name returns the name of the driver. Name() string }
Driver provides common interface to execute Tast and Autotest.
type GtestDriver ¶
type GtestDriver struct {
// contains filtered or unexported fields
}
GtestDriver runs gtest and report its results.
func NewGtestDriver ¶
func NewGtestDriver(logger *log.Logger) *GtestDriver
NewGtestDriver creates a new driver to run tests.
func (*GtestDriver) Name ¶
func (td *GtestDriver) Name() string
Name returns the name of the driver.
func (*GtestDriver) RunTests ¶
func (td *GtestDriver) RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error)
RunTests drives a test framework to execute tests.
type Labels ¶
type Labels struct {
AutotestHostInfoLabels string
}
Labels contains AutotestHostInfoLabels Note, the name is intentionally `AutotestHostInfoLabels` as that is a key string for parsing.
type LuciJSONResult ¶
type LuciJSONResult struct { Tr []struct { TestID string `json:"testId"` Name string `json:"result_name"` Status string `json:"status"` Expected bool `json:"expected"` FailureReason string `json:"failureReason"` Duration float32 `json:"duration"` Tags []struct { Key string `json:"key"` Value string `json:"value"` } `json:"tags"` } `json:"tr"` }
type MoblyDriver ¶
type MoblyDriver struct {
// contains filtered or unexported fields
}
MoblyDriver runs Mobly tests.
func NewMoblyDriver ¶
func NewMoblyDriver(logger *log.Logger) *MoblyDriver
NewMoblyDriver creates a new Mobly driver.
func (*MoblyDriver) Name ¶
func (md *MoblyDriver) Name() string
Name returns the name of the driver.
func (*MoblyDriver) RunTests ¶
func (md *MoblyDriver) RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error)
RunTests executes Mobly tests.
type MoblyTestConfig ¶
type MoblyTestConfig struct {
TestBeds []*TestBed `yaml:"TestBeds"`
}
type OpenWrtDevice ¶
type OpenWrtDevice struct { Hostname string `yaml:"hostname"` Params paramMap `yaml:",inline"` }
func GenerateOpenWrtDevices ¶
func GenerateOpenWrtDevices(serials []string, openWrtParams deviceParamMap) []*OpenWrtDevice
type TastDriver ¶
type TastDriver struct {
// contains filtered or unexported fields
}
TastDriver runs tast and report its results.
func NewTastDriver ¶
func NewTastDriver(logger *log.Logger) *TastDriver
NewTastDriver creates a new driver to run tast tests.
func (*TastDriver) RunTests ¶
func (td *TastDriver) RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error)
RunTests drives a test framework to execute tests.
type TautoDriver ¶
type TautoDriver struct {
// contains filtered or unexported fields
}
TautoDriver runs Tauto and report its results.
func NewTautoDriver ¶
func NewTautoDriver(logger *log.Logger) *TautoDriver
NewTautoDriver creates a new driver to run tests.
func (*TautoDriver) Name ¶
func (td *TautoDriver) Name() string
Name returns the name of the driver.
func (*TautoDriver) RunTests ¶
func (td *TautoDriver) RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error)
RunTests drives a test framework to execute tests.
type TestBed ¶
type TestBed struct { Name string `yaml:"Name"` TestParams *TestParams `yaml:"TestParams"` Controllers *Controllers `yaml:"Controllers"` }
type TestParams ¶
type TestParams struct {
Params paramMap `yaml:",inline"`
}
type TradeFedTest ¶
type TradeFedTest struct { Result string `xml:"result,attr"` Abi string Name string `xml:"name,attr"` Failure TradeFedTestFailure `xml:"Failure"` }
type TradeFedTestFailure ¶
type TradefedDriver ¶
type TradefedDriver struct {
// contains filtered or unexported fields
}
func NewTradefedDriver ¶
func NewTradefedDriver(logger *log.Logger) *TradefedDriver
func (*TradefedDriver) Name ¶
func (td *TradefedDriver) Name() string
func (*TradefedDriver) RunTests ¶
func (td *TradefedDriver) RunTests(ctx context.Context, resultsDir string, req *api.CrosTestRequest, tlwAddr string, tests []*api.TestCaseMetadata) (*api.CrosTestResponse, error)
RunTests drives a test framework to execute tests.
type TradefedTestCase ¶
type TradefedTestCase struct { Name string `xml:"name,attr"` Tests []TradeFedTest `xml:"Test"` }